We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcbd2e8 commit 8c2d9f3Copy full SHA for 8c2d9f3
date-parser.ts
@@ -32,4 +32,10 @@ export function isValidDate(date: string) {
32
33
export function timeDiffCalc(dateA: any, dateB: any = Date.now()) {
34
return new Date(Math.abs(dateB - dateA)).toISOString().substring(11, 19);
35
+}
36
+
37
+export function formatTimeDigitalClock(s: number) {
38
+ const mm = Math.floor(s / 60);
39
+ const ss = s % 60;
40
+ return `${String(mm).padStart(2, "0")}:${String(ss).padStart(2, "0")}`;
41
}
0 commit comments