minus before time on overtime

This commit is contained in:
Klemek
2024-04-29 22:35:04 +02:00
parent 2210bc808e
commit 57503b251e
+3 -3
View File
@@ -78,12 +78,12 @@ let app = {
},
timerText() {
const delta = this.timerStarted
? Math.floor(Math.abs(this.timerEnd - new Date()) / 1000)
? Math.floor((this.timerEnd - new Date()) / 1000)
: this.showSelected
? this.selectedData.time * 60
: 0;
return `${String(Math.floor(delta / 60)).padStart(2, "0")}:${String(
delta % 60
return `${delta < 0 ? '-' : ''}${String(Math.floor(Math.abs(delta) / 60)).padStart(2, "0")}:${String(
Math.abs(delta) % 60
).padStart(2, "0")}`;
},
timeText(minutes) {