js-ago:UNIX时间戳的简单“时间”前

时间:2021-05-26 11:16:53
【文件属性】:
文件名称:js-ago:UNIX时间戳的简单“时间”前
文件大小:29KB
文件格式:ZIP
更新时间:2021-05-26 11:16:53
JavaScript js-ago Unix时间戳和JavaScript Date对象的简单“时间”。 安装 npm install js-ago 或者 yarn add js-ago 用法 js_ago函数接受两个参数: js_ago(timestamp[, options]); [必需] timestamp : Date()对象或Unix时间戳记 [可选] options :对象: { format: 'short' | 'medium' (_default_) | 'long' } { format: 'short' | 'medium' (_default_) | 'long' } import js_ago from 'js-ago' ; // or // const js_ago = require('js_ago'); js_ago ( new Date ( '2020-10-17' )
【文件预览】:
js-ago-master
----index.js(2KB)
----package.json(810B)
----.eslintrc.json(246B)
----tests()
--------index.test.js(2KB)
----LICENSE(1KB)
----.gitignore(21B)
----README.md(2KB)
----yarn.lock(59KB)
----.prettierrc.json(133B)

网友评论