parse-ms
Parse milliseconds into an object
Last updated 8 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install parse-ms 
SYNC missed versions from official npm registry.

parse-ms

Parse milliseconds into an object

Install

npm install parse-ms

Usage

import parseMilliseconds from 'parse-ms';

parseMilliseconds(1337000001);
/*
{
	days: 15,
	hours: 11,
	minutes: 23,
	seconds: 20,
	milliseconds: 1,
	microseconds: 0,
	nanoseconds: 0
}
*/

parseMilliseconds(1337000001n);
/*
{
	days: 15n,
	hours: 11n,
	minutes: 23n,
	seconds: 20n,
	milliseconds: 1n,
	microseconds: 0n,
	nanoseconds: 0n
}
*/

Related

Current Tags

  • 4.0.0                                ...           latest (2 years ago)

9 Versions

  • 4.0.0                                ...           2 years ago
  • 3.0.0                                ...           5 years ago
  • 2.1.0                                ...           7 years ago
  • 2.0.0                                ...           8 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           12 years ago
  • 0.1.2                                ...           12 years ago
  • 0.1.1                                ...           12 years ago
  • 0.1.0                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 5
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |