Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
util-holidays
Advanced tools
# 安装
npm i util-holidays
# 或者 yarn add util-holidays
import { getDayInfo, isWorkingDay, isWeekend, isStatutoryHoliday } from 'util-holidays'
// 获取日期信息
getDayInfo('2020-10-01')
// 返回值结构:
{
date: '2020-10-01',
week: '星期四',
type: '国庆节',
dayType: 3,
ps: 'dayType:1-工作日;2-周末;3-法定节假日;4-补休调工日'
}
// 判断是否工作日(含法定调工,如2020年10月10日)
isWorkingDay('2020-10-10')
// 判断是否正常休息的周末(不含法定调工,如2020年10月10日)
isWeekend('2020-10-10')
// 判断是否法定节假日
isStatutoryHoliday('2020-10-01')
// key获取方式为:https://util-holidays.beituyun.com/v1/creatKey?phone=你的手机号
import { config } from 'util-holidays'
config({
onLine: true,
key: 'your key'
})
FAQs
A Chinese holiday util
The npm package util-holidays receives a total of 6 weekly downloads. As such, util-holidays popularity was classified as not popular.
We found that util-holidays demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.