ZF-5969: Zend_Date::getDate() throws Zend_Date_Exception with message [Unable to parse the date format string]
Description
The following code causes the failure: \
Zend_Date::now('uk')->getDate('uk')
This happens for a number of different locales (about 80), I used the code below to get the number: \
$allLocales = Zend_Locale::getLocaleList();
$failing = array();
foreach ($allLocales as $locale => $val) {
try {
Zend_Date::now($locale)->getDate($locale);
}
catch (Exception $e)
{
$failing []= $locale;
}
}
var_dump($failing);
Comments
Posted by Stanislaw Osinski (stanislaw.osinski) on 2009-03-09T03:58:56.000+0000
PHP Info from the test environment.
Posted by Thomas Weidner (thomas) on 2009-03-10T04:40:24.000+0000
Interesting, but useless.
Not all locales exist within CLDR. "und" or "bn_CN" for example. They are given by LocaleList as this list returns the description for locales from the requested CLDR data and not from the available files. You are requesting data for the browser locale as you omitted the locale parameter for getLocaleList().
Excluding those cases where no locale file is available there are no failed detections.
Posted by Thomas Weidner (thomas) on 2009-03-10T05:30:38.000+0000
Cannot reproduce in trunk. Example code is broken.