---
id: "iso_week"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["datetime"]
langs: ["common"]
quality: 80
url: "https://registry.apicrafter.io/datatype/iso_week"
---

# ISO 8601 year and week (`iso_week`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

A calendar week written as an ISO 8601 week date without the day, the week-numbering year, the letter W and a two-digit week from 01 to 53, in extended (2021-W05) or basic (2021W05) form. ISO weeks start on Monday, and week 01 is the week with the first Thursday of the year, so the week-numbering year can differ from the calendar year near 1 January. The regexp does not check that week 53 exists in the given year.

- Personal data (PII): no
- Categories: Date and time (datetime)
- Countries: global
- Languages: Common to most languages (common)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^\d{4}-?W(?:0[1-9]|[1-4]\d|5[0-3])$
```

## Examples

- `2021-W05` — extended format
- `2021W05` — basic format
- `2020-W53` — 2020 has 53 ISO weeks
- `2021-W54` (invalid example) — week out of range
- `2021-5` (invalid example) — no W designator

## Translations

- ru: Неделя по ISO 8601
- fr: Semaine ISO 8601

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/ISO_week_date>
- wikidata: <https://www.wikidata.org/wiki/Q2110154>

## Quality

Score 80/100. Missing: mapping (Wikidata, Schema.org, ...), detector coverage.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/iso_week.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/datetime/iso_week.yaml>
