Please see the documentation...
http://framework.zend.com/manual/en/zend.date.constants.html#zend.date.constants.selfdefinedformats
I coded the class and I think I know what the constants mean ;-)
And you can believe me... in ISO the value 'm' stands for minute and not for
month...
Excerpt from the documentation :
M Month, one or two digit Zend_Date::MONTH_SHORT 2
MM Month, two digit Zend_Date::MONTH 02
MMM Month, localized, abbreviated Zend_Date::MONTH_NAME_SHORT Feb
MMMM Month, localized, complete Zend_Date::MONTH_NAME February
MMMMM Month, localized, abbreviated, one digit
Zend_Date::MONTH_NAME_NARROW F
m Minute, (0-59), one or two digit Zend_Date::MINUTE_SHORT 2
mm Minute, (00-59), two digit Zend_Date::MINUTE 02
If you want to use PHP's Syntax and not the ISO Syntax you have to define
that within Zend_Date:
See the documentation for how to do this:
http://framework.zend.com/manual/en/zend.date.constants.html#zend.date.constants.phpformats
Greetings
Thomas
I18N Team Leader
----- Original Message -----
From: "Liao, Kexiao" <[EMAIL PROTECTED]>
To: "Thomas Weidner" <[EMAIL PROTECTED]>
Sent: Friday, September 21, 2007 8:39 PM
Subject: RE: [fw-general] 19/11/2001 a valid date for the format 'm/d/yyyy'
by using Zend_Date::isDate
Actually I think m in the format is refer to Month not Minute. Do you
know how to refer to Month with 1 or 2 digit?
Kevin
-----Original Message-----
From: Thomas Weidner [mailto:[EMAIL PROTECTED]
Sent: Friday, September 21, 2007 14:32
To: Liao, Kexiao; [email protected]
Subject: Re: [fw-general] 19/11/2001 a valid date for the format
'm/d/yyyy' by using Zend_Date::isDate
Of course it's true...
What would you have expected ?
Please see the documentation of Zend_Date for details of what you've
defined...
m = Minute... minimum one digit
d = Day... minimum one digit
YYYY = ISO Year... minimum 4 digits
Minute= 19, Day = 11, Year = 2001... is a valid date as all other fields
are automatically filled with standard values...
Month 1, Hour 0, Second 0...
If you want a strict validation see details for isDate and the general
options for Zend_Date.
Greetings
Thomas
I18N Team Leader
----- Original Message -----
From: "Kexiao Liao" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, September 21, 2007 7:40 PM
Subject: [fw-general] 19/11/2001 a valid date for the format 'm/d/yyyy'
by using Zend_Date::isDate
I am not sure if this is a bug for Zend_Date::isDate method, for the
following testing date the $result is true.
$zDate = new Zend_Date();
$input = '19/11/2001';
$result = $zDate->isDate($input,'m/d/YYYY');
--
View this message in context:
http://www.nabble.com/19-11-2001-a-valid-date-for-the-format-%27m-d-yy
yy%27-by-using-Zend_Date%3A%3AisDate-tf4497535s16154.html#a12826403
Sent from the Zend Framework mailing list archive at Nabble.com.
===================================
Cleveland Clinic is ranked one of the top hospitals
in America by U.S. News & World Report (2007).
Visit us online at http://www.clevelandclinic.org for
a complete listing of our services, staff and
locations.
Confidentiality Note: This message is intended for use
only by the individual or entity to which it is addressed
and may contain information that is privileged,
confidential, and exempt from disclosure under applicable
law. If the reader of this message is not the intended
recipient or the employee or agent responsible for
delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If
you have received this communication in error, please
contact the sender immediately and destroy the material in
its entirety, whether electronic or hard copy. Thank you.