Crates.io | chinese_holiday |
lib.rs | chinese_holiday |
version | |
source | src |
created_at | 2023-03-07 04:18:47.04418 |
updated_at | 2024-12-12 04:36:31.577944 |
description | A Rust library for determining Chinese holidays. |
homepage | |
repository | https://github.com/zier-one/chinese_holiday_rs/ |
max_upload_size | |
id | 803284 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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: