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§
fn extract_epoch(&self) -> i64
fn millennium(&self) -> i32
fn century(&self) -> i32
fn decade(&self) -> i32
fn quarter(&self) -> f64
sourcefn iso_week_number(&self) -> u32
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
fn day_of_week(&self) -> u32
fn iso_day_of_week(&self) -> u32
Object Safety§
This trait is not object safe.