Full Weekday with Abbreviated Month
datetime.date.weekday_abbreviated_monthFull weekday name followed by abbreviated month. Locale-specific for both weekday names and month abbreviations.
Operations on this type: Parse a date or time
Try a value
Full Weekday with Abbreviated Month's rule accepts it.
Reads it as 2024-03-04
Use it
finetype infer -i 'Monday, Jan 15, 2024' --mode column
# → datetime.date.weekday_abbreviated_monthSELECT ft_infer('Monday, Jan 15, 2024');
-- → 'datetime.date.weekday_abbreviated_month'strptime({col}, ['%A, %b %d, %Y', '%A, %d %b %Y'])::DATE
-- Format: %A, %b %d, %YHow finetype reads the samples
DuckDB 1.5.5 · finetype 0.6.66
| Value | As DATE |
|---|---|
| Monday, Jan 15, 2024 | 2024-01-15 |
| Tuesday, 31 Dec 2019 | 2019-12-31 |
- %A
- full weekday
- %b
- abbreviated month name
- %d
- day of month, two digits
- %Y
- four-digit year
Pattern
^[A-Za-z]+[, ]+(?:[A-Za-z]{3,} \d{1,2},? \d{4}|\d{1,2}\.? [A-Za-z]{3,} \d{4})$| Value | Length | Shape |
|---|---|---|
| Monday, Jan 15, 2024 | 20 | matches |
| Tuesday, 31 Dec 2019 | 20 | matches |
| Monday, Jan 15, 202 | 19 | rejected: one character short |
Background
Origin
FineType defines this type itself, as a full weekday name followed by an abbreviated month name.[1] FineType's registry describes the format as locale-specific for both weekday names and month abbreviations.[1] FineType's registry names the format string %A, %b %d, %Y for this type.[1]
In the POSIX strftime specification, %A is replaced by the locale's full weekday name.[2] POSIX strftime replaces %b with the locale's abbreviated month name.[2]
RFC 9110 gives Sunday, 06-Nov-94 08:49:37 GMT as an example of the obsolete RFC 850 date format.[3] RFC 9110's rfc850-date grammar begins with a full weekday name, from Monday to Sunday, followed by a comma.[3] RFC 9110 requires recipients to interpret an rfc850-date that appears to be more than 50 years in the future as the most recent past year with the same last two digits.[3] Treat an HTTP-style value with hyphens and a two-digit year as its own format rather than as this one. (Meridian's view)
Use
Microsoft's Excel documentation lists the date code dddd as displaying days as Sunday–Saturday.[4] Microsoft's Excel documentation lists the date code mmm as displaying months as Jan–Dec.[4] Microsoft's Excel documentation says date formats that begin with an asterisk respond to changes in regional date and time settings.[4]
Python's datetime documentation notes that field orderings will vary, for example month/day/year versus day/month/year.[5] Parse with the locale the file was written in, and check a few month abbreviations against that locale before trusting a whole column. (Meridian's view) Expect month-first and day-first values to share a column, and decide the order from the shape of each value rather than assuming one. (Meridian's view) The weekday adds nothing once the date is parsed, which makes it a cheap consistency check: recompute it from the parsed date and flag any row where the two disagree. (Meridian's view) Prefer a try-style parse when sweeping a mixed column, and count the rows it fails on before deciding what to do with them. (Meridian's view)
Sources
- [1]definitions_datetime.yamlFineType
- [2]strftimestandard
- [3]RFC 9110: HTTP Semanticsstandard
- [4]Format numbers as dates or timesdocumentation
- [5]datetime — Basic date and time typesdocumentation
Schema
https://meridian.online/schemas/datetime.date.weekday_abbreviated_month · Frictionless type date · %A, %b %d, %Y
finetype taxonomy datetime.date.weekday_abbreviated_month -o json-schema