Skip to content

Commit

Permalink
Zero-pad hours to two digits when they exist
Browse files Browse the repository at this point in the history
  • Loading branch information
davemevans committed Aug 13, 2024
1 parent 986949e commit 3832705
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@
}
m = Math.floor((seconds - 3600*h) / 60);
s = Math.floor(seconds - 3600*h - 60*m);
return (h ? h + ":" : "") + ("" + m).padStart(2, "0") + ":" + ("" + s).padStart(2, "0") + "." + ms;
return (h ? ("" + h).padStart(2, "0") + ":" : "") + ("" + m).padStart(2, "0") + ":" + ("" + s).padStart(2, "0") + "." + ms;
}
function serializeCueSettings(cue) {
var result = ""
Expand Down

0 comments on commit 3832705

Please sign in to comment.