Trait polars::prelude::DatetimeMethods
source · [−]pub trait DatetimeMethods {
fn year(&self) -> ChunkedArray<Int32Type>;
fn month(&self) -> ChunkedArray<UInt32Type>;
fn weekday(&self) -> ChunkedArray<UInt32Type>;
fn week(&self) -> ChunkedArray<UInt32Type>;
fn day(&self) -> ChunkedArray<UInt32Type>;
fn hour(&self) -> ChunkedArray<UInt32Type>;
fn minute(&self) -> ChunkedArray<UInt32Type>;
fn second(&self) -> ChunkedArray<UInt32Type>;
fn nanosecond(&self) -> ChunkedArray<UInt32Type>;
fn ordinal(&self) -> ChunkedArray<UInt32Type>;
fn strftime(&self, fmt: &str) -> ChunkedArray<Utf8Type>;
fn parse_from_str_slice(
name: &str,
v: &[&str],
fmt: &str,
tu: TimeUnit
) -> Logical<DatetimeType, Int64Type>;
}
Required methods
fn year(&self) -> ChunkedArray<Int32Type>
fn year(&self) -> ChunkedArray<Int32Type>
Extract month from underlying NaiveDateTime representation. Returns the year number in the calendar date.
fn month(&self) -> ChunkedArray<UInt32Type>
fn month(&self) -> ChunkedArray<UInt32Type>
Extract month from underlying NaiveDateTime representation. Returns the month number starting from 1.
The return value ranges from 1 to 12.
fn weekday(&self) -> ChunkedArray<UInt32Type>
fn weekday(&self) -> ChunkedArray<UInt32Type>
Extract weekday from underlying NaiveDateTime representation. Returns the weekday number where monday = 0 and sunday = 6
fn week(&self) -> ChunkedArray<UInt32Type>
fn week(&self) -> ChunkedArray<UInt32Type>
Returns the ISO week number starting from 1. The return value ranges from 1 to 53. (The last week of year differs by years.)
fn day(&self) -> ChunkedArray<UInt32Type>
fn day(&self) -> ChunkedArray<UInt32Type>
Extract day from underlying NaiveDateTime representation. Returns the day of month starting from 1.
The return value ranges from 1 to 31. (The last day of month differs by months.)
fn hour(&self) -> ChunkedArray<UInt32Type>
fn hour(&self) -> ChunkedArray<UInt32Type>
Extract hour from underlying NaiveDateTime representation. Returns the hour number from 0 to 23.
fn minute(&self) -> ChunkedArray<UInt32Type>
fn minute(&self) -> ChunkedArray<UInt32Type>
Extract minute from underlying NaiveDateTime representation. Returns the minute number from 0 to 59.
fn second(&self) -> ChunkedArray<UInt32Type>
fn second(&self) -> ChunkedArray<UInt32Type>
Extract second from underlying NaiveDateTime representation. Returns the second number from 0 to 59.
fn nanosecond(&self) -> ChunkedArray<UInt32Type>
fn nanosecond(&self) -> ChunkedArray<UInt32Type>
Extract second from underlying NaiveDateTime representation. Returns the number of nanoseconds since the whole non-leap second. The range from 1,000,000,000 to 1,999,999,999 represents the leap second.
fn ordinal(&self) -> ChunkedArray<UInt32Type>
fn ordinal(&self) -> ChunkedArray<UInt32Type>
Returns the day of year starting from 1.
The return value ranges from 1 to 366. (The last day of year differs by years.)
fn strftime(&self, fmt: &str) -> ChunkedArray<Utf8Type>
fn strftime(&self, fmt: &str) -> ChunkedArray<Utf8Type>
Format Datetime with a fmt
rule. See chrono strftime/strptime.