chinese_holiday

Crates.iochinese_holiday
lib.rschinese_holiday
version2024.0.3
sourcesrc
created_at2023-03-07 04:18:47.04418
updated_at2024-03-01 08:29:51.049467
descriptionA Rust library for determining Chinese holidays.
homepage
repositoryhttps://github.com/leoppro/chinese_holiday_rs
max_upload_size
id803284
size105,737
leoppro (leoppro)

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: 13

cargo fmt