The format you're using does not exist for en_SG.
According to ISO there are:
M/d/yy G
MMM d, y G
MMMM d, y G
EEEE, MMMM d, y G
But you gave
MM/dd/yyyy
So the expected format and the given format do not match.
When you are using a fixed format and no localized one, then use a fixed
format definition.
new Zend_Date('26/03/2010', 'MM/dd/yyyy', 'en_SG');
Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com
----- Original Message -----
From: "Chin Lee" <[email protected]>
To: <[email protected]>
Sent: Friday, March 26, 2010 5:53 AM
Subject: [fw-general] Zend_Date with Zend_Locale for en_SG
I have a calendar system to input date (eg. "26/03/2010") and I need
Zend_Date::isDate() with Zend_Locale to check whether the input date is in
correct format.
This system runs in Singapore so I set the Zend_Locale to 'en_SG' but the
problem comes. The Zend_Date::isDate() returns a false.
I have tried to google about the ISO date format for Singapore and found
that they are using day-month-year system (ref:
http://en.wikipedia.org/wiki/Calendar_date
http://en.wikipedia.org/wiki/Calendar_date )
Question: How do I have Zend_Date and Zend_Locale to work perfectly for
Singapore without modifying zf?
--
View this message in context:
http://n4.nabble.com/Zend-Date-with-Zend-Locale-for-en-SG-tp1691708p1691708.html
Sent from the Zend Framework mailing list archive at Nabble.com.