# Day of Week Name

Key: `datetime.component.day_of_week`

Full weekday name. Locale-specific (Monday vs lundi vs Montag).

Page: <https://meridian.online/docs/finetype/types/datetime/component/day_of_week>

Samples: `Monday`, `Friday`, `Sunday`

## Use it

Shell

```shell
finetype infer -i 'Monday' --mode column
# → datetime.component.day_of_week
```

DuckDB

```sql
SELECT ft_infer('Monday');
-- → 'datetime.component.day_of_week'
```

Cast template: {col} is your column

```sql
{col}
```

## Background

### Origin

In a vast number of languages, the names of the seven days of the week are derived from the names of the seven classical planets.[[1]](https://en.wikipedia.org/wiki/Names_of_the_days_of_the_week) The classical planets were in turn named after Hellenistic deities.[[1]](https://en.wikipedia.org/wiki/Names_of_the_days_of_the_week) The Romance languages, except Portuguese and Mirandese, preserved the Latin planetary names, apart from Sunday and Saturday.[[1]](https://en.wikipedia.org/wiki/Names_of_the_days_of_the_week) The Slavic, Baltic and Uralic languages, except Finnish and partially Estonian and Võro, adopted numbered day names that take Monday as the first day.[[1]](https://en.wikipedia.org/wiki/Names_of_the_days_of_the_week) In the international standard ISO 8601, Monday is treated as the first day of the week, but in many countries it is counted as the second day.[[1]](https://en.wikipedia.org/wiki/Names_of_the_days_of_the_week)

The Unicode Common Locale Data Repository's date specification, LDML Part 4, identifies weekday names with short strings rather than numbers, since there is no universally accepted numeric designation.[[2]](https://www.unicode.org/reports/tr35/tr35-dates.html) LDML Part 4 lets a day name vary by width: wide, abbreviated, short or narrow.[[2]](https://www.unicode.org/reports/tr35/tr35-dates.html) LDML Part 4 also lets a day name vary by context: the format form used within a complete date, or the stand-alone form used on its own, as in calendar headers.[[2]](https://www.unicode.org/reports/tr35/tr35-dates.html)

### Use

Python's datetime documentation warns that, because locale-dependent formats depend on the current locale, care should be taken when making assumptions about the output value.[[3]](https://docs.python.org/3/library/datetime.html) PostgreSQL's to\_char writes the Day pattern as a full capitalised day name blank-padded to 9 characters.[[4]](https://www.postgresql.org/docs/current/functions-formatting.html) PostgreSQL's FM prefix suppresses the trailing blanks that make a pattern's output fixed-width.[[4]](https://www.postgresql.org/docs/current/functions-formatting.html) PostgreSQL's TM prefix gives localised day names based on lc\_time.[[4]](https://www.postgresql.org/docs/current/functions-formatting.html) In Excel, the formula =TEXT(TODAY(),"DDDD") returns today's day of the week, like Monday.[[5]](https://support.microsoft.com/en-us/office/text-function-20d5ac4d-7b94-49fd-bb38-93d29371225c)

PostgreSQL's D pattern numbers the days from Sunday (1) to Saturday (7), and its ID pattern gives the ISO 8601 day of the week from Monday (1) to Sunday (7).[[4]](https://www.postgresql.org/docs/current/functions-formatting.html)

Check which language the names are in before parsing, and expect grammatical forms that differ from the dictionary form in some languages. (Meridian's view)

## Sources

1. [Names of the days of the week](https://en.wikipedia.org/wiki/Names_of_the_days_of_the_week) — secondary source
2. [Unicode Locale Data Markup Language (LDML) Part 4: Dates](https://www.unicode.org/reports/tr35/tr35-dates.html) — standard
3. [datetime — Basic date and time types](https://docs.python.org/3/library/datetime.html) — documentation
4. [PostgreSQL: Documentation: 18: 9.8. Data Type Formatting Functions](https://www.postgresql.org/docs/current/functions-formatting.html) — documentation
5. [TEXT function](https://support.microsoft.com/en-us/office/text-function-20d5ac4d-7b94-49fd-bb38-93d29371225c) — documentation

## How it's detected

Enum shown is EN only — each locale has its own enum.
