ZF-7474: Subsequent subtracting/addition actions on Zend_Date at end of year


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?


This only seems to be the case when you use this to dump to contents of $date: ->toString('YYYY-MM-dd HH:mm')

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.

Closing as non-issue due to wrong usage/expectations.