ZF-5865: return a new object for calculation methods
consider the folowing code.
$date = new Zend_Date(); echo $date->toString('w'); echo $nextWeek = $date->addWeek(1)->toString('w');
The result is that the a week is added internally to the date and then the value is returned. What actually SHOULD happen, according to programming standards, is that the method returns a NEW date object, with the date set a week ahead.
It's pretty crappy now to make calculations. The calculations should not be supposed to alter previous set dates.