From 7046958cb75ce5c5d82785544676d52be0035b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Thu, 17 May 2018 19:11:13 +0900 Subject: [PATCH] Fix: start graph with db data --- src/game/start/start.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/game/start/start.js b/src/game/start/start.js index bca9dad..4f259d9 100644 --- a/src/game/start/start.js +++ b/src/game/start/start.js @@ -76,12 +76,17 @@ class Start { const CHART_GAP_PX = 120; const style = { font: "32px Arial", fill: "#fff", align: "left", boundsAlignH: "center", boundsAlignV: "middle" }; - let dateText = game.add.text(100 + index * CHART_GAP_PX, game.world.height - 140, date, style); + let dateTime = new Date(date); + console.log(dateTime); + console.log((dateTime.getMonth() + 1) + "월 " + dateTime.getDate() + "일"); + let monthDay = (dateTime.getMonth() + 1) + "월 " + dateTime.getDate() + "일"; + + let dateText = game.add.text(100 + index * CHART_GAP_PX, game.world.height - 140, monthDay, style); dateText.setTextBounds(0, 0, 100, 100); dateText.stroke = "#333"; dateText.strokeThickness = 1; - let numberWithCommas = NumberUtil.numberWithCommas(score); + let numberWithCommas = NumberUtil.numberWithCommas(Math.floor(score)); let scoreText = game.add.text(100 + index * CHART_GAP_PX, game.world.height - 300, numberWithCommas, style); scoreText.setTextBounds(0, 0, 100, 100); scoreText.stroke = "#333";