1.1.1 • Published 2 months ago

ms-human-format v1.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

Duration formatter and parser

This library helps to format duration to and from human readable format.

How to use

In NodeJS

import { parseDuration, formatMs } from "duration-formatter";

parseDuration("2hours 30 minutes, 20 sec 453ms") === 9020453;
formatMs(1296575243) === "2 weeks 1 day 9 minutes 35 seconds 243 milliseconds";

In the browser - not yet supported

More libraries like this one

1.1.1

2 months ago

1.1.0

2 months ago

1.0.2

1 year ago

1.0.0

1 year ago