date-library
v1.0.10
Published
awsome date
Downloads
5
Maintainers
Readme
dateLib is a class extends Date
instanceof Date,and extend properties and methods,you can use as Date;
Installing
npm install date-library
Using
const dateLib = require('date-library')
import dateLib from 'date-library'
doc
Property
year
get or setmonth
get or setweek
getdate
get or set 返回当月的第几天day
get 返回星期几hours
get or setminutes
get or setseconds
get or settimeStamp
get or set
Method
format
yy MM dd hh mm ssget12Ts
返回从12点开始的秒级时间戳,不会改变原时间add
can use as chainisBefore
isAfter
clone
setStart
会改变原时间
static
getByOffset
参数同addmax
min
duration
获取一段时间的Date array