Token Specification & Cross-Ecosystem Matrix
This document provides a comprehensive cross-reference matrix comparing date formatting and parsing tokens across Native Tempo Core and nine major ecosystem dialects:
- Unicode LDML / UTS #35 (
ldml– date-fns, Luxon, CLDR) - Moment.js / Day.js (
moment– Day.js, Moment) - POSIX
strftime(strftime– C, Pythondatetime, Ruby, Linux) - .NET / C# (
dotnet– C#, PowerShell, ASP.NET) - Excel / Google Sheets (
sheet– Spreadsheets, Calc) - MySQL / MariaDB (
mysql–DATE_FORMAT,STR_TO_DATE) - Oracle / PostgreSQL (
oracle–TO_CHAR,TO_DATE, Snowflake) - PHP
date()(php– Laravel, WordPress, Symfony) - Go
time.Format(go– Golang reference layouts)
1. Interactive Dialect Token Navigator
Select a dialect tab below to view all supported specifiers, their Native Tempo equivalents, copyable tags, and live code examples. Use the filter bar to quickly locate tokens by keyword (e.g., year, hour, ord, fractional, timezone).
| .NET / C# Token | Native Tempo Equivalent | Category | Description & Output Sample |
|---|---|---|---|
| yyyy | Year | 4-digit calendar year Sample: 2026 | |
| yyyyy | Year | 5-digit zero-padded year Sample: 02026 | |
| yy | Year | 2-digit year (00–99) Sample: 26 | |
| y | Year | Unpadded year (0–99) Sample: 26 | |
| MMMM | Month | Full month name Sample: October | |
| MMM | Month | Abbreviated month name Sample: Oct | |
| MM | Month | Zero-padded month (01–12) Sample: 10 | |
| M | Month | Unpadded month (1–12) Sample: 10 | |
| dddd | Weekday | Full weekday name Sample: Saturday | |
| ddd | Weekday | Abbreviated weekday name Sample: Sat | |
| dd | Day | Zero-padded day of month (01–31) Sample: 24 | |
| d | Day | Unpadded day of month (1–31) Sample: 24 | |
| HH | Hour | Zero-padded 24-hour (00–23) Sample: 15 | |
| H | Hour | Unpadded 24-hour (0–23) Sample: 15 | |
| hh | Hour | Zero-padded 12-hour (01–12) Sample: 03 | |
| h | Hour | Unpadded 12-hour (1–12) Sample: 3 | |
| mm | Minute | Zero-padded minute (00–59) Sample: 30 | |
| m | Minute | Unpadded minute (0–59) Sample: 30 | |
| ss | Second | Zero-padded second (00–59) Sample: 45 | |
| s | Second | Unpadded second (0–59) Sample: 45 | |
| fffffff | Fractional | 100-nanosecond ticks (7 digits) Sample: 1234567 | |
| ffffff | Fractional | Microseconds (6 digits) Sample: 123456 | |
| fff | Fractional | Milliseconds (3 digits) Sample: 123 | |
| tt | Hour | AM / PM designator Sample: PM | |
| t | Hour | A / P marker Sample: P | |
| zzz | Timezone | Hours and minutes offset with colon Sample: +08:00 | |
| zz / z | Timezone | Signed hour offset Sample: +08 | |
| K | Timezone | ISO 8601 offset representation (Z for UTC) Sample: +08:00 | |
| O / o | Other | Standard Round-trip ISO-8601 specifier Sample: 2026-10-24T15:30:45.1234567+08:00Standard .NET composite format specifier | |
| s | Other | Standard Sortable ISO specifier Sample: 2026-10-24T15:30:45Standard .NET composite format specifier | |
| u | Other | Universal sortable pattern Sample: 2026-10-24 15:30:45ZStandard .NET composite format specifier | |
| r / R | Other | RFC 1123 format specifier Sample: Sat, 24 Oct 2026 15:30:45 GMTStandard .NET composite format specifier |
2. Core Standards Comparison Matrix
For a high-level overview across the most common date-formatting paradigms, the table below highlights primary date and time components compared to Native Tempo:
| Component | Description | LDML / date-fns | Moment / Day.js | POSIX strftime | .NET / C# | Native Tempo |
|---|---|---|---|---|---|---|
| Year (4-digit) | 4-digit calendar year (2026) | yyyy | YYYY | %Y | yyyy | {yyyy} |
| Year (2-digit) | 2-digit calendar year (26) | yy | YY | %y | yy | {yy} |
| Week-Numbering Year | Week-numbering year (ISO via %G / GGGG; locale-dependent in LDML YYYY) | YYYY* | GGGG | %G | N/A | {yow} |
| Month (padded) | Zero-padded month (01–12) | MM | MM | %m | MM | {mm} |
| Month (raw) | Unpadded month (1–12) | M | M | %-m* | M | {mm:raw} |
| Month Name (short) | Abbreviated month (Oct) | MMM / LLL | MMM | %b | MMM | {mmm} |
| Month Name (full) | Full month name (October) | MMMM / LLLL | MMMM | %B | MMMM | {mon} |
| Day (padded) | Zero-padded day (01–31) | dd | DD | %d | dd | {dd} |
| Day (raw) | Unpadded day (1–31) | d | D | %-d* | d | {dd:raw} |
| Day (ordinal) | Ordinal suffix (24th) | N/A | Do | N/A | N/A | {dd:ord} |
| Day of Year | Day of year (001–366) | DDD | DDDD | %j | N/A | {doy} |
| Week of Year | Week number (01–53; ISO via %V / WW; locale-dependent in LDML ww) | ww* | WW | %V | N/A | {woy} |
| Weekday (full) | Full weekday (Saturday) | EEEE | dddd | %A | dddd | {wkd} |
| Weekday (short) | Abbreviated weekday (Sat) | EEE | ddd | %a | ddd | {www} |
| Weekday (numeric) | Numeric weekday (ISO 1=Mon..7=Sun via %u/E; locale-dependent 1-7 in LDML e/c) | e / c* | E | %u | N/A | {dow} |
| Hour (24h padded) | 24-hour clock (00–23) | HH | HH | %H | HH | {hh} |
| Hour (24h raw) | 24-hour clock unpadded (0–23) | H | H | %-H* | H | {hh:raw} |
| Hour (12h padded) | 12-hour clock (01–12) | hh | hh | %I | hh | {h12} |
| Hour (12h raw) | 12-hour clock unpadded (1–12) | h | h | %-I* | h | {h12:raw} |
| Meridiem (upper) | Uppercase indicator (AM / PM) | aa | A | %p | tt | {mer:upper} |
| Minute (padded) | Zero-padded minute (00–59) | mm | mm | %M | mm | {mi} |
| Second (padded) | Zero-padded second (00–59) | ss | ss | %S | ss | {ss} |
| Milliseconds | 3-digit fractional seconds (123) | SSS | SSS | %3f* | fff | {ms} |
| Microseconds | 6-digit fractional seconds (123456) | SSSSSS | SSSSSS* | %f* | ffffff | {ff:6} |
| Timezone Offset | Fixed offset with colon (+08:00) | ZZZZZ / XXX | Z | N/A | zzz | {tz:offset} |
| Timezone (Kind-based) | Dynamic offset or Z based on DateTime.Kind | N/A | N/A | N/A | K* | {tz:offset:utc} |
| Compact Offset | Portable offset without colon (+0800) | ZZ | ZZ | %z | N/A | {tz:offset:compact} |
| Timezone Abbreviation | Localized abbreviation (CET) | z | z | %Z | N/A | {tz:short} |
| Unix Epoch | Seconds since Unix epoch | N/A | X | %s* | N/A | {ts} |
NOTE
* Standard Variations & Extensions:
- LDML (
YYYY,ww,e,c): In Unicode UTS #35, week-numbering year, week of year, and numeric day of week reflect territory/locale calendar conventions; deterministic ISO 8601 behavior requires explicit ISO settings. - Moment / Day.js (
SSSSSS): Moment formats up to 3 fractional digits (milliseconds) and zero-pads additional digits; standard Day.js only formats up toSSSwithout plugins. - POSIX
strftime(%-m,%-H,%-I,%f,%s): Modifiers omitting padding (%-) and%s(seconds since Unix epoch) are GNU/BSD extensions not specified in the standard POSIXstrftimespecification;%zis the POSIX portable standard for compact offsets. POSIX does not specify subseconds;%fis Python's 6-digit microsecond specifier, while%3f,%6f, and%9fare Tempo extensions. - .NET
K: Unlike fixed-offsetzzz(+08:00),Kproduces an offset forDateTimeKind.Local,ZforDateTimeKind.Utc, and an empty string forDateTimeKind.Unspecified.
3. Literal Text Escaping Rules
When embedding plain text inside masks, each dialect implements distinct escaping conventions:
A. Unicode LDML & Luxon (ldml)
- Enclose text in single quotes:
'Date: ' yyyy-MM-dd. - To emit a literal single quote, use two consecutive single quotes:
''yyyy'''2026'.
const str = t.format("'Report generated on' yyyy-MM-dd 'at' HH:mm", { dialect: 'ldml' });
// => "Report generated on 2026-10-24 at 15:30"B. Moment.js & Day.js (moment)
- Enclose text in square brackets:
[Report generated on] YYYY-MM-DD. - Bare characters outside tokens remain literal text.
const str = t.format('[Invoice #] YYYY-MM-DD [due by] HH:mm', { dialect: 'moment' });
// => "Invoice # 2026-10-24 due by 15:30"C. POSIX strftime & MySQL (strftime, mysql)
- Characters not prefixed by
%are treated as literal text. - To emit a literal percent symbol, use
%%:%% %Y-%m-%d% 2026-10-24.
const str = t.format('%% Processed at %Y-%m-%d %H:%M:%S %%', { dialect: 'strftime' });
// => "% Processed at 2026-10-24 15:30:45 %"D. .NET / C# (dotnet)
- Enclose text in single quotes
'text'or double quotes"text". - Escape individual characters using a backslash
\.
const str = t.format("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fff", { dialect: 'dotnet' });
// => "2026-10-24T15:30:45.123"E. Excel / Google Sheets (sheet)
- Enclose arbitrary strings in double quotes:
"Order Date: " yyyy-mm-dd. - Escape individual characters using backslash
\. - Formatting decorators like
_(space reservation) and*(fill character) are ignored in standard parsing/formatting.
const str = t.format('"Total: $0.00 as of " mmmm d, yyyy', { dialect: 'sheet' });
// => "Total: $0.00 as of October 24, 2026"F. Native Tempo Core
- In Native Tempo syntax, tokens are enclosed in curly braces
{token}. Everything outside braces is literal text by default. - To emit a literal
{or}, use{{or}}:
const str = t.format('Total balance: ${0} as of {yyyy}-{mm}-{dd}', { dialect: null });
// => "Total balance: $0 as of 2026-10-24"4. Ecosystem-Specific Nuances
A. Context-Sensitive mm in Spreadsheets
In spreadsheet software (Excel, Google Sheets, Calc), the mask m or mm represents:
- Minutes when immediately preceded by an hour (
horhh) or immediately followed by a second (sorss), such ashh:mm:ss. - Months everywhere else, such as
yyyy-mm-ddormm/dd/yyyy.
Tempo's sheet dialect automatically inspects token neighbors during tokenization to guarantee accurate resolution without manual intervention.
B. Standard .NET Single-Character Specifiers
In .NET, single-letter format strings expand into standard system patterns:
Ooro: Round-trip ISO-8601 (yyyy-MM-ddTHH:mm:ss.fffffffK)s: Sortable date/time (yyyy-MM-ddTHH:mm:ss)u: Universal sortable (yyyy-MM-dd HH:mm:ssZ)rorR: RFC 1123 (ddd, dd MMM yyyy HH:mm:ss GMT)d/D: Short / Long datet/T: Short / Long time
Tempo compiles these specifiers directly into optimal matching pipelines.
C. Hour Normalization (24:00 Midnight)
When parsing 24-hour clocks, differing standards support 00-23 (HH, H) and 01-24 (kk, k):
- In Unicode LDML and Moment,
kkindicates hours from01to24. Hour24:00represents midnight at the close of day, which Temporal engines normalize to00:00. - The Dialects parser safely normalizes
24:00to hour0, while strictly rejecting out-of-range hours like25:00or00:00forkktokens:
const validMidnight = Tempo.fromFormat('2026-10-24 24:00', 'yyyy-MM-dd kk:mm');
console.log(validMidnight.hh); // 0 (normalized)
const invalidHour = Tempo.fromFormat('2026-10-24 25:00', 'yyyy-MM-dd kk:mm', { error: 'catch' });
console.log(invalidHour.isValid); // false