jy-time
v1.0.2
Published
`$ npm install axios` ######引入 `import Time from 'jy-time';`
Downloads
3
Readme
#历史时间
######安装
$ npm install axios
######引入
import Time from 'jy-time';
//1604208068 => 2020-11-01 13:21:08 //1604381007 => 2020-11-03 13:23:27
######不传代表 当前时间为起点,调用getDisplay传入2020-11-03 13:23:27
const time = new Time();
console.log(time.getDisplay(1604381007))//==>获取距离当前时间 ==>*天
######实例化传入2020-11-01 13:21:08
const time1 = new Time(1604208068);
######调用getDisplay传入2020-11-03 13:23:27
console.log(time.getDisplay(1604381007))//==>获取距离实例化传入时间 ==>2天