pub trait TimestampLike: Clone + PartialOrd + Add<Duration, Output = Self> + Sub<Duration, Output = Self> + Sub<Output = Duration> + for<'a> Into<Datum<'a>> + for<'a> TryFrom<Datum<'a>, Error = ()> + TimeLike + DateLike {
Show 26 methods fn new(date: NaiveDate, time: NaiveTime) -> Self; fn timestamp(&self) -> i64; fn timestamp_subsec_micros(&self) -> u32; fn date(&self) -> NaiveDate; fn date_time(&self) -> NaiveDateTime; fn from_date_time(dt: NaiveDateTime) -> Self; fn timezone_offset(&self) -> &'static str; fn timezone_hours(&self) -> &'static str; fn timezone_minutes(&self) -> &'static str; fn timezone_name(&self, caps: bool) -> &'static str; fn weekday0(&self) -> usize { ... } fn iso_year_ce(&self) -> u32 { ... } fn extract_epoch<T>(&self) -> T
    where
        T: DecimalLike
, { ... } fn truncate_microseconds(&self) -> Self { ... } fn truncate_milliseconds(&self) -> Self { ... } fn truncate_second(&self) -> Self { ... } fn truncate_minute(&self) -> Self { ... } fn truncate_hour(&self) -> Self { ... } fn truncate_day(&self) -> Self { ... } fn truncate_week(&self) -> Result<Self, EvalError> { ... } fn truncate_month(&self) -> Self { ... } fn truncate_quarter(&self) -> Self { ... } fn truncate_year(&self) -> Self { ... } fn truncate_decade(&self) -> Self { ... } fn truncate_century(&self) -> Self { ... } fn truncate_millennium(&self) -> Self { ... }
}
Expand description

A timestamp with both a date and a time component, but not necessarily a timezone component.

Required Methods

Return the date component of the timestamp

Return the date and time of the timestamp

Return the date and time of the timestamp

Returns a string representing the timezone’s offset from UTC.

Returns a string representing the hour portion of the timezone’s offset from UTC.

Returns a string representing the minute portion of the timezone’s offset from UTC.

Returns the abbreviated name of the timezone with the specified capitalization.

Provided Methods

Returns the weekday as a usize between 0 and 6, where 0 represents Sunday and 6 represents Saturday.

Like chrono::Datelike::year_ce, but works on the ISO week system.

Implementations on Foreign Types

Implementors