Enum icu_datetime::date::IsoWeekday[][src]

#[repr(i8)]
pub enum IsoWeekday {
    Monday,
    Tuesday,
    Wednesday,
    Thursday,
    Friday,
    Saturday,
    Sunday,
}

A weekday in a 7-day week, according to ISO-8601.

The discriminant values correspond to ISO-8601 weekday numbers (Monday = 1, Sunday = 7).

Examples

use icu::datetime::date::IsoWeekday;

assert_eq!(1, IsoWeekday::Monday as usize);
assert_eq!(7, IsoWeekday::Sunday as usize);

Variants

Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday

Trait Implementations

impl Clone for IsoWeekday[src]

impl Copy for IsoWeekday[src]

impl Debug for IsoWeekday[src]

impl Eq for IsoWeekday[src]

impl From<usize> for IsoWeekday[src]

fn from(input: usize) -> Self[src]

Convert from an ISO-8601 weekday number to an IsoWeekday enum. 0 is automatically converted to 7 (Sunday). If the number is out of range, it is interpreted modulo 7.

Examples

use icu::datetime::date::IsoWeekday;

assert_eq!(IsoWeekday::Sunday, IsoWeekday::from(0));
assert_eq!(IsoWeekday::Monday, IsoWeekday::from(1));
assert_eq!(IsoWeekday::Sunday, IsoWeekday::from(7));
assert_eq!(IsoWeekday::Monday, IsoWeekday::from(8));

impl PartialEq<IsoWeekday> for IsoWeekday[src]

impl StructuralEq for IsoWeekday[src]

impl StructuralPartialEq for IsoWeekday[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> ErasedDataStruct for T where
    T: Clone + Debug + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.