Skip to content

akbaruddin/duration

Repository files navigation

Duration

Simple JavaScript function to convert string format hh:mm:ss to milisecconds

Example

// `hh:mm:ss` to milliseconds
// `00:00:10` => `10000`

const time = duration("00:00:20");
console.log(time); // output 20000