Skip to content

zhw2590582/duration-time-conversion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.t2d("01:01:01.111") === 3661.111;

License

MIT © Harvey Zack

About

Duration and time format conversion

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published