Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

chinese-workday

yize348MIT1.10.1TypeScript support: included

中国工作日

workday, chinese-workday, 工作日, 非节假日, 节假日, 2019, 2020, 2021, 2022, 2023

readme

chinese-workday

今天要上班吗?

Build Status

Install

$ npm install chinese-workday

Usage

// const { isWorkday, isHoliday, getFestival } = require('chinese-workday');
const ww = require('chinese-workday');
const isWorkday = ww.isWorkday;
const isHoliday = ww.isHoliday;
const getFestival = ww.getFestival;
const isAddtionalWorkday = ww.isAddtionalWorkday;

isWorkday('2022-10-01')
// => false
isHoliday('2022-10-01')
// => true
isAddtionalWorkday('2022-01-29')
// => true
getFestival('2022-10-01')
// => 国庆节

Note: Since 2018