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
- VersionDownloads (Last 7 Days)
- 1.0.1
0
Version History
Package Sidebar
Install
Weekly Downloads
Last publish