From c53465b00d560579601d4f53f0d02550119c61dd 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: Fri, 14 Sep 2018 23:19:51 +0900 Subject: [PATCH] Fix: history board monthday --- src/game/lib/string_util.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/game/lib/string_util.js b/src/game/lib/string_util.js index 8128a26..c59dd42 100644 --- a/src/game/lib/string_util.js +++ b/src/game/lib/string_util.js @@ -3,7 +3,13 @@ function StringUtil() { StringUtil.printMonthDay = function(date) { console.log(date); - let dateTime = new Date(date); + // let dateTime = new Date(date); + var a = date.split(" "); + var d = a[0].split("-"); + var t = "0:0:0".split(":"); + if(a.count > 0) + var t = a[1].split(":"); + var dateTime = new Date(d[0],(d[1]-1),d[2],t[0],t[1],t[2]); console.log(dateTime); console.log("month : " + dateTime.getMonth()); console.log("date : " + dateTime.getDate());