Skip to content
Permalink
9bfb9ba527
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
33 lines (25 sloc) 518 Bytes
# parse-ms
> Parse milliseconds into an object
## Install
```
$ npm install parse-ms
```
## Usage
```js
import parseMilliseconds from 'parse-ms';
parseMilliseconds(1337000001);
/*
{
days: 15,
hours: 11,
minutes: 23,
seconds: 20,
milliseconds: 1,
microseconds: 0,
nanoseconds: 0
}
*/
```
## Related
- [to-milliseconds](https://github.com/sindresorhus/to-milliseconds) - The inverse of this module
- [pretty-ms](https://github.com/sindresorhus/pretty-ms) - Convert milliseconds to a human readable string