time-resolutions
A collection of time resolutions in milliseconds
installation
$ npm install time-resolutions
usage
var resolutions = ; // 150 millisecondsvar ms = 150; var m = resolutions; // millisecond // 3.5 secondsvar secs = 3500; var s = resolutions; // second // 2.5 weeksvar weeks = 25 * 1000 * 60 * 60 * 24 * 7; var w = resolutions; // week // how many milliseconds are in 3 weeks?var ms = 3 * resolutionsweek;
var resolutions.resolve(ms)
Return a string that represents the resolution of the millisecond gap you provide.
var ms = resolutions.ms('week')
Get how many milliseconds there are in a:
- second
- minute
- hour
- day
- week
- month
- year
var resolutions = ; var ms_in_a_week = resolutions;
license
MIT