New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@kang8/chinese-holidays

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kang8/chinese-holidays

A lib provider api to check chinese holidays

  • 0.0.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
0
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 30 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc