cf.Data.year

Data.year

The year of each date-time value.

Only applicable for data with reference time units. The returned Data will have the same mask hardness as the original array.

See also

month, day, hour, minute, second

Examples

>>> d = cf.Data([[1.93, 5.17]], 'days since 2000-12-29')
>>> d
<CF Data(1, 2): [[2000-12-30 22:19:12, 2001-01-03 04:04:48]] >
>>> d.year
<CF Data(1, 2): [[2000, 2001]] >