1.0.2 • Published 2 years ago

jerry_time_now v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

时间戳处理函数

Time 对象上有一些函数,功能如下:

  • Time.now() 返回当前时间,,格式为:年-月-日 时:分:秒。例如2022-04-27 08:23:34

  • Time.from(time) 返回 时间戳 time 相对于当前时间过去了多少,其返回值包括:

    + 刚刚
    + ……分钟前
    + ……小时前
    + ……天前
    + ……月前