use-calendar 0.0.1

Composable facade crate for RustUse calendar primitives
Documentation

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()));