Fix: history board monthday

This commit is contained in:
2018-09-14 23:19:51 +09:00
parent bc21cc77a7
commit c53465b00d
+7 -1
View File
@@ -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());