minus before time on overtime
This commit is contained in:
@@ -78,12 +78,12 @@ let app = {
|
|||||||
},
|
},
|
||||||
timerText() {
|
timerText() {
|
||||||
const delta = this.timerStarted
|
const delta = this.timerStarted
|
||||||
? Math.floor(Math.abs(this.timerEnd - new Date()) / 1000)
|
? Math.floor((this.timerEnd - new Date()) / 1000)
|
||||||
: this.showSelected
|
: this.showSelected
|
||||||
? this.selectedData.time * 60
|
? this.selectedData.time * 60
|
||||||
: 0;
|
: 0;
|
||||||
return `${String(Math.floor(delta / 60)).padStart(2, "0")}:${String(
|
return `${delta < 0 ? '-' : ''}${String(Math.floor(Math.abs(delta) / 60)).padStart(2, "0")}:${String(
|
||||||
delta % 60
|
Math.abs(delta) % 60
|
||||||
).padStart(2, "0")}`;
|
).padStart(2, "0")}`;
|
||||||
},
|
},
|
||||||
timeText(minutes) {
|
timeText(minutes) {
|
||||||
|
|||||||
Reference in New Issue
Block a user