Nocturnally Psychologizing Millipede
Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

duration-time-conversion

1.0.1 • Public • Published

duration-time-conversion

Duration and time format conversion

Install

Install with npm

$ npm install duration-time-conversion

Or install with yarn

$ yarn add duration-time-conversion
import DT from "duration-time-conversion.js";

Or umd builds are also available

<script src="path/to/duration-time-conversion.js"></script>

Will expose the global variable to window.DT.

Usage

// Duration to time
DT.d2t(3661.111) === "01:01:01.111";
 
// Time to Duration
DT.d2t("01:01:01.111") === 3661.111;

License

MIT © Harvey Zack

Install

npm i duration-time-conversion

DownloadsWeekly Downloads

7

Version

1.0.1

License

MIT

Unpacked Size

6.14 kB

Total Files

6

Last publish

Collaborators

  • avatar