Abbreviated Month Year
datetime.date.month_year_abbrevAbbreviated month name followed by 4-digit year. No day component. Financial dashboards, CLDR yMMM skeleton.
Operations on this type: Parse a date or time
Try a value
Abbreviated Month Year's rule accepts it.
Reads it as 2024-03-01
Use it
finetype infer -i 'Jan 2024' --mode column
# → datetime.date.month_year_abbrevSELECT ft_infer('Jan 2024');
-- → 'datetime.date.month_year_abbrev'strptime('01 ' || upper(substr({col}, 1, 1)) || lower(substr({col}, 2, 2)) || ' ' || substr({col}, length({col}) - 3), '%d %b %Y')::DATE
-- Format: %b %YHow finetype reads the samples
DuckDB 1.5.5 · finetype 0.6.66
| Value | As DATE |
|---|---|
| Jan 2024 | 2024-01-01 |
| Dec 2023 | 2023-12-01 |
| Jun 2000 | 2000-06-01 |
| JAN 2024 | 2024-01-01 |
| Sept 2026 | 2026-09-01 |
| June 2026 | 2026-06-01 |
- %b
- abbreviated month name
- %Y
- four-digit year
Pattern
^(?:Jan|JAN|Feb|FEB|Mar|MAR|Apr|APR|May|MAY|June?|JUNE?|July?|JULY?|Aug|AUG|Sept?|SEPT?|Oct|OCT|Nov|NOV|Dec|DEC) \d{4}$| Value | Length | Shape |
|---|---|---|
| Jan 2024 | 8 | matches |
| Dec 2023 | 8 | matches |
| Jun 2000 | 8 | matches |
| JAN 2024 | 8 | matches |
| Sept 2026 | 9 | matches |
| June 2026 | 9 | matches |
| Jan 202 | 7 | rejected: one character short |
Background
Origin
The Unicode Consortium's LDML specification describes date formats by skeletons, which contain only field information in a canonical order.[1] In the LDML date field symbol table, the pattern MMM stands for the abbreviated month name, with Sep as its example.[1] The LDML specification lists yMMM among its example available formats, mapped to the pattern MMM yyyy.[1] In CLDR's English Gregorian calendar data, the yMMM skeleton is given the pattern MMM y.[2] CLDR's English abbreviated month names are Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov and Dec.[2]
Use
For Python's datetime.strptime, any component not given in the format string is taken from the default 1900-01-01T00:00:00.000.[3]
Sources
- [1]Unicode Locale Data Markup Language (LDML) Part 4: Datesstandard
- [2]ca-gregorian.jsondataset
- [3]datetime — Basic date and time typesdocumentation
How it's detected
Financial dashboards, CLDR yMMM skeleton. The twelve months in title or upper case (Jan, JAN), plus the longer forms Sept, June and July that the US BLS writes. The transform reads the first letter in upper case, the next two in lower case and the final four digits, so Sept, June and July all read as Sep, Jun and Jul. format_string and the frictionless format (%b) cover the three-letter title-case form only; Sept, June, July and upper case parse through the transform. Full month names (January 2024) are not this type; they are month_year_full.
Schema
https://meridian.online/schemas/datetime.date.month_year_abbrev · Frictionless type date · %b %Y
finetype taxonomy datetime.date.month_year_abbrev -o json-schema