pub trait HolidayCalendar<T: Datelike + Copy + PartialOrd> {
    fn is_holiday(&self, date: T) -> bool;

    fn is_bday(&self, date: T) -> bool { ... }
    fn to_bday(&self, date: T, adjust_next: bool) -> T { ... }
    fn advance_bdays(&self, date: T, bdays_count: i32) -> T { ... }
    fn bdays(&self, d0: T, d1: T) -> i32 { ... }
}
Expand description

Abstraction for a Holiday Calendar.

Required Methods

Returns true if date is a holiday.

Provided Methods

Returns true if date is a Business Day. A Business Day is defined as a weekday that is not a holiday.

Adjusts date to the last/next business day if it’s not a business day.

Advances bdays_count number of business days from date.

Returns the number of business days between d0 and d1.

Implementors