[][src]Trait holiday_de::DateExt

pub trait DateExt {
    fn is_public_holiday_in(&self, region: GermanRegion) -> bool;
fn public_holiday_in(&self, region: GermanRegion) -> Option<GermanHoliday>;
fn is_holiday(&self, holiday: GermanHoliday) -> bool; }

Provides convenience methods for datelike data structures like NaiveDate.

Required methods

fn is_public_holiday_in(&self, region: GermanRegion) -> bool

True if date is a holiday within the specified region.

Always false for dates before 1995.

fn public_holiday_in(&self, region: GermanRegion) -> Option<GermanHoliday>

Returns the holiday if given date is a public holiday.

Always None for dates before 1995.

fn is_holiday(&self, holiday: GermanHoliday) -> bool

True if date falls on the date of the given holiday.

Loading content...

Implementations on Foreign Types

impl DateExt for NaiveDate[src]

Loading content...

Implementors

Loading content...