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

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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));

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Clone this trait object reference, returning a boxed trait object.

Return this boxed trait object as Box<dyn Any>. Read more

Return this trait object reference as &dyn Any. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.