
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@deepjs/date
Advanced tools
日期相关格式处理
独立包,无依赖
功能列表
import {
formatNum,
formatDate,
formatCountDown, // 计划废弃,请使用 genCountdownStr 替代
genCountdownStr,
genCountdownObj,
genSplitorObj,
} from '@deepjs/date'
const format = 'd天H:F:S'
formatNum(0) // 00
formatCountDown(10000) // '00:00:10'
// 新方法
genCountdownStr(9000) // '00:00:09'
genCountdownObj(9000)
// { d: 0, H: '00', h: 0, F: '00', f: 0, S: '09', s: 9 }
genSplitorObj(format)
// { H: ':', F: ':', S: ''}
genSplitorObj('d天 H时f分S秒')
// {d: '天 ', H: '时', f: '分', S: '秒'}
const date = +new Date('2018-12-17 19:04:09');
formatDate(date) // '2018年12月17日'
formatDate(date, 'M-D') // '12-17'
formatDate(date, 'Y-M-D H:F:S') // '2018-12-17 19:04:09'
FAQs
date utils
We found that @deepjs/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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.