# DMY Date with Abbreviated Month (space-separated)

Key: `datetime.date.dmy_space_abbrev`

Day Month-Abbr Year with space separators. Unambiguous due to named month. RFC 2822 date portion, military/NATO records, PostgreSQL to\_char.

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

Format: `%d %b %Y`

Samples: `15 Jan 2024`, `31 Dec 2023`, `1 Jun 2000`

## Use it

Shell

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

DuckDB

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

Cast template: {col} is your column

```sql
strptime({col}, '%d %b %Y')::DATE
-- Format: %d %b %Y
```

## Written by

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

`en` (AE) medium · `naq` medium

## Background

### Origin

RFC 822 defines a date as a one- or two-digit day, a month and a two-digit year, with the example 20 Jun 82.[[1]](https://www.rfc-editor.org/rfc/rfc822) RFC 822 lists the months as the three-letter abbreviations Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov and Dec.[[1]](https://www.rfc-editor.org/rfc/rfc822)

RFC 1123, published in October 1989, changed the date syntax of RFC 822 to allow a year of two to four digits.[[2]](https://www.rfc-editor.org/rfc/rfc1123.txt) RFC 1123 says all mail software SHOULD use 4-digit years in dates, to ease the transition to the next century.[[2]](https://www.rfc-editor.org/rfc/rfc1123.txt)

In RFC 2822 the day is one or two digits and the year is four or more digits.[[3]](https://www.rfc-editor.org/rfc/rfc2822) RFC 2822 says the year is any numeric year 1900 or later.[[3]](https://www.rfc-editor.org/rfc/rfc2822) RFC 5322, published in October 2008, obsoletes RFC 2822.[[4]](https://www.rfc-editor.org/rfc/rfc5322) RFC 5322 requires the numeric day-of-month to be between 1 and the number of days allowed for the specified month in the specified year.[[4]](https://www.rfc-editor.org/rfc/rfc5322)

### Use

In PostgreSQL's to\_char templates, Mon is the abbreviated capitalised month name, three characters in English.[[5]](https://www.postgresql.org/docs/current/functions-formatting.html) PostgreSQL's DD template pattern writes the day of month as 01 to 31.[[5]](https://www.postgresql.org/docs/current/functions-formatting.html) PostgreSQL's FM prefix suppresses the leading zeroes and padding blanks that would otherwise make a pattern's output fixed-width.[[5]](https://www.postgresql.org/docs/current/functions-formatting.html) PostgreSQL's to\_date ignores letter case in the input, so MON, Mon and mon all accept the same strings.[[5]](https://www.postgresql.org/docs/current/functions-formatting.html)

Python's documentation notes that when %d is used with strptime, the leading zero is optional.[[6]](https://docs.python.org/3/library/datetime.html) Because the day may or may not carry a leading zero, a column can hold both 01 Jun 2000 and 1 Jun 2000, and a parser should accept both. (Meridian's view) The month names are the fragile part: pin the parser to English month abbreviations rather than relying on the machine's locale. (Meridian's view) A date with a spelled-out month cannot be misread as month-first or day-first, which makes it a sensible choice for files read by people in different countries. (Meridian's view) Watch for a two-digit-year cousin, such as 20 Jun 82, which needs a century decided before it can be cast. (Meridian's view)

## Sources

1. [RFC 822: Standard for the Format of ARPA Internet Text Messages](https://www.rfc-editor.org/rfc/rfc822) — standard
2. [RFC 1123: Requirements for Internet Hosts -- Application and Support](https://www.rfc-editor.org/rfc/rfc1123.txt) — standard
3. [RFC 2822: Internet Message Format](https://www.rfc-editor.org/rfc/rfc2822) — standard
4. [RFC 5322: Internet Message Format](https://www.rfc-editor.org/rfc/rfc5322) — standard
5. [PostgreSQL: Documentation: 18: 9.8. Data Type Formatting Functions](https://www.postgresql.org/docs/current/functions-formatting.html) — documentation
6. [datetime — Basic date and time types](https://docs.python.org/3/library/datetime.html) — documentation

## How it's detected

RFC 2822 date portion, military/NATO.
