Token Mapping
This table shows how each dialect spells every canonical field. Each row is one canonical field, and each column is a dialect. For a dialect’s full grammar, literals, aliases, and caveats, see its page under Dialects.
An em dash means the dialect has no token for that field. Converting that field into the dialect
has no clean target, so it is routed through onUnsupportedToken
(default: escaped as a literal). Each new dialect adds one column rather than a pairwise table.
Behaviour specific to a concrete tool (e.g. extensions, unrenderable tokens, option-gated tokens) lives in Libraries; the tokens below are the dialect grammars themselves.
Era & year
| Meaning | moment | ldml | strftime |
|---|---|---|---|
| Era, abbreviated | N | GGG | — |
| Era, wide | NNNN | GGGG | — |
| Era, narrow | NNNNN | GGGGG | — |
| Calendar year | YYYY | yyyy | %Y |
| Calendar year, 2-digit | YY | yy | %y |
| Century, 2-digit | — | — | %C |
| Local week-numbering year | gggg | YYYY | — |
| Local week-numbering year, 2-digit | gg | YY | — |
| ISO week-numbering year | GGGG | — | %G |
| ISO week-numbering year, 2-digit | GG | — | %g |
Month & quarter
| Meaning | moment | ldml | strftime |
|---|---|---|---|
| Quarter | Q | Q | — |
| Quarter, 2-digit | — | QQ | — |
| Quarter, ordinal | Qo | — | — |
| Quarter, abbreviated | — | QQQ | — |
| Quarter, wide | — | QQQQ | — |
| Quarter, narrow | — | QQQQQ | — |
| Quarter, abbreviated, stand-alone | — | qqq | — |
| Quarter, wide, stand-alone | — | qqqq | — |
| Quarter, narrow, stand-alone | — | qqqqq | — |
| Month | M | M | %-m |
| Month, 2-digit | MM | MM | %m |
| Month, space-padded | — | — | %_m |
| Month, ordinal | Mo | — | — |
| Month, abbreviated | MMM | MMM | %b |
| Month, wide | MMMM | MMMM | %B |
| Month, narrow | — | MMMMM | — |
| Month, abbreviated, stand-alone | — | LLL | — |
| Month, wide, stand-alone | — | LLLL | — |
| Month, narrow, stand-alone | — | LLLLL | — |
Week & day
| Meaning | moment | ldml | strftime |
|---|---|---|---|
| Local week of year | w | w | — |
| Local week of year, 2-digit | ww | ww | — |
| Local week of year, ordinal | wo | — | — |
| ISO week of year | W | — | %-V |
| ISO week of year, 2-digit | WW | — | %V |
| ISO week of year, space-padded | — | — | %_V |
| ISO week of year, ordinal | Wo | — | — |
| Day of month | D | d | %-d |
| Day of month, 2-digit | DD | dd | %d |
| Day of month, space-padded | — | — | %e |
| Day of month, ordinal | Do | — | — |
| Day of year | DDD | D | %-j |
| Day of year, 2-digit | — | DD | — |
| Day of year, 3-digit | DDDD | DDD | %j |
| Day of year, space-padded | — | — | %_j |
| Day of year, ordinal | DDDo | — | — |
Weekday
| Meaning | moment | ldml | strftime |
|---|---|---|---|
| Weekday, abbreviated | ddd | EEE | %a |
| Weekday, wide | dddd | EEEE | %A |
| Weekday, narrow | — | EEEEE | — |
| Weekday, short | dd | EEEEEE | — |
| Weekday, abbreviated, stand-alone | — | ccc | — |
| Weekday, wide, stand-alone | — | cccc | — |
| Weekday, narrow, stand-alone | — | ccccc | — |
| Weekday, short, stand-alone | — | cccccc | — |
| Weekday, number (locale) | d | e | %w |
| Weekday, number (locale), 2-digit | — | ee | — |
| Weekday, number (ISO) | E | — | %u |
Day period & time
| Meaning | moment | ldml | strftime |
|---|---|---|---|
| AM/PM | A | a | %p |
| AM/PM, lowercase | a | — | %P |
| AM/PM, wide | — | aaaa | — |
| AM/PM, narrow | — | aaaaa | — |
| Day period + noon/midnight | — | b | — |
| Day period + noon/midnight, wide | — | bbbb | — |
| Day period + noon/midnight, narrow | — | bbbbb | — |
| Flexible day period | — | B | — |
| Flexible day period, wide | — | BBBB | — |
| Flexible day period, narrow | — | BBBBB | — |
| Hour 1–12 | h | h | %-I |
| Hour 1–12, 2-digit | hh | hh | %I |
| Hour 1–12, space-padded | — | — | %l |
| Hour 0–23 | H | H | %-H |
| Hour 0–23, 2-digit | HH | HH | %H |
| Hour 0–23, space-padded | — | — | %k |
| Hour 1–24 | k | k | — |
| Hour 1–24, 2-digit | kk | kk | — |
| Hour 0–11 | — | K | — |
| Hour 0–11, 2-digit | — | KK | — |
| Minute | m | m | %-M |
| Minute, 2-digit | mm | mm | %M |
| Minute, space-padded | — | — | %_M |
| Second | s | s | %-S |
| Second, 2-digit | ss | ss | %S |
| Second, space-padded | — | — | %_S |
| Fractional second (1–3 digits) | S SS SSS | S SS SSS | — |
Time zone & epoch
| Meaning | moment | ldml | strftime |
|---|---|---|---|
| Time-zone name | z | zzz | %Z |
Offset, ±hh:mm | Z | xxx | — |
Offset, ±hhmm | ZZ | xx | %z |
Offset, ±hh:mm, Z at zero | — | XXX | — |
Offset, ±hhmm, Z at zero | — | XX | — |
| Unix timestamp, seconds | X | — | %s |
| Unix timestamp, milliseconds | x | — | — |
The ldml dialect itself defines no Unix-epoch tokens, ISO week fields, or ordinals. Libraries can
add them; for example, date-fns adds t and T for the epoch. A dialect → dialect conversion
literalizes those fields. See Libraries.
Localized presets
These render per the library’s loaded locale and map preset → preset. Not every dialect defines
them: where a column shows — here, the presets are supplied by a library layered on that dialect
(e.g. dateFns over ldml), not by the bare dialect itself. See
Libraries → Localized presets.
| Meaning | moment | ldml | strftime |
|---|---|---|---|
| Date, short | L | — | %x |
| Date, medium | ll | — | — |
| Date, long | LL | — | — |
| Time, short | LT | — | — |
| Time, with seconds | LTS | — | %X |
| Date + time, medium | lll | — | — |
| Date + time, long | LLL | — | — |
| Date + time, full | LLLL | — | %c |
Aliases & caveats
Each dialect page documents its extra spellings and grammar-specific quirks such as numbering and casing: