---
id: "year_quarter"
kind: "datatype"
status: "draft"
is_pii: false
name: "Quarter with its year"
regexp: "^(?:(?:1[89]|20)\\d{2}[- ]?Q0?[1-4]|Q[1-4][- ](?:1[89]|20)\\d{2})$"
categories: ["datetime"]
langs: ["common"]
quality: 90
url: "https://registry.apicrafter.io/datatype/year_quarter"
---

# Quarter with its year (`year_quarter`)

> **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 quarter of a calendar or fiscal year written with the year: 2021Q4, 2021Q04 (the report identifiers of the Australian Independent Parliamentary Expenses Authority), 2021-Q4, 2021 Q4 or Q4 2021. A quarter number alone is quarter; the SDMX time period 2021-Q4 is sdmx_reporting_period; a quarter given by its last month (Sep-17) is yearmonth_english.

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

## Detection

Regular expression (Python `re`):

```
^(?:(?:1[89]|20)\d{2}[- ]?Q0?[1-4]|Q[1-4][- ](?:1[89]|20)\d{2})$
```

## Examples

- `2021Q04` — IPEA report identifier of October to December 2021
- `2022Q03`
- `2021 Q4`
- `Q4 2021`
- `2021Q5` (invalid example)
- `4` (invalid example) — a quarter without its year: quarter

## Metacrafter rules

2 rules: 0 match the field name, 2 match values.

- `yearquartervalue` (data, `common/periods.yaml`)
- `esyearquartervalue` (data, `es/es_datetime.yaml`)

## Supported by tools

- [`metacrafter`](https://registry.apicrafter.io/tool/metacrafter.md)

## Translations

- ru: Квартал года

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Calendar_year#Quarters>

## Quality

Score 90/100. Missing: mapping (Wikidata, Schema.org, ...).

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