2.0.3 • Published 10 months ago

date-simple v2.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

作用:获得一个输入的时间距离现在多久的字符串 几分钟前,几小时前,几天前,几星期前,几月前,几年前

安装: npm i date-simple

const dateSimple = require("date-simple");
//time 为(返回 1970 年 1 月 1 日至之前某个时间的毫秒数)
//=>const time = 过去的时间(与new Date()生成的格式一致).getTime()
dateSimple.formatTime(time);

eg:

const dateSimple = require("date-simple");
console.log(dateSimple.formatTime(1563190210000));
2.0.3

10 months ago

2.0.2

10 months ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago