Skip to main content

Languages and patterns

qddate ships a fixed set of languages. Coverage grows when someone adds a pattern table and tests — not by loading CLDR at runtime.

Supported languages​

CodeLanguageNotes
enEnglishNumeric cores, US mm/dd, weekdays, abbreviated months, dates without a year (May 5, 5 May), Sept. 5, 2022, Sep 5th 2022, 5-May-2022
deGermanFull, short, weekday, month-first
ruRussianNominative/genitive months, optional г. / года
esSpanishArticles (de), comma-year (03 de Julio, 2026)
frFrenchMonth names with accents
itItalianMonth names, weekdays
nlDutchFull and short months, weekdays
ptPortugueseArticles
plPolishNominative and genitive, optional dot after the day
czCzech (cs is accepted too)Nominative and genitive, day with a dot (5. května 2022)
bgBulgarianCyrillic month names
trTurkishMonth names, optional suffixes
roRomanianFull and CLDR-abbreviated months
ukUkrainianNominative, genitive, abbreviated
skSlovakNominative and genitive, day with a dot (5. mája 2022)

Language-neutral numeric patterns (ISO-like YYYY-MM-DD, dd.mm.yyyy, compact digits, and the Chinese, Japanese and Korean 2022年5月5日 / 2022년 5월 5일) live with the English table but are available regardless of month-name language. Their DateMatch.language is None.

How many patterns?​

The catalog is base patterns × generated variants (151 base patterns in the current tree). Each base date pattern can expand with a time after it (HH:MM or 14h30, HH:MM:SS, [HH:MM], the 12-hour clock), a time before it, and trailing-text forms. Counts on each language page are base patterns from qddate/patterns/*.py. Generated variants are produced at DateParser construction when generate=True.

Regenerate the per-language tables after pattern changes:

python scripts/generate_pattern_docs.py

Pattern flags​

  • Year Short: 2-digit years (24 → 2024-style handling in that pattern)
  • No Year: day-month only; parse() fills the year of reference= (the current year by default)
  • Filter: stricter prefix/length filtering (higher means more aggressive)

Format strings use strftime-style tokens (%d, %m, %Y, %y, %b). Length min/max bound which strings a pattern is even tried against.

Pages​

Pick a language in the sidebar, or start with English (numeric cores) and Russian / German for month-name examples.