我的服务器发送当前服务器时间,我需要用JS处理它们。
var currentDate = new Date(someYear, someMonth, someDay, 12);
console.log(currentDate.getDate()+'.'
+currentDate.getMonth()+'.'
+currentDate.getFullYear()
); //8.4.2016 - this is right, today is 8th April of 2016
console.log(currentDate.getDay()); // 0. But today is Friday, not Monday!
为什么currentDay.getDay()返回错误的数字?