MeridianMERIDIAN

YMD Date (slash-separated)

datetime.date.ymd_slash

Year/Month/Day with slash separators. Unambiguous due to year-first ordering. CLDR ja-JP short format; standard in Japanese and Taiwanese CSV exports.

Worked samples

DuckDB 1.5.5 · finetype 0.6.64

ValueAs DATE
2024/01/152024-01-15
2023/12/312023-12-31
2000/06/012000-06-01
%Y
four-digit year
%m
month, two digits
%d
day of month, two digits

Written by

CLDR 46 via finetype 0.6.64

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

en (ZA) short

Shape

Pattern
^\d{4}/\d{2}/\d{2}$
ValueLengthShape
2024/01/1510matches
2023/12/3110matches
2000/06/0110matches
2024/01/19rejected: one character short

Background

Origin

ISO 8601 uses the hyphen as the separator between the year, month and day of a date.[1] The first edition of ISO 8601 was published as ISO 8601:1988 in June 1988.[1] In ISO 8601, a solidus, /, is usually the designator that separates the two values of a time interval.[1]

Wikipedia's article on Japanese date notation says the most commonly used date format in Japan is year, month, day, followed by the weekday.[2] Wikipedia's article on Japanese date notation shows the Gregorian all-numeric date in Japan written year/month/day with slashes.[2] Unicode's CLDR locale data gives y/MM/dd as both the short and the medium Gregorian date pattern for Japanese (ja).[3] CLDR gives y/MM/dd as the short Gregorian date pattern for South African English (en-ZA).[4] Wikipedia's list of date formats by country gives yyyy/mm/dd as one of the English-language date formats in South Africa.[5] Wikipedia's list of date formats by country gives yyyy/(m)m/(d)d and yyyy-mm-dd as short date formats in Taiwan.[5] Wikipedia's list of date formats by country gives yyyy/mm/dd as the date format for Basque in Spain.[5] Wikipedia's list of date formats by country gives yyyy/mm/dd as the short format in Iran for dates in the Persian calendar.[5]

Use

In CLDR's date pattern language, the length of the y field specifies the minimum number of digits for the year in most cases.[6] CLDR's short Gregorian date pattern for Traditional Chinese (zh-Hant) is y/M/d.[7] Wikipedia's list of date formats by country gives (yy)yy/(m)m/(d)d, with or without leading zeroes, among the casual date forms used in China.[5] The Japanese Ministry of Health, Labour and Welfare's open-data CSV of newly confirmed COVID-19 cases writes its dates in the form 2020/1/16, without leading zeros.[8]

Python's datetime documentation notes that, when used with strptime(), the leading zero is optional for %d and %m.[9] If a column must hold strictly padded dates, check the text against a fixed ten-character pattern before casting, rather than relying on the parser to reject the short forms. (Meridian's view)

Detection notes

New in format coverage expansion. High prevalence in East Asian data.

Use it

CLI · DuckDB
$ finetype infer -i "2024/01/15" --mode column
→ datetime.date.ymd_slash

SELECT ft_infer('2024/01/15');
-- → 'datetime.date.ymd_slash'
Cast expression
strptime({col}, '%Y/%m/%d')::DATE
-- Format: %Y/%m/%d

Schema

https://meridian.online/schemas/datetime.date.ymd_slash · Frictionless type date · %Y/%m/%d

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

Type Registry