[][src]Trait gregorian::DateResultExt

pub trait DateResultExt {
    pub fn or_next_valid(&self) -> Date;
pub fn or_prev_valid(&self) -> Date; }

Extension for Result<Date> to round invalid dates.

Required methods

pub fn or_next_valid(&self) -> Date[src]

Get the date or the next valid date.

This function gives the first day of the next month for the invalid date. It ignores any excess days in the invalid date.

pub fn or_prev_valid(&self) -> Date[src]

Get the date or the next valid date.

This function gives the last day of the current month for the invalid date. It ignores any excess days in the invalid date.

Loading content...

Implementations on Foreign Types

impl DateResultExt for Result<Date, InvalidDayOfMonth>[src]

Loading content...

Implementors

Loading content...