Trait polars_time::chunkedarray::DatetimeMethods
source · [−]pub trait DatetimeMethods {
fn year(&self) -> Int32Chunked;
fn month(&self) -> UInt32Chunked;
fn weekday(&self) -> UInt32Chunked;
fn week(&self) -> UInt32Chunked;
fn day(&self) -> UInt32Chunked;
fn hour(&self) -> UInt32Chunked;
fn minute(&self) -> UInt32Chunked;
fn second(&self) -> UInt32Chunked;
fn nanosecond(&self) -> UInt32Chunked;
fn ordinal(&self) -> UInt32Chunked;
fn strftime(&self, fmt: &str) -> Utf8Chunked;
fn parse_from_str_slice(
name: &str,
v: &[&str],
fmt: &str,
tu: TimeUnit
) -> DatetimeChunked;
}
Required methods
fn year(&self) -> Int32Chunked
fn year(&self) -> Int32Chunked
Extract month from underlying NaiveDateTime representation. Returns the year number in the calendar date.
fn month(&self) -> UInt32Chunked
fn month(&self) -> UInt32Chunked
Extract month from underlying NaiveDateTime representation. Returns the month number starting from 1.
The return value ranges from 1 to 12.
fn weekday(&self) -> UInt32Chunked
fn weekday(&self) -> UInt32Chunked
Extract weekday from underlying NaiveDateTime representation. Returns the weekday number where monday = 0 and sunday = 6
fn week(&self) -> UInt32Chunked
fn week(&self) -> UInt32Chunked
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) -> UInt32Chunked
fn day(&self) -> UInt32Chunked
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) -> UInt32Chunked
fn hour(&self) -> UInt32Chunked
Extract hour from underlying NaiveDateTime representation. Returns the hour number from 0 to 23.
fn minute(&self) -> UInt32Chunked
fn minute(&self) -> UInt32Chunked
Extract minute from underlying NaiveDateTime representation. Returns the minute number from 0 to 59.
fn second(&self) -> UInt32Chunked
fn second(&self) -> UInt32Chunked
Extract second from underlying NaiveDateTime representation. Returns the second number from 0 to 59.
fn nanosecond(&self) -> UInt32Chunked
fn nanosecond(&self) -> UInt32Chunked
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) -> UInt32Chunked
fn ordinal(&self) -> UInt32Chunked
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) -> Utf8Chunked
fn strftime(&self, fmt: &str) -> Utf8Chunked
Format Datetime with a fmt
rule. See chrono strftime/strptime.
fn parse_from_str_slice(
name: &str,
v: &[&str],
fmt: &str,
tu: TimeUnit
) -> DatetimeChunked
Implementations on Foreign Types
sourceimpl DatetimeMethods for DatetimeChunked
impl DatetimeMethods for DatetimeChunked
sourcefn year(&self) -> Int32Chunked
fn year(&self) -> Int32Chunked
Extract month from underlying NaiveDateTime representation. Returns the year number in the calendar date.
sourcefn month(&self) -> UInt32Chunked
fn month(&self) -> UInt32Chunked
Extract month from underlying NaiveDateTime representation. Returns the month number starting from 1.
The return value ranges from 1 to 12.
sourcefn weekday(&self) -> UInt32Chunked
fn weekday(&self) -> UInt32Chunked
Extract weekday from underlying NaiveDateTime representation. Returns the weekday number where monday = 0 and sunday = 6
sourcefn week(&self) -> UInt32Chunked
fn week(&self) -> UInt32Chunked
Returns the ISO week number starting from 1. The return value ranges from 1 to 53. (The last week of year differs by years.)
sourcefn day(&self) -> UInt32Chunked
fn day(&self) -> UInt32Chunked
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.)
sourcefn hour(&self) -> UInt32Chunked
fn hour(&self) -> UInt32Chunked
Extract hour from underlying NaiveDateTime representation. Returns the hour number from 0 to 23.
sourcefn minute(&self) -> UInt32Chunked
fn minute(&self) -> UInt32Chunked
Extract minute from underlying NaiveDateTime representation. Returns the minute number from 0 to 59.
sourcefn second(&self) -> UInt32Chunked
fn second(&self) -> UInt32Chunked
Extract second from underlying NaiveDateTime representation. Returns the second number from 0 to 59.
sourcefn nanosecond(&self) -> UInt32Chunked
fn nanosecond(&self) -> UInt32Chunked
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.
sourcefn ordinal(&self) -> UInt32Chunked
fn ordinal(&self) -> UInt32Chunked
Returns the day of year starting from 1.
The return value ranges from 1 to 366. (The last day of year differs by years.)
sourcefn strftime(&self, fmt: &str) -> Utf8Chunked
fn strftime(&self, fmt: &str) -> Utf8Chunked
Format Datetime with a fmt
rule. See chrono strftime/strptime.