1.1.1 • Published 1 year ago

ms-human-format v1.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year 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