[][src]Struct igc::util::Date

pub struct Date {
    pub day: u8,
    pub month: u8,
    pub year: u8,
}

Represents a single Gregorian calendar day

Fields

day: u8

In the range [1, 31]

month: u8

In the range [1, 12]

year: u8

Only the least significant two digits of the year. In the range [0, 99]

Methods

impl Date[src]

pub fn parse(date_string: &str) -> Result<Self, ParseError>[src]

Parses a date string of the form "DDMMYY" There are not enough digits for the year in this format (bytes are expensive, yo).

pub fn from_dmy(day: u8, month: u8, year: u8) -> Date[src]

Helper method to create a Date from a (day, month, year) triplet

Trait Implementations

impl Eq for Date[src]

impl PartialEq<Date> for Date[src]

impl Debug for Date[src]

impl Display for Date[src]

impl FromStr for Date[src]

type Err = ParseError

The associated error which can be returned from parsing.

Auto Trait Implementations

impl Send for Date

impl Sync for Date

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]