Package Exports
- duration-time-conversion
- duration-time-conversion/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (duration-time-conversion) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
duration-time-conversion
Duration and time format conversion
Install
Install with npm
$ npm install duration-time-conversionOr install with yarn
$ yarn add duration-time-conversionimport 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