Details
Description
on 1 jul 2010 i run this code:
—
Zend_Loader::loadClass('Zend_Date');
$d = Zend_Date::now();
$d->addMonth(6);
die($d->toString('Y-MM-dd'));
—
and see
2010-01-01
Year must be 2011
on 1 jul 2010 i run this code:
—
Zend_Loader::loadClass('Zend_Date');
$d = Zend_Date::now();
$d->addMonth(6);
die($d->toString('Y-MM-dd'));
—
and see
2010-01-01
Year must be 2011
I am not able to reproduce this issue. I am on ZF 1.10.4 from SVN on PHP 5.2.12.
Results are as expected. Please find the attached patch file which adds a unit test which creates a Zend_Date object for July 1, 2010 and adds 6 months and then asserts the result is January 1, 2011.
Please let me know if I should be providing patches in a different way or if this sort of contribution is helpful or not.
Thank you,
David Stockton