Hello! :)

I have an issue with Zend_Date, I mean, I'm using Zend_Form and creating a 
Validator for a element date, so I have this:

$objValidateDate = new Zend_Validate_Date( "MM/dd/YYYY" );
$objValidateDate->setMessage( "'%value%' is not of the format MM/DD/YYYY", 
Zend_Validate_Date::NOT_YYYY_MM_DD );
$objElement->addValidator( $objValidateDate );

So, I don't know wich format use, so I test the isDate method from Zend_Date, 
then I have this:

Zend_Debug::dump( Zend_Date::isDate( "10/10/80", "MM/dd/yyyy" ) );

Look the format, I'm using the ISO table of constants, and look at the return 
of Zend_Debug::dump:

bool(true)

How can return true if the year have just two digits ("10/10/80") ? and my 
format have four ("MM/dd/yyyy") ?

Thx for any help.

Reply via email to