Calendar Year
Type Registry
Calendar Year
datetime.component.year Four-digit year. Ambiguous as a standalone value — could be any integer. Column-mode inference checks range and distribution.
Domain datetime›component
Casts to SMALLINT
Scope broad_numbers
Try it
CLI
$ finetype infer -i "2024"
→ datetime.component.year DuckDB
Detect
SELECT finetype('2024');
-- → 'datetime.component.year' Cast expression
{col}::SMALLINT Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS SMALLINT) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'datetime.component.year'; JSON Schema
finetype schema datetime.component.year {
"$id": "https://noon.sh/schemas/datetime.component.year",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Four-digit year. Ambiguous as a standalone value — could be any integer. Column-mode inference checks range and distribution.",
"examples": [
"2024",
"1999",
"2000"
],
"pattern": "^\\d{4}$",
"title": "Calendar Year",
"type": "string"
} Examples
202419992000