Calendar Year
Four-digit year. Ambiguous as a standalone value — could be any integer. Column-mode inference checks range and distribution.
Calendar Year
datetime.component.yearFour-digit year. Ambiguous as a standalone value — could be any integer. Column-mode inference checks range and distribution.
Domain
datetime
Category
component
Casts to
SMALLINT
Scope
broad_numbers
Try it
CLI
$ finetype infer -i "2024"
→ datetime.component.yearDuckDB
Detect
SELECT finetype('2024');
-- → 'datetime.component.year'Cast expression
{col}::SMALLINTSafe 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://meridian.online/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",
"x-finetype-broad-type": "SMALLINT",
"x-finetype-transform": "{col}::SMALLINT"
}Examples
202419992000