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

chinese-calendar

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chinese-calendar

中国法定节假日

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

chinese-calendar-js

判断一天是不是法定节假日/法定工作日(查看节假日安排)。

使用方法

安装

  • npm
  npm i chinese-calendar
  • yarn
  yarn add chinese-calendar

使用

  • 浏览器下(基于 webpack 构建)
  import calendar from 'chinese-calendar'
  calendar.isHoliday('2020-10-08') // true
  calendar.getHolidayDetail('2020-10-07') // ['National Day', '国庆节', 3]
  • NodeJS 下
  const calendar = require('chinese-calendar)
  calendar.isHoliday('2020-10-08') // true
  calendar.getHolidayDetail('2020-10-07') // ['National Day', '国庆节', 3]

其他语言版本

  • Python 版本

后续更新

  • 【chore】使用 GitHub Actions 直接构建
  • 【feat】提供判断某天是否为法定工作日的功能
  • 【feat】提供判断某天是否为调休的功能(本来应该是周一到周五的某一天,结果调休了)
  • 【feat】把20年之前的历史数据加进来
  • 【feat】支持直接传 Date 对象
  • 【feat】提供 cli 支持

Keywords

FAQs

Package last updated on 14 Apr 2021

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