One pattern, read by five formatters: UTS 35 (CLDR 48.2 week data), date-fns 4.x, moment 2.x, POSIX strftime and .NET custom format strings. See what each prints for your date and region, then get the same meaning written in each dialect, checked by a live round trip.
YYYY-MM-dd, %G-W%V-%u, gggg-[W]ww or dd MMM yyyy.
The literal pattern above is tokenized by each formatter. Each chip shows the token, what it means in that dialect, and what it printed.
The source pattern is parsed into fields. Each field is written in every other dialect. A field with no equivalent is named, never dropped. The round trip renders source and translation with this page's engines on every day from 2020-01-01 to 2030-12-31, once at 12:00:00.000 and once with the time of day stepped through all 24 hours, and counts how many outputs match.
| Dialect | Pattern | Prints now | Round trip | Notes |
|---|
Computed for the rules picked above. Every day of that year whose week-based year differs from its calendar year is listed. Nothing here is a hardcoded list.
Runs on load and on demand. Fixtures were measured on real engines; oracles are recomputed here. A positive control must fail and be reported as detected.
j, J and C are skeleton-only and must not occur in patterns. Week rules come from CLDR 48.2 weekData (firstDay and minDays); entries with alt="variant" are ignored. Only a region with a Monday first day AND minDays 4 behaves like ISO 8601: PT and IS have minDays 4 but start weeks on Sunday. Names are CLDR English.D, DD, YY or YYYY throw RangeError unless the matching opt-in flag is set. Any other run of Y or D only warns and still formats. An unescaped latin letter that is not a formatter throws RangeError while tokenizing, before that check. P and p expand with the enUS long formats.e is 0-based; UTS 35 e is 1-based. moment 2.31.0 (published to npm 2026-09-15) adds an eHHmm token; its output equals e followed by HHmm.%G, %g and %V are ISO 8601. %U counts from the first Sunday and %W from the first Monday; earlier days are week 00. The 0 and + flags with a minimum field width are POSIX.1-2024, for %C %F %G %Y only. -, _ and ^ are glibc extensions; # is an MSVC extension. %e is space padded, so it is not the same as an unpadded day.d prints a short date and a lone h throws FormatException; write %d or %h for the custom specifier. Characters that are not specifiers are copied unchanged, which is why YYYY and DD echo. There is no week-year and no day-of-year specifier (System.Globalization.ISOWeek is an API, not a format letter).DateTimeFormatter documents Y as week-based-year, u as year, y as year-of-era, D as day-of-year (up to three letters), e and c as localized day-of-week, n as nano-of-second, [ ] as optional sections, and all A to Z and a to z as reserved. Its older SimpleDateFormat documents u as day number of week (1 = Monday, ..., 7 = Sunday). Apple's archived Data Formatting Guide says DateFormatter uses the format patterns from UTS 35, with the version varying by operating system release.z Z O v V X x, date-fns X x O z, moment Z ZZ z zz, strftime %z %Z, .NET z zz zzz), timestamps, and W F g U b B are recognized and named but print a placeholder, because their value depends on a time zone or on data this page does not carry. All arithmetic uses the wall-clock time you typed, with UTC date math, so no daylight-saving shift can creep in.Sources: UTS 35 Part 4 (Dates) and Part 1, version 48.2; CLDR release-48-2 supplementalData.xml and en.xml; POSIX.1-2024 strftime and the POSIX locale (XBD 7.3.5); the glibc manual, Formatting Calendar Time; Microsoft Learn pages for MSVC strftime and .NET custom and standard date and time format strings; the moment docs and its 2.30.1 source; the date-fns 4.4.0 package; Java SE 25 DateTimeFormatter and SimpleDateFormat; Apple's archived Data Formatting Guide. Every link is listed in the README.