ZF-12010: Zend_Date isLater doesn't work properly when using yyyy-MM-dd as $part
Description
If i do this:
$a=new Zend_Date(); $b=clone $a;
and this: $a->isLater($b,'yyyy-MM-dd')
I should get a false value, insted I get a TRUE value.
If i use: $a->isLater($b,Zend_Date::DATES)
I get the correct value (false).
Comments
Posted by Sebastian Große (sebastian.grosse) on 2012-02-21T08:22:42.000+0000
I think this is correct behavier.
In the comparison from date $b only year, month and days are considered (so hours, minutes, seconds are 0) and so it is before date $a where hours, minutes and seconds or at least one of it are greater than 0, so $a is later than $b and the comparison is correct.
Posted by Adam Lundrigan (adamlundrigan) on 2012-02-26T00:36:17.000+0000
You have to specify one of the recognized date constants as the second argument to {{isLater}}. More information is available in the Comparing Dates section of the manual.