Locale Date and Time Patterns — with the four classic traps (JSON)
The structured date table plus the four traps worth their own test: day/month ambiguity in short dates, the RLM embedded in CLDR's Arabic pattern, quoted literal text inside the Russian pattern, and the localized day-period marker that a 12-hour formatter must not drop.
{
"note": "Assert on the pattern, the separator code points and the fraction-digit counts. The rendered example strings are illustrative: CLDR revises month abbreviations and spacing between releases, so a byte comparison against them will eventually fail for reasons that are not your bug.",
"instant": "2026-03-14T09:05:00",
"iso8601": "2026-03-14T09:05:00Z",
"locales": [
{
"locale": "en-US",
"patterns": {
"shortDate": "M/d/yy",
"mediumDate": "MMM d, y",
"shortTime": "h:mm a"
},
"hourCycle": "h12",
"examples": {
"shortDate": "3/14/26",
"mediumDate": "Mar 14, 2026",
"shortTime": "9:05 AM"
}
},
{
"locale": "en-GB",
"patterns": {
"shortDate": "dd/MM/y",
"mediumDate": "d MMM y",
"shortTime": "HH:mm"
},
"hourCycle": "h23",
"examples": {
"shortDate": "14/03/2026",
"mediumDate": "14 Mar 2026",
"shortTime": "09:05"
}
},
{
"locale": "de-DE",
"patterns": {
"shortDate": "dd.MM.yy",
"mediumDate": "dd.MM.y",
"shortTime": "HH:mm"
},
"hourCycle": "h23",
"examples": {
"shortDate": "14.03.26",
"mediumDate": "14.03.2026",
"shortTime": "09:05"
}
},
{
"locale": "fr-FR",
"patterns": {Specifications
- Locales
- 10
- Traps
- 4
- Instant
- 2026-03-14T09:05:00
- Assert On
- patterns, not rendered prose
- Hour Cycles
- h12, h23
- Seed
- 20260807
- Wave
- p7
- Line Endings
- LF
Testing contract
Reference control- Scenario
- Drive an Intl.DateTimeFormat / ICU comparison from the `locales` array and assert each entry in `traps` on its own.
- Expected result
- 03/04/2026 parses to two different dates under en-GB and en-US, and a formatter that treats every letter in a pattern as a field turns ru-RU's quoted 'г'. into date fields.
What is a .json file?
JSON (JavaScript Object Notation) is a lightweight, text-based data-interchange format representing objects, arrays, strings, numbers, booleans, and null. It is language-independent, human-readable, and the dominant format for web APIs and configuration. It requires a single well-formed root value.
How to use this file
Use an example JSON file to test parsers and serializers, schema validation, Unicode and number-precision handling, and API request or response processing.
How to use this file for testing
“Locale Date and Time Patterns — with the four classic traps (JSON)” is a deterministic Novus Examples fixture for Internationalization, JSON parsing, Localization catalogs. Parallel text and accented, multi-script content — for testing translation pipelines, Unicode handling, and localization tooling.
Documented properties for this file: seed 20260807 · LF. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Translation-catalog fixtures carry the same message set across formats, each with its native placeholder syntax. Test your i18n loader, catalog converter, or translation-memory tool, and use the RTL and CJK variants to check bidirectional text and Unicode handling.
Load the catalog with your i18n framework and verify placeholder interpolation and plural handling; the RTL and CJK variants exercise bidirectional text and font fallback.
Code examples
import json
with open("date-time-formats.json") as f:
data = json.load(f)
print(type(data), len(data))Related files
- jsonNon-Gregorian Calendar Eras — Japanese, ROC, Buddhist, Hijri, HebrewEra and era-year for one instant across five calendar systems. The three whose months and days align with the Gregorian calendar — Japanese (Reiwa 8), ROC (Minguo 115) and Thai Buddhist (2569) — carry a full rendered date; the Hijri and Hebrew entries carry the year only, because their day and month depend on the calculation variant and, for Hijri, on observation. Saying so is the point of the fixture.

- jsonBidi Isolates — UI templates for user-supplied namesThree notification templates in English, Arabic and Hebrew, each given raw and with every interpolation slot wrapped in FSI…PDI, plus four argument sets covering an LTR name in an RTL sentence, an RTL name in an LTR sentence and a name beginning with a neutral character. This is the fixture for the bug where a display name reorders the sentence around it.

- jsonCLDR Plural Rules — Arabic (6 categories)Arabic CLDR cardinal and ordinal plural rules with the exact integer samples that select each category, the equivalent gettext Plural-Forms expression, and a note on the trap the language exposes: a catalog written with only one/other silently renders 'many' counts (11-99) with the singular noun form.

- jsonCLDR Plural Rules — English (2 categories)English CLDR cardinal and ordinal plural rules with the exact integer samples that select each category, the equivalent gettext Plural-Forms expression, and a note on the trap the language exposes: '1.

- jsonCLDR Plural Rules — Japanese (1 category)Japanese CLDR cardinal and ordinal plural rules with the exact integer samples that select each category, the equivalent gettext Plural-Forms expression, and a note on the trap the language exposes: japanese needs exactly one form; a pipeline that requires a 'one' key produces a catalog no japanese translator can fill in meaningfully.

- jsonCLDR Plural Rules — Polish (4 categories)Polish CLDR cardinal and ordinal plural rules with the exact integer samples that select each category, the equivalent gettext Plural-Forms expression, and a note on the trap the language exposes: cldr gives polish four categories but the traditional gettext header gives it three — gettext folds cldr 'many' and 'other' together because its rule takes an integer n and never sees v.

Generated by generation/localization_p7.py. Free for any use, no attribution required — license.