[][src]Struct gregorian::InvalidDayOfMonth

pub struct InvalidDayOfMonth {
    pub year: Year,
    pub month: Month,
    pub day: u8,
}

The day is not valid for the year and month.

Fields

year: Yearmonth: Monthday: u8

Implementations

impl InvalidDayOfMonth[src]

pub const fn check(year: Year, month: Month, day: u8) -> Result<(), Self>[src]

pub const fn next_valid(self) -> Date[src]

Get the next valid date.

This function returns the first day of the next month for the invalid date.

It does not add the excess days in the new month.

pub const fn prev_valid(self) -> Date[src]

Get the last valid date before the invalid date.

This function returns the last day of the current month for the invalid date.

Trait Implementations

impl Clone for InvalidDayOfMonth[src]

impl Copy for InvalidDayOfMonth[src]

impl Debug for InvalidDayOfMonth[src]

impl Display for InvalidDayOfMonth[src]

impl Eq for InvalidDayOfMonth[src]

impl Error for InvalidDayOfMonth[src]

impl From<InvalidDayOfMonth> for InvalidDate[src]

impl PartialEq<InvalidDayOfMonth> for InvalidDayOfMonth[src]

impl StructuralEq for InvalidDayOfMonth[src]

impl StructuralPartialEq for InvalidDayOfMonth[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> 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> ToString for T where
    T: Display + ?Sized
[src]

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.