chinese_holiday

Crates.iochinese_holiday
lib.rschinese_holiday
version
sourcesrc
created_at2023-03-07 04:18:47.04418
updated_at2024-12-12 04:36:31.577944
descriptionA Rust library for determining Chinese holidays.
homepage
repositoryhttps://github.com/zier-one/chinese_holiday_rs/
max_upload_size
id803284
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`
size0
Zier (zier-one)

documentation

README

chinese_holiday

English | 中文

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.

Install

cargo add chinese_holiday

Usage

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:

Commit count: 17

cargo fmt