ZF-3724: inconsistent results


I have this simple code

$date = new Zend_Date('2007-12-29'); echo $date->toString('YYYY-MM-dd').' / '.$date; echo "
"; $date=$date->addDay(1); echo $date->toString('YYYY-MM-dd').' / '.$date; echo "
"; $date=$date->addDay(1); echo $date->toString('YYYY-MM-dd').' / '.$date;

and the result is: 2007-12-29 / 29.12.2007 0:00:00 2007-12-30 / 30.12.2007 0:00:00 2008-12-31 / 31.12.2007 0:00:00 // Note this one


Please look into the documentation for the proper usage of the date constants. 'YYYY' is not the real year... it's the ISO Year used for calendar representations.

The result is correct. For real year use 'yyyy' as described in the manual. There is an extra paragraph about the difference between 'Y' and 'y'.