Date Format String Builder
Build and preview a date format string in strftime, Moment/Day.js or LDML/date-fns tokens, with every token explained and translated between the three dialects.
The format rendered against a sample instant, a token-by-token explanation, the same format written in the other two dialects with untranslatable tokens marked, and a reference table.
Example: %Y-%m-%d %H:%M:%S %z renders 2026-03-05 07:08:09 +0000 and becomes YYYY-MM-DD HH:mm:ss ZZ in Moment and yyyy-MM-dd HH:mm:ss xx in date-fns; %V gives ISO week 10, %j day 064.
Three dialects,
one instant.
How tokens are matched, what translation can and cannot do, and why the sample is rendered at a fixed offset.
Tokens
The format is scanned for the tokens of the chosen dialect: %-prefixed conversions for strftime, letter runs for Moment and LDML (longest match first, so YYYY is not read as two YYs). Anything else is a literal; Moment escapes literals in [brackets], LDML in ‘quotes’. Each token is looked up in a table of meanings and rendered against the sample.
Translation
A token translates only when the other dialect has an exact counterpart with the same meaning and padding — %d ↔ DD ↔ dd, %V ↔ WW ↔ ww. Tokens without one (Moment’s Do ordinal, strftime’s %% or %c) are shown in ⟨brackets⟩ and listed, rather than approximated. Locale-dependent tokens render in English or the C locale form and are flagged: your runtime decides the real text.
Fixed offset, no zone names
The sample is rendered in UTC plus the offset you enter, so %z and Z are exact but %Z, z and zzz can only show the offset — zone abbreviations come from the runtime’s tz database, which the page does not carry. Nothing leaves the browser; the same four anonymous usage counts as the rest of the site apply.
SOURCES
Last reviewed 20 September 2026. How results are checked: How we verify.