shift_statistics/lib.rs
1//! # shift-statistics
2//!
3//! **Monthly statistics and colleague mode** built on top of [`shift_algorithm`].
4//!
5//! Two modules:
6//!
7//! - [`metrics`] — Monthly shift counts, consecutive work days, days until rest
8//! - [`colleague`] — Find common rest days between two teams (colleague mode)
9//!
10//! ## Example
11//!
12//! ```rust
13//! use shift_algorithm::cycle::default_config;
14//! use shift_statistics::metrics::{count_work_days_in_month, days_until_next_rest};
15//! use chrono::NaiveDate;
16//!
17//! let config = default_config();
18//! let today = NaiveDate::from_ymd_opt(2026, 5, 22).unwrap();
19//!
20//! let work_days = count_work_days_in_month(2026, 5, &config, 0);
21//! let rest_in = days_until_next_rest(today, &config, 0);
22//!
23//! println!("本月上班 {} 天,距休 {} 天", work_days, rest_in);
24//! ```
25
26pub mod colleague;
27pub mod metrics;
28
29pub use colleague::*;
30pub use metrics::*;