You are here

function moment_date_format_to_moment_date_format in Moment.js 7.2

Same name and namespace in other branches
  1. 8.2 moment.module \moment_date_format_to_moment_date_format()

Convert a date format to Moment.js compatible date format.

@todo Care about the escaped symbols.

Parameters

string $date_format: PHP date format that is suitable for date().

Return value

string Date format which is suitable for Moment.js.

1 call to moment_date_format_to_moment_date_format()
moment_date_format_type_to_moment_date_format in ./moment.module
Convert a date format type to Moment.js compatible date format.

File

./moment.module, line 381
Moment.js integration.

Code

function moment_date_format_to_moment_date_format($date_format) {
  return strtr($date_format, moment_get_date_format_replacements());
}