Skip to content

jacobmarshall-pkg/human-time

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

@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

About

Display time in a human-readable format.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%