friendly-time

1.1.1 • Public • Published

friendly-time

npm Travis Codecov

Prints human friendly timestamps (eg. just now, 5 minutes ago, 3 days from now).

Usage

var friendlyTime = require('friendly-time');
 
var now = new Date();
var minutes = new Date(now - (1000 * 60 * 5));
var days = new Date(now + (1000 * 60 * 60 * 24 * 3));
 
friendlyTime(now); // just now
friendlyTime(minutes); // 5 minutes ago
friendlyTime(days); // 3 days from now

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.161latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.161
1.1.00
1.0.00

Package Sidebar

Install

npm i friendly-time

Weekly Downloads

61

Version

1.1.1

License

MIT

Unpacked Size

137 kB

Total Files

6

Last publish

Collaborators

  • brams-dev