0.0.11 • Published 6 months ago

@kang8/chinese-holidays v0.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Chinese Holidays

determine whether the date is a public holiday in China.

English | 中文

Installation

npm install @kang8/chinese-holidays

Usage example

import { holiday } from '@kang8/chinese-holidays'

const national_day = new Date('2022-10-01')

holiday.isHoliday(national_day) // true
holiday.isWorkday(national_day) // false
holiday.isPublicHoliday(national_day) // true
holiday.isPublicWorkday(national_day) // false
holiday.publicHolidayName(national_day) // 国庆节
holiday.publicHolidayName(new Date('2022-09-30')) // null

Development setup

npm install
npm run build
npm test

Contributing

  1. Fork it (https://github.com/kang8/chinese-holidays)
  2. Create your feature branch (git checkout -b new_feature)
  3. Commit your changes (git commit -am 'New feature')
  4. Push to the branch (git push origin new_feature)
  5. Create a new Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Related Projects

0.0.10

6 months ago

0.0.11

6 months ago

0.0.9

9 months ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.5

2 years ago

0.0.6

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago