Any way to know if someone is using 24 hour or 12 hour time format with Zend locale. I would like to create a custom form and pass this information along for time input.
Thanks.
Edit
Came up with this, if anyone knows of anything better let me know.
private function is24HourFormat(){
$localeObject = Zend_Registry::get('Locale');
$locale = new Zend_Locale($localeObject);
//create date for midnight
$date = new Zend_Date('1980-1-1 24:00:00', false, $locale);
//Should contain 12 if it's 12 hour time, otherwise 24 hour
$time = $date->get(Zend_Date::TIME_SHORT);
return (strpos($time, "12") === false);
}
Answering my own question, unless someone has something better.