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.

Trait Implementations

Derived Implementations

impl Debug for Weekday

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl FromPrimitive for Weekday

fn from_i64(__arg_0: i64) -> Option<Weekday>

fn from_u64(__arg_0: u64) -> Option<Weekday>

fn from_int(n: isize) -> Option<Self>

fn from_i8(n: i8) -> Option<Self>

fn from_i16(n: i16) -> Option<Self>

fn from_i32(n: i32) -> Option<Self>

fn from_uint(n: usize) -> Option<Self>

fn from_u8(n: u8) -> Option<Self>

fn from_u16(n: u16) -> Option<Self>

fn from_u32(n: u32) -> Option<Self>

fn from_f32(n: f32) -> Option<Self>

fn from_f64(n: f64) -> Option<Self>

impl Clone for Weekday

fn clone(&self) -> Weekday

fn clone_from(&mut self, source: &Self)

impl Copy for Weekday

impl Eq for Weekday

fn assert_receiver_is_total_eq(&self)

impl PartialEq for Weekday

fn eq(&self, __arg_0: &Weekday) -> bool

fn ne(&self, __arg_0: &Weekday) -> bool