Crates.io | chinese_holiday |
lib.rs | chinese_holiday |
version | 2024.0.3 |
source | src |
created_at | 2023-03-07 04:18:47.04418 |
updated_at | 2024-03-01 08:29:51.049467 |
description | A Rust library for determining Chinese holidays. |
homepage | |
repository | https://github.com/leoppro/chinese_holiday_rs |
max_upload_size | |
id | 803284 |
size | 105,737 |
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: