Hy Bruno,

why do you think this is a problem ?
Each locale defines the dateformats in a different way.

And you defined to return the default date/time format from this locale.
Btw: Using DATE_FULL as input where no input is given is quite useless. It will be ignored. ;-)

And when you want to have a fixed outputformat you should define it.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

----- Original Message ----- From: "Bruno Friedmann" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, August 10, 2008 11:15 AM
Subject: [fw-general] Zend_Date + Zend_Locale bug ( missing translation localisation ? )


Hi all

While working on date I've found a strange result ( ZF is 1.6.0RC1 but same result with 1.5.3 )

    $date['en'] = new Zend_Date(null,Zend_Date::DATE_FULL, 'en');
    $date['en_US'] = new Zend_Date(null,Zend_Date::DATE_FULL, 'en_US');
    $date['en_GB'] = new Zend_Date(null,Zend_Date::DATE_FULL, 'en_GB');
    $date['fr'] = new Zend_Date(null,Zend_Date::DATE_FULL, 'fr');
    $date['fr_FR'] = new Zend_Date(null,Zend_Date::DATE_FULL, 'fr_FR');
    $date['fr_CH'] = new Zend_Date(null,Zend_Date::DATE_FULL, 'fr_CH');
    $date['de'] = new Zend_Date(null,Zend_Date::DATE_FULL, 'de');
    $date['de_DE'] = new Zend_Date(null,Zend_Date::DATE_FULL, 'de_DE');
    $date['de_CH'] = new Zend_Date(null,Zend_Date::DATE_FULL, 'de_CH');
    $date['it'] = new Zend_Date(null,Zend_Date::DATE_FULL, 'it');
    $date['it_IT'] = new Zend_Date(null,Zend_Date::DATE_FULL, 'it_IT');
    $date['it_CH'] = new Zend_Date(null,Zend_Date::DATE_FULL, 'it_CH');

echo "<div><pre>";
    foreach ($date as $key => $value){
        print $key ."\t = \t" .$value->getDate($key) ."\n";
    }
echo "</pre></div>";



result
en = Aug 10, 2008 1:00:00 AM
en_US = Aug 10, 2008 1:00:00 AM
en_GB = 10 Aug 2008 01:00:00
fr = 10 août 2008 01:00:00
fr_FR = 10 août 2008 01:00:00
fr_CH = 10 août 2008 01:00:00
de = 10.08.2008 01:00:00
de_DE = 10.08.2008 01:00:00
de_CH = 10.08.2008 01:00:00
it = 10/ago/2008 01:00:00
it_IT = 10/ago/2008 01:00:00
it_CH = 10-ago-2008 01:00:00


As you can see, there's a trouble with all the DE and associated languages.
(I've check all files de.xml and so are present in the library directory and readble and have right content.

Could someone confirm and / or explain me what I'm doing wrong.

Also if someone could give me the instruction to have only the date without the time..
I've try what is explain here.
http://framework.zend.com/manual/en/zend.date.constants.html
Table 9.15. Date and Time Formats (format varies by locale)



--

Bruno Friedmann

Reply via email to