Expand description
Thin facade for the use-calendar workspace.
The crate reexports the focused calendar crates directly so consumers can opt into one dependency while still using the smaller APIs.
§Examples
use use_calendar::*;
let start = CalendarDate::new(2024, 1, 31).unwrap();
let quarter = quarter_for_month(start.month()).unwrap();
let dates = recurring_dates(start, RecurrenceFrequency::Monthly, 1, 3).unwrap();
assert_eq!(quarter, Quarter::Q1);
assert_eq!(dates[1], CalendarDate::new(2024, 2, 29).unwrap());
assert!(is_business_day(CalendarDate::new(2024, 2, 29).unwrap()));Re-exports§
pub use use_business_day;pub use use_date;pub use use_date_range;pub use use_month;pub use use_quarter;pub use use_recurrence;pub use use_weekday;pub use use_year;
Structs§
Enums§
- Business
DayConvention - Business
DayError - Date
Error - Date
Range Error - Month
- Month
Error - Quarter
- Quarter
Error - Recurrence
Error - Recurrence
Frequency - Weekday
- Weekday
Error - Year
Error
Functions§
- add_
business_ days - add_
days - adjust_
business_ day - business_
days_ between - date_
range - day_
of_ year - days_
between - days_
in_ month - days_
in_ year - first_
day_ of_ year - intersection
- is_
business_ day - is_
leap_ year - is_
valid_ date - is_
valid_ month - is_
weekday - is_
weekend - last_
day_ of_ year - month_
from_ number - month_
in_ quarter - next_
business_ day - next_
date - overlaps
- previous_
business_ day - quarter_
end_ date - quarter_
for_ month - quarter_
start_ date - recurring_
dates - weekday_
for_ date