mynpm-timeago

1.0.0 • Public • Published

number-timeago Build Status

A number timeago package support 2..years.ago() method

Install

$ npm install number-timeago

It's also available on NPMCDN https://unpkg.com/number-timeago@0.1.1/number.timeago.js

Usage

Node.js CommonJS

require("number-timeago")();

AMD

require(['number-timeago'], function (NumberTimeAgo) {
  NumberTimeAgo();
});  

then

// seconds
20..seconds // => 20,000 milliseconds
// minutes
10..minutes // => 600,000 milliseconds
// weeks, days, months, years so on
 
// time ago
2..months.ago() // will return 2 months ago Date object
// => Mon Mar 28 2016 11:46:07 GMT+0800 (CST)

License

MIT © Falm

Readme

Keywords

Package Sidebar

Install

npm i mynpm-timeago

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • shiyun1013