Fix: DateUtil.getDate bug
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
class DateUtil {
|
||||
|
||||
static getYYYYMMDD(date) {
|
||||
return date.toISOString().slice(0,10);
|
||||
// return date.toISOString().slice(0,10);
|
||||
return date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
|
||||
}
|
||||
|
||||
static getHHMMSS(date) {
|
||||
|
||||
@@ -13,11 +13,11 @@ class Game {
|
||||
|
||||
let scoreBoard = new ScoreBoard();
|
||||
scoreManager.addOnChangeScoreListener( score => {
|
||||
sessionStorageManager.score = score;
|
||||
sessionStorageManager.record = score;
|
||||
scoreBoard.printScore(NumberUtil.numberWithCommas(score));
|
||||
});
|
||||
scoreManager.addOnChangeHighScoreListener( highScore => {
|
||||
sessionStorageManager.highScore = highScore;
|
||||
sessionStorageManager.bestRecord = highScore;
|
||||
screenBottom.printBottomLeftText("최고 기록 : " + NumberUtil.numberWithCommas(highScore));
|
||||
});
|
||||
|
||||
|
||||
@@ -23,17 +23,9 @@ class HistoryBoard {
|
||||
return;
|
||||
}
|
||||
|
||||
let maxIndex = historyRecordManager.count - 1;
|
||||
if(maxIndex > 6)
|
||||
maxIndex = 6;
|
||||
|
||||
for(let i = 0; i < historyRecordManager.count; i++) {
|
||||
if(i > 6)
|
||||
break;
|
||||
|
||||
let data = historyRecordManager.getAt(maxIndex);
|
||||
let data = historyRecordManager.getAt(i);
|
||||
this.printRecord(i, data.date, data.bestRecord);
|
||||
maxIndex--;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user