pub fn year(array: &dyn Array) -> Result<PrimitiveArray<i32>>
Available on crate feature
compute_temporal
only.Expand description
Extracts the years of a temporal array as PrimitiveArray<i32>
.
Use can_year
to check if this operation is supported for the target DataType
.