function _timefield_time_part_format in Timefield 7
Same name and namespace in other branches
- 1.0.x timefield.module \_timefield_time_part_format()
Helper function to build an options array
1 call to _timefield_time_part_format()
- _timefield_display_format_form in ./
timefield.module - Helper Function to build settings form
File
- ./
timefield.module, line 1108 - Defines a Field API field for time
Code
function _timefield_time_part_format($part) {
$values = array(
'hour' => array(
'g' => t('12-hour format of an hour without leading zeros'),
'G' => t('24-hour format of an hour without leading zeros'),
'h' => t('12-hour format of an hour with leading zeros'),
'H' => t('24-hour format of an hour with leading zeros'),
),
'minute' => array(
'i' => t('Minutes with leading Zeros'),
'none' => t('Do not display minutes'),
),
'period' => array(
'a' => t('Lowercase Ante meridiem and Post meridiem (am/pm)'),
'A' => t('Uppercase Ante meridiem and Post meridiem (AM/PM)'),
'none' => t('Do not display period'),
),
);
return $values[$part];
}