diff --git a/src/game/lib/util/date_util.js b/src/game/lib/util/date_util.js index bae3a69..25b9a37 100644 --- a/src/game/lib/util/date_util.js +++ b/src/game/lib/util/date_util.js @@ -3,7 +3,10 @@ function DateUtil() { DateUtil.getYYYYMMDD = function(date) { // return date.toISOString().slice(0,10); - return date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate(); + var yymmdd = date.getFullYear() + "-" + + ("0" + (date.getMonth() + 1)).slice(-2) + "-" + + ("0" + date.getDate()).slice(-2); + return yymmdd; } DateUtil.getHHMMSS = function(date) {