1 date.elements.inc _date_popup_format_to_popup($format)

Recreate a date format string so it has the values popup expects.


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.


core/modules/date/date.elements.inc, line 1339
Date forms and form themes and validation.


function _date_popup_format_to_popup($format) {
  if (empty($format)) {
    $format = 'Y-m-d';
  $replace = _date_popup_datepicker_format_replacements();
  return strtr($format, $replace);