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
Trait Implementations
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));
Auto Trait Implementations
impl RefUnwindSafe for IsoWeekday
impl Send for IsoWeekday
impl Sync for IsoWeekday
impl Unpin for IsoWeekday
impl UnwindSafe for IsoWeekday
Blanket Implementations
Mutably borrows from an owned value. Read more
Clone this trait object reference, returning a boxed trait object.