function date_popup_format_to_popup_time in Date 7
Same name and namespace in other branches
- 5.2 date_popup/date_popup.module \date_popup_format_to_popup_time()
- 6.2 date_popup/date_popup.module \date_popup_format_to_popup_time()
- 6 date_popup/date_popup.module \date_popup_format_to_popup_time()
- 7.3 date_popup/date_popup.module \date_popup_format_to_popup_time()
- 7.2 date_popup/date_popup.module \date_popup_format_to_popup_time()
Recreate a date format string so it has the values popup expects.
Parameters
string $format: a normal date format string, like Y-m-d
Return value
string a format string in popup format, like YMD-
1 call to date_popup_format_to_popup_time()
- date_popup_time_format in date_popup/
date_popup.module
File
- date_popup/
date_popup.module, line 487 - A module to enable jquery calendar and time entry popups. Requires the Date API.
Code
function date_popup_format_to_popup_time($format) {
if (empty($format)) {
$format = 'H:i';
}
$format = strtr($format, timepicker_format_replacements());
$format = str_replace(array(
' ',
'/',
'-',
' .',
',',
'F',
'M',
'l',
'z',
'w',
'W',
'd',
'j',
'm',
'n',
'y',
'Y',
), '', $format);
return $format;
}