polars_arrow

Module temporal_conversions

Source
Expand description

Conversion methods for dates and times.

Constants§

EPOCH_DAYS_FROM_CE
Number of days between 0001-01-01 and 1970-01-01
MICROSECONDS
Number of microseconds in a second
MICROSECONDS_IN_DAY
Number of microseconds in a day
MILLISECONDS
Number of milliseconds in a second
MILLISECONDS_IN_DAY
Number of milliseconds in a day
NANOSECONDS
Number of nanoseconds in a second
NANOSECONDS_IN_DAY
Number of nanoseconds in a day
SECONDS_IN_DAY
Number of seconds in a day

Functions§

date32_to_date
converts a i32 representing a date32 to NaiveDate
date32_to_date_opt
converts a i32 representing a date32 to NaiveDate
date32_to_datetime
converts a i32 representing a date32 to NaiveDateTime
date32_to_datetime_opt
converts a i32 representing a date32 to NaiveDateTime
date64_to_date
converts a i64 representing a date64 to NaiveDate
date64_to_datetime
converts a i64 representing a date64 to NaiveDateTime
duration_ms_to_duration
converts a i64 representing a duration(ms) to Duration
duration_ns_to_duration
converts a i64 representing a duration(ns) to Duration
duration_s_to_duration
converts a i64 representing a duration(s) to Duration
duration_us_to_duration
converts a i64 representing a duration(us) to Duration
parse_offset
Parses an offset of the form "+WX:YZ" or "UTC" into FixedOffset.
parse_offset_tzchrono-tz
Parses value to a chrono_tz::Tz with the Arrow’s definition of timestamp with a timezone.
time32ms_to_time
converts a i32 representing a time32(ms) to NaiveTime
time32s_to_time
converts a i32 representing a time32(s) to NaiveTime
time64ns_to_time
converts a i64 representing a time64(ns) to NaiveTime
time64ns_to_time_opt
converts a i64 representing a time64(ns) to NaiveTime
time64us_to_time
converts a i64 representing a time64(us) to NaiveTime
time64us_to_time_opt
converts a i64 representing a time64(us) to NaiveTime
timestamp_ms_to_datetime
converts a i64 representing a timestamp(ms) to NaiveDateTime
timestamp_ms_to_datetime_opt
converts a i64 representing a timestamp(ms) to NaiveDateTime
timestamp_ns_to_datetime
converts a i64 representing a timestamp(ns) to NaiveDateTime
timestamp_ns_to_datetime_opt
converts a i64 representing a timestamp(ns) to NaiveDateTime
timestamp_s_to_datetime
converts a i64 representing a timestamp(s) to NaiveDateTime
timestamp_s_to_datetime_opt
converts a i64 representing a timestamp(s) to NaiveDateTime
timestamp_to_datetime
Converts a timestamp in time_unit and timezone into chrono::DateTime.
timestamp_us_to_datetime
converts a i64 representing a timestamp(us) to NaiveDateTime
timestamp_us_to_datetime_opt
converts a i64 representing a timestamp(us) to NaiveDateTime
timeunit_scale
Calculates the scale factor between two TimeUnits. The function returns the scale that should multiply the TimeUnit “b” to have the same time scale as the TimeUnit “a”.
utf8_to_timestamp_scalar
Parses value to Option<i64> consistent with the Arrow’s definition of timestamp with timezone.