Enum datetime::Weekday
[−]
[src]
pub enum Weekday { Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, }
A named day of the week.
Sunday is Day 0. This seems to be a North American thing? It’s pretty much an arbitrary choice, and as you can’t use the from_zero method, it won’t affect you at all. If you want to change it, the only thing that should be affected is LocalDate::days_to_weekday.
Variants
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Methods
impl Weekday
[src]
fn from_zero(weekday: i8) -> Result<Weekday, Error>
[src]
Return the weekday based on a number, with Sunday as Day 0, Monday as Day 1, and so on.
use datetime::Weekday; assert_eq!(Weekday::from_zero(4), Ok(Weekday::Thursday)); assert!(Weekday::from_zero(7).is_err());
fn from_one(weekday: i8) -> Result<Weekday, Error>
[src]
Trait Implementations
impl PartialEq for Weekday
[src]
fn eq(&self, __arg_0: &Weekday) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Eq for Weekday
[src]
impl Debug for Weekday
[src]
impl Clone for Weekday
[src]
fn clone(&self) -> Weekday
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more