function date_popup_format_to_popup in Date 6.2
Same name and namespace in other branches
- 5.2 date_popup/date_popup.module \date_popup_format_to_popup()
- 6 date_popup/date_popup.module \date_popup_format_to_popup()
- 7.3 date_popup/date_popup.module \date_popup_format_to_popup()
- 7 date_popup/date_popup.module \date_popup_format_to_popup()
- 7.2 date_popup/date_popup.module \date_popup_format_to_popup()
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-, for the earlier 'calendar' version, or m/d/Y for the later 'datepicker' version.
1 call to date_popup_format_to_popup()
- date_popup_process_date in date_popup/
date_popup.module - Process the date portion of the element.
File
- date_popup/
date_popup.module, line 543 - A module to enable jquery calendar and time entry popups. Requires the Date API.
Code
function date_popup_format_to_popup($format) {
if (empty($format)) {
$format = 'Y-m-d';
}
$replace = datepicker_format_replacements();
return strtr($format, $replace);
}