Displays padded time string.

Type signature

(source: [number, number, number], showSeconds: boolean) => string

Examples

displayTime([5, 12, 16], false);
// ⇒ 05:12
Try in REPL
displayTime([5, 12, 16], true);
// ⇒ 05:12:16
Try in REPL

Questions

  • How to display padded time?

TypeScript sourceJavaScript source