MeridianMERIDIAN

Full Month Year

datetime.date.month_year_full

Full month name followed by 4-digit year. No day component. Financial reports, government statistical publications.

Operations on this type: Parse a date or time

Try a value

Full Month Year's rule accepts it.

Reads it as 2024-03-01

Use it

Shell
finetype infer -i 'January 2024' --mode column
# → datetime.date.month_year_full
DuckDB
SELECT ft_infer('January 2024');
-- → 'datetime.date.month_year_full'
Cast template: {col} is your column
strptime('01 ' || {col}, '%d %B %Y')::DATE
-- Format: %B %Y

How finetype reads the samples

DuckDB 1.5.5 · finetype 0.6.66

ValueAs DATE
January 20242024-01-01
December 20232023-12-01
June 20002000-06-01
%B
full month name
%Y
four-digit year

Pattern

Length 8 to 14 characters.

Regular expression
^[A-Z][a-z]+ \d{4}$
ValueLengthShape
January 202412matches
December 202313matches
June 20009matches
January 20211rejected: one character short

Similar types

Going the other way, this type's own rule accepts 1 of 6 samples of Abbreviated Month Year.

Background

Origin

POSIX.1-2024 defines %B as being replaced by the locale's full month name.[1] The POSIX.1-2024 rationale notes that %Y was frequently assumed to be a four-digit year, although the ISO C standard does not restrict it that way.[1]

The Grammarphobia Blog advises that no comma is needed when only the month and year are given, as in March 2009.[2]

Use

A month-and-year value names a whole calendar month, not a day, so treat it as a period rather than a date that happens to lack its day. (Meridian's view) Because the month name follows the locale, check which language a file was written in before you parse it, and fix the parsing locale rather than trusting the machine's default. (Meridian's view) DuckDB's date format functions list %B as the full month name, with examples January, February, ….[3]

Python's time.strptime fills missing data with the default values (1900, 1, 1, 0, 0, 0, 0, 1, -1) when more accurate values cannot be inferred.[4] A parser that silently supplies the first of the month is convenient, but record that the day was invented, so nobody later reads 2024-01-01 as an event on New Year's Day. (Meridian's view) ISO 8601 allows a calendar date to be written with reduced precision, so that 2004-05 indicates May 2004.[5] The Wikipedia article on ISO 8601 notes that a reduced-precision value such as 2004-05 will never represent the 5th day of an unspecified month in 2004.[5] When you store the value, consider the reduced-precision ISO form YYYY-MM, which keeps the month without inventing a day. (Meridian's view)

Where you'll meet it

The Census Bureau's text file of combined seasonal, trading-day and holiday adjustment factors for retail sales labels its monthly columns in a shorter form, such as Jul 25 and Aug 25.[6] A publisher may write the full form in its releases and a shorter form in its data files, so map both to the same month before joining them. (Meridian's view)

How it's detected

Financial reports, gov statistics.

Schema

https://meridian.online/schemas/datetime.date.month_year_full · Frictionless type date · %B %Y

finetype taxonomy datetime.date.month_year_full -o json-schema

Type Registry