Weekday DMY Full (formal)
datetime.date.weekday_dmy_fullFull weekday name, Day FullMonth Year. Unambiguous due to named components. CLDR en-GB/fr-FR full format, formal correspondence.
Operations on this type: Parse a date or time
Try a value
Weekday DMY Full (formal)'s rule accepts it.
Reads it as 2024-03-04
Use it
finetype infer -i 'Monday, 15 January 2024' --mode column
# → datetime.date.weekday_dmy_fullSELECT ft_infer('Monday, 15 January 2024');
-- → 'datetime.date.weekday_dmy_full'strptime({col}, '%A, %d %B %Y')::DATE
-- Format: %A, %d %B %YHow finetype reads the samples
DuckDB 1.5.5 · finetype 0.6.66
| Value | As DATE |
|---|---|
| Monday, 15 January 2024 | 2024-01-15 |
| Sunday, 31 December 2023 | 2023-12-31 |
| Saturday, 1 June 2024 | 2024-06-01 |
- %A
- full weekday
- %d
- day of month, two digits
- %B
- full month name
- %Y
- four-digit year
Written by
CLDR 46 via finetype 0.6.66
Each locale below writes this format with its CLDR date pattern at the styles named beside it.
en (001, 150, AE, AG, AI, AT, AU, BB, BE, BM, BS, BW, BZ, CC, CH, CK, CM, CX, CY, DE, DG, DK, DM, ER, FI, FJ, FK, FM, GB, GD, GG, GH, GI, GM, GY, HK, ID, IL, IM, IN, IO, JE, JM, KE, KI, KN, KY, LC, LR, LS, MG, MO, MS, MT, MU, MW, MY, NA, NF, NG, NL, NR, NU, NZ, PG, PK, PN, PW, RW, SB, SC, SD, SE, SG, SH, SI, SL, SS, SX, SZ, TC, TK, TO, TT, TV, TZ, UG, VC, VG, VU, WS, ZA, ZM, ZW) full
Pattern
Length 22 to 32 characters.
^[A-Z][a-z]+, [0-3]?\d [A-Z][a-z]+ \d{4}$| Value | Length | Shape |
|---|---|---|
| Monday, 15 January 2024 | 23 | matches |
| Sunday, 31 December 2023 | 24 | matches |
| Saturday, 1 June 2024 | 21 | matches |
| Monday, 15 January 202 | 22 | rejected: one character short |
Background
Origin
The Unicode Common Locale Data Repository (CLDR) gives the full date format for British English (en-GB) as the pattern EEEE, d MMMM y.[1] The CLDR's date specification says standard date patterns are normally provided in four types: full (usually with weekday name), long (with wide month name), medium, and short (usually with numeric month).[2] In the CLDR's pattern language, EEEE is the wide day-of-week name, as in Tuesday.[2] In the CLDR's pattern language, MMMM is the wide month name, as in September.[2] In the CLDR's pattern language, d is the day of the month written with the minimum number of digits, while dd zero-pads it to two digits.[2]
The CLDR's base English locale (en) uses a different full date format, EEEE, MMMM d, y, which puts the month before the day.[3] The weekday and month names make the day-month order plain to a reader, which is the point of a full format; the trap is for software that expects the American month-first order. (Meridian's view)
Use
JavaScript's Intl.DateTimeFormat has a dateStyle option whose values are full, long, medium and short.[4] MDN's documentation says dateStyle expands to styles for weekday, day, month, year and era, with the exact combination depending on the locale.[4] MDN's example formats a date with the en-GB locale, dateStyle full and timeStyle long, and gives the expected output as Sunday, 20 December 2020 at 14:23:16 GMT+11.[4] A column in this shape was most likely written for people to read, so treat it as display text and convert it to a real date when you load it. (Meridian's view)
Wikipedia's article on UK date notation says The Guardian, the Financial Times and The Daily Telegraph write long dates as Friday 31 December 2021, with no commas.[5] Wikipedia's article on UK date notation says The Times and the British tabloids write Friday, December 31, 2021.[5] Wikipedia's article on UK date notation says there is no standard pattern for long form dates in print in the UK.[5] Expect the comma after the weekday to come and go between sources, and decide up front whether your parser should accept both forms. (Meridian's view)
Python's datetime documentation defines %A as the weekday as the locale's full name.[6] Python's datetime documentation defines %B as the month as the locale's full name.[6] Python's datetime documentation warns that, because the format depends on the current locale, care should be taken when making assumptions about the output value.[6] Python's datetime documentation says the leading zero is optional for %d when parsing with strptime().[6] Parse with the weekday and month names pinned to English, and check that your engine's %d accepts a single-digit day such as 1 June before relying on it. (Meridian's view) The weekday repeats information the date already carries, so after parsing, compare it with the weekday computed from the date: a mismatch is a cheap way to catch a mistyped day or year. (Meridian's view)
Sources
- [1]ca-gregorian.jsondocumentation
- [2]Unicode Locale Data Markup Language (LDML) Part 4: Datesstandard
- [3]ca-gregorian.jsondocumentation
- [4]Intl.DateTimeFormat() constructor - JavaScript | MDNdocumentation
- [5]Date and time notation in the United Kingdomsecondary source
- [6]datetime — Basic date and time typesdocumentation
How it's detected
CLDR en-GB full format.
Schema
https://meridian.online/schemas/datetime.date.weekday_dmy_full · Frictionless type date · %A, %d %B %Y
finetype taxonomy datetime.date.weekday_dmy_full -o json-schema