
Security News
Feross on TBPN: Socket's Series C and the State of Software Supply Chain Security
Feross Aboukhadijeh joins TBPN to discuss Socket's $60M Series C, 500%+ ARR growth, AI's impact on open source, and the rise in supply chain attacks.
@baiwusanyu/utils-date
Advanced tools
补0
| 参数 | 参数类型 | 默认值 | 说明 |
|---|---|---|---|
| num | number | - | 需要补 0 的数字 |
| 返回值 | 返回类型 | 说明 |
|---|---|---|
| res | string | 补 0 结果 |
获取某个月最后一天
| 参数 | 参数类型 | 默认值 | 说明 |
|---|---|---|---|
| month | number | - | 月份 |
| year | number | new Date().getFullYear() | 年份 |
| isFull | boolean | false | 是否显示全日期,true 则返回 'YYYY-MM-DD',反之只返回一个数字 |
| 返回值 | 返回类型 | 说明 |
|---|---|---|
| res | string \ number | 最后一天日期 |
给定一个时间(2023-04-27T07:32:39.000+00:00),返回指定格式日期字符串
| 参数 | 参数类型 | 默认值 | 说明 |
|---|---|---|---|
| time | string | - | 时间 |
| format | string | YYYY-MM-DD HH:mm:ss | 格式 |
| 返回值 | 返回类型 | 说明 |
|---|---|---|
| res | string | 格式结果 |
给定两个个时间(2023-04-27T07:32:39.000+00:00),返回相对时间
| 参数 | 参数类型 | 默认值 | 说明 |
|---|---|---|---|
| rTime | string | - | 待比较时间 |
| cTime | string | - | 待比较时间 |
| isBefore | boolean | true | 返回 xxx前 或 xxx后 |
| unit | unitOfTime.StartOf | hour | 单位 |
| lang | string | zh-cn | 国际化 |
| 返回值 | 返回类型 | 说明 |
|---|---|---|
| res | string | 相对时间结果 |
FAQs
## Function
The npm package @baiwusanyu/utils-date receives a total of 432 weekly downloads. As such, @baiwusanyu/utils-date popularity was classified as not popular.
We found that @baiwusanyu/utils-date 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
Feross Aboukhadijeh joins TBPN to discuss Socket's $60M Series C, 500%+ ARR growth, AI's impact on open source, and the rise in supply chain attacks.

Security News
OSV withdrew 157 OSV malware reports after automated false positives incorrectly flagged trusted npm and PyPI packages, sending bad records into tools that rely on OSV data.

Research
/Security News
TrapDoor crypto stealer hits 36 malicious packages across npm, PyPI, and Crates.io, targeting crypto, DeFi, AI, and security developers.