I need to echo internationalized time in different format for different languages. Now i am using locale when creating a date, but it also outputs time:
$date->toString();
29.05.2012 0:00:00
Expected result:
29.05.2012
In documentation i can see inly custom formats (as i understand no internationalization format will be applied if i use them). Is it possible to output only date, without time, like described there (as i understand zf supports international formats: http://en.wikipedia.org/wiki/Date_format_by_country)?
I tried:
echo $date->get(Zend_Date::DATE_SHORT, $locale);
echo $date->toString(Zend_Date::DATE_SHORT); ?>
// produces MMMMMMMM (letters instead of date? Oo)
It didn't work because it was necessary to add
Zend_Date::setOptions(array('format_type' => 'iso'));
in bootstrap instead of
Zend_Date::setOptions(array('format_type' => 'php'));
With this option, it works fine!