Enum chrono::Weekday
[-] [+]
[src]
pub enum Weekday { Mon, Tue, Wed, Thu, Fri, Sat, Sun, }
The day of week (DOW).
The order of the days of week depends on the context.
One should prefer *_from_monday
or *_from_sunday
methods to get the correct result.
Variants
Mon | Monday. |
Tue | Tuesday. |
Wed | Wednesday. |
Thu | Thursday. |
Fri | Friday. |
Sat | Saturday. |
Sun | Sunday. |
Methods
impl Weekday
fn succ(&self) -> Weekday
The next day in the week.
fn pred(&self) -> Weekday
The previous day in the week.
fn number_from_monday(&self) -> u32
Returns a DOW number starting from Monday = 1. (ISO 8601 weekday number)
fn number_from_sunday(&self) -> u32
Returns a DOW number starting from Sunday = 1.
fn num_days_from_monday(&self) -> u32
Returns a DOW number starting from Monday = 0.
fn num_days_from_sunday(&self) -> u32
Returns a DOW number starting from Sunday = 0.