bug fix current quartal

This commit is contained in:
Florian Schmid 2023-04-28 21:36:15 +02:00
parent f552bc99b9
commit fa68450373

View File

@ -167,7 +167,8 @@ class ViewModel {
}
private getCurrentQuartal(dateArray) {
let quartal = Math.ceil(dateArray[1] % 4);
let quartal = Math.ceil(Number(dateArray[1] / 4));
return "Q" + quartal + " " + dateArray[0];
}
@ -178,7 +179,7 @@ class ViewModel {
}
processClick(text: string): boolean {
let result = text == this.repo.currentCpu.date;
let result = text == this.getCurrentQuartal(this.currentCpu.date.split("-"));
if (result) {
this.incrementScore(2);
} else {