Trait mz_repr::adt::timestamp::DateLike

source ·
pub trait DateLike: Datelike {
    // Provided methods
    fn extract_epoch(&self) -> i64 { ... }
    fn millennium(&self) -> i32 { ... }
    fn century(&self) -> i32 { ... }
    fn decade(&self) -> i32 { ... }
    fn quarter(&self) -> f64 { ... }
    fn iso_week_number(&self) -> u32 { ... }
    fn day_of_week(&self) -> u32 { ... }
    fn iso_day_of_week(&self) -> u32 { ... }
}
Expand description

Common set of methods for date component.

Provided Methods§

source

fn extract_epoch(&self) -> i64

source

fn millennium(&self) -> i32

source

fn century(&self) -> i32

source

fn decade(&self) -> i32

source

fn quarter(&self) -> f64

source

fn iso_week_number(&self) -> u32

Extract the iso week of the year

Note that because isoweeks are defined in terms of January 4th, Jan 1 is only in week 1 about half of the time

source

fn day_of_week(&self) -> u32

source

fn iso_day_of_week(&self) -> u32

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> DateLike for T
where T: Datelike,