Skip to content

NoKnow606/klg-date

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

klg-date

date util

QuickStart

安装

npm i klg-date

引入

import {DateUtil} from 'klg-date'

获取凌晨时间

DateUtil.getDayStart()  // Date 对象

获取2天前的凌晨时间

DateUtil.getDayStart(null, -2)

获取指定日期2天前的凌晨时间

DateUtil.getDayStart(new Date('2018/6/15') -2) // 2018/6/13 00:00

其他用法见测试文件

Test

$ npm i
$ npm test

About

date util

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%