Skip to content

zier-one/chinese_holiday_rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

A Rust library for determining Chinese holidays.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages