pub enum Month {
January = 1,
February = 2,
March = 3,
April = 4,
May = 5,
June = 6,
July = 7,
August = 8,
September = 9,
October = 10,
November = 11,
December = 12,
}Expand description
Gregorian Month enumeration
Variants§
January = 1
February = 2
March = 3
April = 4
May = 5
June = 6
July = 7
August = 8
September = 9
October = 10
November = 11
December = 12
Implementations§
source§impl Month
impl Month
sourcepub const fn days_in_month(&self, year: i32) -> u8
pub const fn days_in_month(&self, year: i32) -> u8
Returns the total number of days in the month for the indicated gregorian year.
sourcepub const fn start_day_of_year(&self, year: i32) -> u16
pub const fn start_day_of_year(&self, year: i32) -> u16
Returns the start day of the year for this month for the indicated year.
sourcepub const fn end_day_of_year(&self, year: i32) -> u16
pub const fn end_day_of_year(&self, year: i32) -> u16
Returns the end day of the year for this month for the indicated year.
sourcepub const fn valid_day_number(&self, year: i32) -> LessThanValue<u8>
pub const fn valid_day_number(&self, year: i32) -> LessThanValue<u8>
Returns a range verifier to check if the indicate day number is valid for the particular month and year
sourcepub const fn day_is_within_month(&self, year: i32, day_of_year: u16) -> bool
pub const fn day_is_within_month(&self, year: i32, day_of_year: u16) -> bool
Returns true if the indicate day of the year is within this month
sourcepub const fn date_is_within_month(&self, date: &Date) -> bool
pub const fn date_is_within_month(&self, date: &Date) -> bool
Returns true if the indicated date is within this month
Trait Implementations§
source§impl Ord for Month
impl Ord for Month
source§impl PartialEq for Month
impl PartialEq for Month
source§impl PartialOrd for Month
impl PartialOrd for Month
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Copy for Month
impl Eq for Month
impl StructuralEq for Month
impl StructuralPartialEq for Month
Auto Trait Implementations§
impl RefUnwindSafe for Month
impl Send for Month
impl Sync for Month
impl Unpin for Month
impl UnwindSafe for Month
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more