Issues

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

PHP Info from the test environment.

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.

Cannot reproduce in trunk. Example code is broken.