A Rust library for determining Chinese holidays. Holiday data from the Chinese Government Information Disclosure Platform. This library contains special holiday data from 2004 to 2024 and will continue to be updated annually thereafter.
Licensed under Apache 2.0.
cargo add chinese_holiday
use chinese_holiday::*;
use chrono::*;
let date = NaiveDate::from_ymd_opt(2004, 1, 1).unwrap();
assert_eq!(chinese_holiday(&date), DayKind::NewYearsDayHoliday);
For more details, see: