/ Format time component to add leading zero const format = value => 0${value}.slice(-2); // Breakdown to hours, mins, secs let hours = getHours(time); const mins = getMinutes(time); const secs = getSeconds(time);
0${value}