Trait polars_time::chunkedarray::DateMethods
source · pub trait DateMethods: AsDate {
fn parse_from_str_slice(name: &str, v: &[&str], fmt: &str) -> DateChunked;
fn year(&self) -> Int32Chunked { ... }
fn iso_year(&self) -> Int32Chunked { ... }
fn quarter(&self) -> UInt32Chunked { ... }
fn month(&self) -> UInt32Chunked { ... }
fn weekday(&self) -> UInt32Chunked { ... }
fn week(&self) -> UInt32Chunked { ... }
fn day(&self) -> UInt32Chunked { ... }
fn ordinal(&self) -> UInt32Chunked { ... }
}
dtype-date
only.Required Methods§
fn parse_from_str_slice(name: &str, v: &[&str], fmt: &str) -> DateChunked
Provided Methods§
sourcefn year(&self) -> Int32Chunked
fn year(&self) -> Int32Chunked
Extract month from underlying NaiveDate representation. Returns the year number in the calendar date.
sourcefn iso_year(&self) -> Int32Chunked
fn iso_year(&self) -> Int32Chunked
This year number might not match the calendar year number.
sourcefn quarter(&self) -> UInt32Chunked
fn quarter(&self) -> UInt32Chunked
Extract month from underlying NaiveDateTime representation. Quarters range from 1 to 4.
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 NaiveDate 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 NaiveDate 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 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.)