[][src]Trait holiday::before_after::BeforeAfterDate

pub trait BeforeAfterDate {
    fn after(&self, date: &NaiveDate) -> NaiveDate;
fn before(&self, date: &NaiveDate) -> NaiveDate; fn after_today(&self) -> NaiveDate { ... }
fn before_today(&self) -> NaiveDate { ... }
fn first_date(&self) -> NaiveDate { ... }
fn last_date(&self) -> NaiveDate { ... } }

Trait to determine the next and previous occurrence of dates (successor and predecessor). The next occurrence should include the current date, the previous occurrence should exclude the current date.

Required methods

fn after(&self, date: &NaiveDate) -> NaiveDate

The next occurrence after a given date

fn before(&self, date: &NaiveDate) -> NaiveDate

The previous occurrence before a given date

Loading content...

Provided methods

fn after_today(&self) -> NaiveDate

The next occurrence including today (successor)

fn before_today(&self) -> NaiveDate

The previous occurrence excluding today (predecessor)

fn first_date(&self) -> NaiveDate

The first representable occurrence of the date

fn last_date(&self) -> NaiveDate

The last representable occurrence of the date

Loading content...


impl BeforeAfterDate for HolidayDate[src]

impl BeforeAfterDate for DayOfMonth[src]

impl BeforeAfterDate for NthWeekdayOfMonth[src]

impl<S: ToString> BeforeAfterDate for Holiday<S>[src]

Loading content...