ZF-12252: [bug] No date part in 'HHHH' found.

Description

Zend_Date::setOptions(array('format_type' => 'php')); $day1 = new Zend_Date('2012-02-28');

/** * Fatal error: Uncaught exception 'Zend_Locale_Exception' with message 'No date part in 'HHHH' found.' in D:\Users\Documents\The Project\ZendFramework-1.x\library\Zend\Date.php on line 2665 */ echo('getHour', (int)$day1->getHour()); // this line throw error


library/Zend/Date.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/Zend/Date.php b/library/Zend/Date.php index 02393df..658179f 100644 --- a/library/Zend/Date.php +++ b/library/Zend/Date.php @@ -4174,7 +4174,7 @@ class Zend_Date extends Zend_Date_DateObject */ public function getHour($locale = null) { - return $this->copyPart(self::HOUR, $locale); + return $this->copyPart(self::HOUR_SHORT, $locale); }

Comments

No comments to display