dateformater-plus
1.0.1 • Public • Published 安装
npm install date-formater
导入
在根组件或者main.js中,将方法绑定到Date的原型上
import dateFormaterPlus from 'dateFormater-plus'
window.Date.prototype.pattern=dateFormater.pattern
window.Date.prototype.getTimeRange=dateFormater.getTimeRange
格式化时间
const timeStr=new Date().pattern('yyyy-MM-dd E HH:mm:ss')
获取开始/结束时间数组
const timeArr=new Date().getTimeRange('week')
const timeArr=new Date('2021-08-01').getTimeRange('year')
......
Versions
Current Tags
Version | Downloads (Last 7 Days) | Tag |
---|
1.0.1 | 2 | latest |
Version History
Version | Downloads (Last 7 Days) | Published |
---|
1.0.1 | 2 | |
1.0.0 | 0 | |
Package Sidebar
Install
Weekly Downloads