@jrohlandt/hhmmss

1.1.0 • Public • Published

Convert seconds and milliseconds to a HH:mm:ss.SSS formatted string.

Installation:

npm install @jrohlandt/hhmmss

Usage:

const { mstohhmmss, sectohhmmss } = require("@jrohlandt/hhmmss");

mstohhmmss(5123)
// "00:00:05"

// keepFractions of seconds true
mstohhmmss(5123, true)
// "00:00:05.123"

sectohhmmss(5.123)
// "00:00:05"

// keepFractions of seconds true
sectohhmmss(5.123, true)
// "00:00:05.123"

Readme

Keywords

none

Package Sidebar

Install

npm i @jrohlandt/hhmmss

Weekly Downloads

2

Version

1.1.0

License

ISC

Unpacked Size

2.77 kB

Total Files

5

Last publish

Collaborators

  • jrohlandt