Expand description

Conversion methods for dates and times.

Constants

Number of days between 0001-01-01 and 1970-01-01

Number of microseconds in a second

Number of milliseconds in a second

Number of milliseconds in a day

Number of nanoseconds in a second

Number of seconds in a day

Functions

Adds an interval to a timestamp in time_unit units and timezone timezone.

Adds an interval to a timestamp in time_unit units without timezone.

converts a i32 representing a date32 to NaiveDate

converts a i32 representing a date32 to NaiveDateTime

converts a i64 representing a date64 to NaiveDate

converts a i64 representing a date64 to NaiveDateTime

Parses an offset of the form "+WX:YZ" or "UTC" into FixedOffset.

Parses value to a [chrono_tz::Tz] with the Arrow’s definition of timestamp with a timezone.

converts a i32 representing a time32(ms) to NaiveTime

converts a i32 representing a time32(s) to NaiveDateTime

converts a i64 representing a time64(ns) to NaiveDateTime

converts a i64 representing a time64(us) to NaiveDateTime

converts a i64 representing a timestamp(ms) to NaiveDateTime

converts a i64 representing a timestamp(ns) to NaiveDateTime

converts a i64 representing a timestamp(s) to NaiveDateTime

Converts a timestamp in time_unit and timezone into chrono::DateTime.

Converts a timestamp in time_unit and timezone into chrono::DateTime.

converts a i64 representing a timestamp(us) to NaiveDateTime

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”.

Parses a Utf8Array to naive timestamp, i.e. PrimitiveArray<i64> with type Timestamp(Nanosecond, None). Timezones are ignored. Null elements remain null; non-parsable elements are set to null.

Parses value to Option<i64> consistent with the Arrow’s definition of timestamp without timezone.

Parses a Utf8Array to a timeozone-aware timestamp, i.e. PrimitiveArray<i64> with type Timestamp(Nanosecond, Some(timezone)).

Parses value to Option<i64> consistent with the Arrow’s definition of timestamp with timezone. tz must be built from timezone (either via parse_offset or chrono-tz).