ZF-8110: compareDate extracts false date
Description
We´d like to compare two dates with Zend_Date method compareDate. compareDate calls the _date method. This method extracts a date with the format ‚d.M.Y' when an instance of Zend_Date is given. The problem is, this extraction makes for the overgiven date 01.01.2010 the date 1.1.2009.
$dateValue = new Zend_Date(‚01.01.2010'); $today = new Zend_Date(); $tomorrow = $today->addDay(1); $tomorrow->compareDate($dateValue) // results 1, when -1 expected
Comments
Posted by Thomas Weidner (thomas) on 2009-10-21T11:50:01.000+0000
Example not reproducable as it produces a tokenizer error.
Posted by Thomas Weidner (thomas) on 2009-10-21T12:06:03.000+0000
Fixed with r18661