# Abbreviated Month Date

Key: `datetime.date.abbreviated_month`

Date with an abbreviated month name, month-first (Feb 4, 2023) or day-first (4 Feb 2023, 4 Feb 23). Locale-specific because month abbreviations vary by language (Jan vs janv. vs ene). The month token is any run of three or more Latin letters with an optional full stop, which takes the abbreviations of Unicode CLDR in en (Feb), en-GB (Sept), fr (janv.) and the other locales, and the dotted AP-style form (Feb. 4, 2023).

Page: <https://meridian.online/docs/finetype/types/datetime/date/abbreviated_month>

Format: `%b %d, %Y`

Samples: `Jan 15, 2024`, `15 Jan 2024`, `Dec 31, 2019`

## Use it

Shell

```shell
finetype infer -i 'Jan 15, 2024' --mode column
# → datetime.date.abbreviated_month
```

DuckDB

```sql
SELECT ft_infer('Jan 15, 2024');
-- → 'datetime.date.abbreviated_month'
```

Cast template: {col} is your column

```sql
strptime(regexp_replace({col}, '\bSept\b', 'Sep'), ['%b %d, %Y', '%b. %d, %Y', '%d %b %y', '%d %b. %y', '%d %b %Y', '%d %b. %Y'])::DATE
-- Format: %b %d, %Y
```

## Written by

Each locale below writes this format with its CLDR date pattern at the styles named beside it.

`en` medium · `en` (AS, BI, CA, GU, MH, MP, PH, PR, UM, VI) medium

## Background

### Origin

In POSIX strftime, the %b conversion specifier is replaced by the locale's abbreviated month name.[[1]](https://pubs.opengroup.org/onlinepubs/9799919799/functions/strftime.html) POSIX defines %h as equivalent to %b.[[1]](https://pubs.opengroup.org/onlinepubs/9799919799/functions/strftime.html)

RFC 5322, the Internet Message Format, defines the date in a message header as a day, then a month, then a year.[[2]](https://www.rfc-editor.org/rfc/rfc5322) RFC 5322 restricts the month to twelve three-letter English names, from Jan to Dec.[[2]](https://www.rfc-editor.org/rfc/rfc5322)

Unicode's LDML date pattern syntax writes the abbreviated month as MMM, with Sep as its example.[[3]](https://www.unicode.org/reports/tr35/tr35-dates.html) In the CLDR data for the en locale, the medium date format is MMM d, y.[[4]](https://raw.githubusercontent.com/unicode-org/cldr-json/main/cldr-json/cldr-dates-full/main/en/ca-gregorian.json) CLDR's en-GB locale uses d MMM y as its medium date format instead.[[5]](https://raw.githubusercontent.com/unicode-org/cldr-json/main/cldr-json/cldr-dates-full/main/en-GB/ca-gregorian.json)

### Use

Wikipedia's article on United States date notation says that in traditional American usage, dates are written in month–day–year order.[[6]](https://en.wikipedia.org/wiki/Date_and_time_notation_in_the_United_States)

## Sources

1. [strftime](https://pubs.opengroup.org/onlinepubs/9799919799/functions/strftime.html) — standard
2. [RFC 5322: Internet Message Format](https://www.rfc-editor.org/rfc/rfc5322) — standard
3. [Unicode Locale Data Markup Language (LDML) Part 4: Dates](https://www.unicode.org/reports/tr35/tr35-dates.html) — standard
4. [ca-gregorian.json](https://raw.githubusercontent.com/unicode-org/cldr-json/main/cldr-json/cldr-dates-full/main/en/ca-gregorian.json) — dataset
5. [ca-gregorian.json](https://raw.githubusercontent.com/unicode-org/cldr-json/main/cldr-json/cldr-dates-full/main/en-GB/ca-gregorian.json) — dataset
6. [Date and time notation in the United States](https://en.wikipedia.org/wiki/Date_and_time_notation_in_the_United_States) — secondary source

## How it's detected

The month token is letter-based, so French and other non-English abbreviations are recognised but not castable: the transform uses DuckDB strptime, whose %b reads English month names, so a column of 4 janv. 2023 validates and stays text. The transform first rewrites Sept (en-GB) to Sep. The rule also accepts two forms the transform cannot cast: a day with a full stop before the month (4. Feb 2023) and a month-first date with no comma (Feb 4 2023); both validate and stay text. For discrimination (column typing), a value counts only when its month token is a Unicode CLDR abbreviated month for one of the Latin-script locales above (4 Feb 2023, 4 janv. 2023, 4 ene 2023); full month names (4 February 2023) and ordinary words (Room 12, 2023) fit the rule's shape but are not counted. AP style spells out March to July; a spelled-out March, April, June or July, month-first (March 4, 2023) or day-first (4 March 2023), is long\_full\_month's form and is not counted here, so an AP column counts its abbreviated months (Feb. 4, 2023) and May, which is its own abbreviation. The rule's letters stop at Latin-1, so the Czech and Polish abbreviations with letters outside it (bře, kvě, čvn, čvc, zář, říj, paź) are not accepted yet.
