mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-13 08:15:06 +01:00
fix time control once again
This commit is contained in:
parent
40cca10660
commit
6353bf3799
@ -11,13 +11,13 @@ function formatSeconds(secs: number, showHours = false): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let time = secs;
|
let time = secs;
|
||||||
const seconds = time % 60;
|
const seconds = Math.floor(time % 60);
|
||||||
|
|
||||||
time = Math.floor(time / 60);
|
time /= 60;
|
||||||
const minutes = time % 60;
|
const minutes = Math.floor(time % 60);
|
||||||
|
|
||||||
time = Math.floor(time / 60);
|
time /= 60;
|
||||||
const hours = time;
|
const hours = Math.floor(time);
|
||||||
|
|
||||||
const paddedSecs = seconds.toString().padStart(2, "0");
|
const paddedSecs = seconds.toString().padStart(2, "0");
|
||||||
const paddedMins = minutes.toString().padStart(2, "0");
|
const paddedMins = minutes.toString().padStart(2, "0");
|
||||||
|
Loading…
Reference in New Issue
Block a user