---
id: "sdmx_age"
kind: "datatype"
status: "draft"
is_pii: false
name: "SDMX age code"
regexp: "^Y(?:\\d{1,3}(?:T\\d{1,3})?|_(?:GE|GT|LE|LT)\\d{1,3})$"
categories: ["government", "science"]
langs: ["common"]
quality: 90
url: "https://registry.apicrafter.io/datatype/sdmx_age"
---

# SDMX age code (`sdmx_age`)

> **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.

Code of an age or an age band written with the syntax of the SDMX guidelines for code lists. Y stands for years, a number after it is an age (Y15), T joins the ends of a band (Y15T24 for 15 to 24 years) and the operators GE, GT, LE and LT after an underscore give an open band (Y_GE65 for 65 years or more, Y_LT5 for under 5). The guidelines allow the syntax and do not impose it; statistical offices that follow it, such as the statistics institute of the Canary Islands, give these codes in the age dimension of their tables (EDAD_CODE). Eurostat writes its bands with a hyphen (Y15-24), see eurostat_age_class. The regexp covers ages in years; the total _T and codes in months or days are left out.

- Personal data (PII): no
- Categories: Government related (government), Scientific (science)
- Countries: global
- Languages: Common to most languages (common)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^Y(?:\d{1,3}(?:T\d{1,3})?|_(?:GE|GT|LE|LT)\d{1,3})$
```

## Examples

- `Y15T24` — 15 to 24 years
- `Y_GE65` — 65 years or more
- `Y_LT5` — under 5 years
- `Y15-24` (invalid example) — the Eurostat spelling

## Metacrafter rules

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

- `sdmxagebandvalue` (data, `common/sdmx.yaml`)
- `sdmxagebyname` (field, `common/sdmx.yaml`)

## Supported by tools

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

## Translations

- es: Código de edad (SDMX)
- ru: Код возраста по синтаксису SDMX

## Sources

- doc: <https://sdmx.org/wp-content/uploads/SDMX_Guidelines_for_CDCL-1.docx>
- doc: <https://registry.sdmx.org/sdmx/v2/structure/codelist/SDMX/CL_AGE/+>

## Quality

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

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