
Security News
npm v12 Ships With Install Scripts Off by Default, Begins Deprecating 2FA-Bypass Tokens
npm v12 is generally available, turning install scripts off by default and beginning the deprecation of 2FA-bypass publishing tokens.
功能:某年某月天数
参数:String('年-月-日')
返回结果:Number
栗子:
monthDays('2020-2')
返回值:29
功能:某两天间隔天数
参数:String('年-月-日'), String('年-月-日')
返回结果:Number
栗子:
separateDays('2020-2-2', '2020-2-8')
返回值:5
功能:某天是今年第几天
参数:String('年-月-日')
返回结果:Number
栗子:
yearToDay('2020-1-2')
返回值:2
功能:获取某天间隔多少天之后的日期
参数:String('年-月-日'), Number
返回结果:Number
栗子:
yearToDay('2020-9-9', 100)
返回值:1608220800000
功能:日期转为某年的第几周
参数:String('年-月-日')
返回结果:Number
栗子:
dayToWeek('2020-1-2')
返回值:1
功能:依据周数获取一周的时间戳
参数:String('年-周数')
返回结果:Array
栗子:
weekToDay('2020-35')
返回值:[ 1598227200000, 1598313600000, 1598400000000, 1598486400000, 1598572800000, 1598659200000, 1598745600000 ]
功能:某年的第几个月
参数:String('年-月-日')
返回结果:Object{年,周数}
栗子:
monthWeek('2020-9-7')
返回值:{month: 9, week: 1}
功能:某月从1号开始每周的第一天
参数:String('年-月')
返回结果:Array
栗子:
monthToWeek('2020-2')
返回值:[1580515200000, 1580688000000, 1581292800000, 1581897600000, 1582502400000]
-1:数据错误
FAQs
``` 功能 ```:某年某月天数
The npm package day-week receives a total of 4 weekly downloads. As such, day-week popularity was classified as not popular.
We found that day-week 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
npm v12 is generally available, turning install scripts off by default and beginning the deprecation of 2FA-bypass publishing tokens.

Research
/Security News
Socket tracks the activity as Operation “Muck and Load”: a threat actor uses commit-farming workflows, public dead drops, and protected archives to stage Windows RAT and infostealer malware.

Security News
pnpm 11.10 hardens registry auth to block token redirection, tightens pack-app and deploy, and makes the Rust port (v12) installable.