public-holidays-cn
v0.5.0
Published
Check if a day is a China public holiday or a workday
Downloads
22
Readme
public-holidays-cn
Check if a day is a China public holiday or a workday.
English | 简体中文
Installation
npm install public-holidays-cnUsage
Sync methods
import { isHoliday, isWorkday } from 'public-holidays-cn';
isHoliday('2020-02-01'); // true
isWorkday('2020-03-16'); // trueAsync methods
import { isHolidayAsync, isWorkdayAsync } from 'public-holidays-cn/async';
isHolidayAsync('2020-02-01').then(res => console.log(res)); // true
isWorkdayAsync('2020-03-16').then(res => console.log(res)); // trueLicense
MIT © Qingrong Ke
