Struct DateLikeNameSpace
pub struct DateLikeNameSpace(/* private fields */);
temporal
only.Expand description
Specialized expressions for Series
with dates/datetimes.
Implementations§
§impl DateLikeNameSpace
impl DateLikeNameSpace
pub fn add_business_days(
self,
n: Expr,
week_mask: [bool; 7],
holidays: Vec<i32>,
roll: Roll,
) -> Expr
Available on crate feature business
only.
pub fn add_business_days( self, n: Expr, week_mask: [bool; 7], holidays: Vec<i32>, roll: Roll, ) -> Expr
business
only.Add a given number of business days.
pub fn to_string(self, format: &str) -> Expr
pub fn to_string(self, format: &str) -> Expr
Convert from Date/Time/Datetime into String with the given format. See chrono strftime/strptime.
pub fn strftime(self, format: &str) -> Expr
pub fn strftime(self, format: &str) -> Expr
Convert from Date/Time/Datetime into String with the given format. See chrono strftime/strptime.
Alias for to_string
.
pub fn cast_time_unit(self, tu: TimeUnit) -> Expr
pub fn cast_time_unit(self, tu: TimeUnit) -> Expr
Change the underlying TimeUnit
. And update the data accordingly.
pub fn with_time_unit(self, tu: TimeUnit) -> Expr
pub fn with_time_unit(self, tu: TimeUnit) -> Expr
pub fn convert_time_zone(self, time_zone: PlSmallStr) -> Expr
Available on crate feature timezones
only.
pub fn convert_time_zone(self, time_zone: PlSmallStr) -> Expr
timezones
only.pub fn millennium(self) -> Expr
pub fn millennium(self) -> Expr
Get the millennium of a Date/Datetime
pub fn is_leap_year(self) -> Expr
pub fn iso_year(self) -> Expr
pub fn iso_year(self) -> Expr
Get the iso-year of a Date/Datetime. This may not correspond with a calendar year.
pub fn quarter(self) -> Expr
pub fn quarter(self) -> Expr
Extract quarter from underlying NaiveDateTime representation. Quarters range from 1 to 4.
pub fn week(self) -> Expr
pub fn week(self) -> Expr
Extract the week from the underlying Date representation. Can be performed on Date and Datetime
Returns the ISO week number starting from 1. The return value ranges from 1 to 53. (The last week of year differs by years.)
pub fn weekday(self) -> Expr
pub fn weekday(self) -> Expr
Extract the ISO week day from the underlying Date representation. Can be performed on Date and Datetime.
Returns the weekday number where monday = 1 and sunday = 7
pub fn ordinal_day(self) -> Expr
pub fn ordinal_day(self) -> Expr
Get the ordinal_day of a Date/Datetime.
pub fn millisecond(self) -> Expr
pub fn millisecond(self) -> Expr
Get the millisecond of a Time64 (scaled from nanosecs).
pub fn microsecond(self) -> Expr
pub fn microsecond(self) -> Expr
Get the microsecond of a Time64 (scaled from nanosecs).
pub fn nanosecond(self) -> Expr
pub fn nanosecond(self) -> Expr
Get the nanosecond part of a Time64.
pub fn month_start(self) -> Expr
Available on crate feature month_start
only.
pub fn month_start(self) -> Expr
month_start
only.Roll backward to the first day of the month.
pub fn month_end(self) -> Expr
Available on crate feature month_end
only.
pub fn month_end(self) -> Expr
month_end
only.Roll forward to the last day of the month.
pub fn base_utc_offset(self) -> Expr
Available on crate feature timezones
only.
pub fn base_utc_offset(self) -> Expr
timezones
only.Get the base offset from UTC.
pub fn dst_offset(self) -> Expr
Available on crate feature timezones
only.
pub fn dst_offset(self) -> Expr
timezones
only.Get the additional offset from UTC currently in effect (usually due to daylight saving time).
pub fn offset_by(self, by: Expr) -> Expr
Available on crate feature offset_by
only.
pub fn offset_by(self, by: Expr) -> Expr
offset_by
only.Offset this Date/Datetime
by a given offset Duration
.
This will take leap years/ months into account.
pub fn replace_time_zone( self, time_zone: Option<PlSmallStr>, ambiguous: Expr, non_existent: NonExistent, ) -> Expr
timezones
only.pub fn combine(self, time: Expr, tu: TimeUnit) -> Expr
pub fn combine(self, time: Expr, tu: TimeUnit) -> Expr
Combine an existing Date/Datetime with a Time, creating a new Datetime value.
pub fn total_days(self) -> Expr
pub fn total_days(self) -> Expr
Express a Duration in terms of its total number of integer days.
pub fn total_hours(self) -> Expr
pub fn total_hours(self) -> Expr
Express a Duration in terms of its total number of integer hours.
pub fn total_minutes(self) -> Expr
pub fn total_minutes(self) -> Expr
Express a Duration in terms of its total number of integer minutes.
pub fn total_seconds(self) -> Expr
pub fn total_seconds(self) -> Expr
Express a Duration in terms of its total number of integer seconds.
pub fn total_milliseconds(self) -> Expr
pub fn total_milliseconds(self) -> Expr
Express a Duration in terms of its total number of milliseconds.
pub fn total_microseconds(self) -> Expr
pub fn total_microseconds(self) -> Expr
Express a Duration in terms of its total number of microseconds.
pub fn total_nanoseconds(self) -> Expr
pub fn total_nanoseconds(self) -> Expr
Express a Duration in terms of its total number of nanoseconds.
Auto Trait Implementations§
impl !Freeze for DateLikeNameSpace
impl !RefUnwindSafe for DateLikeNameSpace
impl Send for DateLikeNameSpace
impl Sync for DateLikeNameSpace
impl Unpin for DateLikeNameSpace
impl !UnwindSafe for DateLikeNameSpace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more