JSPM

duration-time-conversion

1.0.6
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 398
  • Score
    100M100P100Q88561F
  • License MIT

Duration and time format conversion

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-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