holiday
A rust library for defining and iterating over annually repeating dates and holidays.
Create a new Holiday
A Holiday
can be either a fixed date like 'April 2nd' or an nth weekday of a month, like '1st Friday in April'.
use *;
use ;
// Regular `fixed` holiday
let holiday = new_fixed;
assert_eq!;
assert_eq!;
assert_eq!;
// Pastover: First Friday in April, an `nth` holiday
let pastover = new_nth;
assert_eq!;
assert_eq!;
assert_eq!;
Iterate over the occurrences of a Holiday.
The HolidayIter
type is an iterator over the occurrences of a Holiday.