Module polars_arrow::compute::temporal
source · Available on crate feature
compute_temporal
only.Expand description
Defines temporal kernels for time and date related functions.
Functions§
- Checks if an array of type
datatype
can perform day operation - Checks if an array of type
datatype
can perform hour operation - Checks if an array of type
data_type
can perform ISO week operation - Checks if an array of type
datatype
can perform minute operation - Checks if an array of type
datatype
can perform month operation - Checks if an array of type
datatype
can perform nanosecond operation - Checks if an array of type
datatype
can perform second operation - Checks if an array of type
data_type
can perform weekday operation - Checks if an array of type
datatype
can perform year operation - Extracts the days of a temporal array as
PrimitiveArray<i8>
. Value ranges from 1 to 32 (Last day depends on month). Usecan_day
to check if this operation is supported for the targetArrowDataType
. - Extracts the hours of a temporal array as
PrimitiveArray<i8>
. Value ranges from 0 to 23. Usecan_hour
to check if this operation is supported for the targetArrowDataType
. - Extracts ISO week of a temporal array as
PrimitiveArray<i8>
Value ranges from 1 to 53 (Last week depends on the year). Usecan_iso_week
to check if this operation is supported for the targetArrowDataType
- Extracts the minutes of a temporal array as
PrimitiveArray<i8>
. Value ranges from 0 to 59. Usecan_minute
to check if this operation is supported for the targetArrowDataType
. - Extracts the months of a temporal array as
PrimitiveArray<i8>
. Value ranges from 1 to 12. Usecan_month
to check if this operation is supported for the targetArrowDataType
. - Extracts the nanoseconds of a temporal array as
PrimitiveArray<i32>
. Value ranges from 0 to 1_999_999_999. The range from 1_000_000_000 to 1_999_999_999 represents the leap second. Usecan_nanosecond
to check if this operation is supported for the targetArrowDataType
. - Extracts the seconds of a temporal array as
PrimitiveArray<i8>
. Value ranges from 0 to 59. Usecan_second
to check if this operation is supported for the targetArrowDataType
. - Extracts weekday of a temporal array as
PrimitiveArray<i8>
. Monday is 1, Tuesday is 2, …, Sunday is 7. Usecan_weekday
to check if this operation is supported for the targetArrowDataType
- Extracts the years of a temporal array as
PrimitiveArray<i32>
. Usecan_year
to check if this operation is supported for the targetArrowDataType
.