ZF-7474: Subsequent subtracting/addition actions on Zend_Date at end of year
Description
If you have a Zend_Date object $date with an internal date of 2009-12-28 00:00:00 and you perform $date->addWeek(1)->subMinute(1) the result is 2009-01-03 23:59:00.
Shouldn't this be 2010-01-03 23:59:00?
Comments
Posted by Sam Hauglustaine (sam) on 2009-08-04T07:12:04.000+0000
This only seems to be the case when you use this to dump to contents of $date: ->toString('YYYY-MM-dd HH:mm')
Posted by Thomas Weidner (thomas) on 2009-08-04T07:49:02.000+0000
According to ISO the ISO year is counted as this year where the first week contains a thursday.
For 2010 does this mean that the week beginning with 04.Jan is counted as first week of the year 2010.
The given behaviour is correct.
Posted by Thomas Weidner (thomas) on 2009-08-04T07:49:50.000+0000
Closing as non-issue due to wrong usage/expectations.