Hy,
$date_input = new Zend_Date('66/03/2007','dd/mm/yyy');
$month = $date_input->get(Zend_Date::MONTH);
$day = $date_input->get(Zend_Date::DAY);
$year = $date_input->get(Zend_Date::YEAR_8601);
echo $month.'-'.$day.'-'.$year;
I have some points for you...
First:
If you want to check if a input is correct use
Zend_Locale_Format::isDate();
Second:
When you are giving an format string is has to be ISO. Or you define
previous that you want to use "ye old php date format".
What you have given is the following:
dd = day number, 2 digits
mm = minute, 2 digits
yyy = year, non ISO 3 digits
Third:
As you have given day and year but without month, the result is not what you
wanted it to be.
I would suggest that you:
1.) Check your input with isDate()
2.) Use proper format tokens.
3.) Read the documentation. ;-)
Greetings
Thomas
I18N Team Leader