Skip to main content

CLDR to PHP dateformat converter

Published on 2015-03-28

Convert any CLDR date/time format to PHP format.

Paste CLDR date/time format

Converted PHP date/time format

* means that it could not be mapped

unmappable formatters are removed (compliance mode)

Test php format here.

Replacement mapping // Era is not implemented.
"GGGGG": fallback_replacement,
"GGGG": fallback_replacement,
"GGG": fallback_replacement,
"GG": fallback_replacement,
"G": fallback_replacement,
// Year.
"yyyy": "Y", // 1999
"yy": "y", // 99
"y": "Y", // 1999
// Month.
"MMMM": "F",
"MMM": "M",
"MM": "m",
"M": "m",
// Day.
"dd": "d",
"d": "j",
// Day of week.
"EEEEEE": fallback_replacement, // Tu
"EEEEE": fallback_replacement, // T
"EEEE": "l", // Tuesday
"EEE": "D", // Tue
"EE": "D", // Tue
"E": "D", // Tue
// Am/PM
"a": "a",
// hours
"HH": "H", // 24-hour format of an hour with leading zeros
"H": "G", // 24-hour format of an hour without leading zeros
"h": "h", // 12-hour format of an hour with leading zeros
"K": "g", // 12-hour format of an hour without leading zero
// minutes
"mm": "i", // Minutes with leading zeros
"ss": "s", // Seconds, with leading zeros
// timezone.
"z": "T", // Timezone abbreviation
"zz": "T", // Timezone abbreviation
"zzz": "T", // Timezone abbreviation
"zzzz": "e", // Timezone