Function polars_arrow::compute::temporal::can_year

source ·
pub fn can_year(data_type: &ArrowDataType) -> bool
Available on crate feature compute_temporal only.
Expand description

Checks if an array of type datatype can perform year operation

§Examples

use polars_arrow::compute::temporal::can_year;
use polars_arrow::datatypes::{ArrowDataType};

assert_eq!(can_year(&ArrowDataType::Date32), true);
assert_eq!(can_year(&ArrowDataType::Int8), false);