pv-date-handle

0.0.1 • Public • Published

pv-date-handle

这是一个时间格式化转换的小工具,简单易用

快速开始

安装npm install pv-date-handle -S

import formateDate from 'pv-date-handle'

formateDateMethod () {
    return formateDate(new Date(), 'hh:mm')
}
  • 两个参数与,time可以为String,例如'2018/9/13 15:35:00',可以为Number,例如1536824191554,还可以为new Date()

  • type的值String:

hh:mm(小时:分钟)

mm:ss(分钟:)

hh:mm:ss(小时:分钟:)

mm-dd hh:mm:ss(/ 小时:分钟:)

mm-dd hh:mm(/ 小时:分钟)

yy-mm-dd、mm-dd(// 小时:分钟)

yy-mm-dd hh:mm:ss(// 小时:分钟:)

CDN

CDN引入<script src='https://unpkg.com/ pv-date-handle/index.js'></script>

交流 & 提问

关于作者

Readme

Keywords

Package Sidebar

Install

npm i pv-date-handle

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

3.91 kB

Total Files

5

Last publish

Collaborators

  • baolilei