Skip to content

year

Extracts the year component from a timestamp.

year(x: time) -> int

The year function extracts the year component from a timestamp as an integer.

The timestamp from which to extract the year.

from {
ts: 2024-06-15T14:30:45.123456,
}
year = ts.year()
{
ts: 2024-06-15T14:30:45.123456,
year: 2024,
}

month, day, hour, minute, second

Last updated: