Quote:
Originally Posted by BobiKK
Code:
$date = new Zend_Date('31.12.2007', 'dd.MM.YYYY');
echo $date."<br />";
echo $date->toString('YYYY-MM-dd');
And the output is:
Dec 31, 2007 12:00:00 AM
2008-12-31
Am I doing something wrong?
For dates like 30.12.2007 and 31.12.2010 the output is correct: 2007-12-30 and 2010-12-31 respectively.
|
instead of $date->toString('YYYY-MM-dd') use $date->get('YYYY-MM-dd');