
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
功能:某年某月天数
参数: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 0 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
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.