@jacobmarshall/human-time

0.1.0 • Public • Published

@jacobmarshall/human-time

Display time in a human-readable format.

Usage

You can install the library using npm

$ npm install --save @jacobmarshall/human-time

and use it like

import human from '@jacobmarshall/human-time';

human(new Date());
// => "just now"

human(new Date(Date.now() + 5 * 1000))
// => "5 seconds from now"

human(new Date(Date.now() + 5 * 1000), false)
// => "5 seconds"

License

MIT

Package Sidebar

Install

npm i @jacobmarshall/human-time

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • jacobmarshall