ZF-7912: Bug introduced in Zend Date 18093 following ZF-7833 correction.
But in 1.7.8 and earlier version, the get method take into account the option format_type. So 1.78 and earlier was wrong. It is a strong change wich should be mentionned in documentation for migration. As all people working with zend_date in php format in 1.7.8 will have to migrate code for 1.8+ versions.
New problem: I find a new bug, wich appear only with the Date.php available in the trunk directory (version Id: Date.php 18093 2009-09-13 11:35:01Z thomas) with the patch you have done for my previous problem. With the original 1.9.2 Date.php, this bug in not here, so I guess it comes from your modifications.
IsLater and IsEarlier method for zend_date object send strange return value. Exemple:
Zend_Loader::loadClass('Zend_Date'); Zend_Date::setOptions(array('format_type' => 'php')); // This bug appears only when php format is actived, with the trunck Date.php version Id: Date.php 18093 2009-09-13 11:35:01Z thomas $date1 = new Zend_Date(); $date2 = clone $date1; $date2->add(1, Zend_Date::DAY);
echo "Is date1 earlier than date2:".$date1->isEarlier($date2, Zend_Date::DATES)."
"; // return false echo "Is date2 earlier than date1:".$date2->isEarlier($date1, Zend_Date::DATES)."
"; // return false echo "Is date1 later than date2:".$date1->isLater($date2, Zend_Date::DATES)."
"; // return true echo "Is date2 later than que date1:".$date2->isLater($date1, Zend_Date::DATES)."
"; // return true
Results are not possible. So maybe you need to check better the correction made previously as it impacts "isEarlier" and "isLater" method which rely on "compare" / "_calculate" methods.
Thanks again. Cheers, Thomas.