//2017-12-27 11:11 星期三
const WEEKMAP = {
0:"sunday",
1:"monday",
2:"tuesday",
3:"wednesday",
4:"thursday",
5:"friday",
6:"saturday",
}
function showTime() {
var d1 = new Date();
var year = d1.getFullYear();
var month = d1.getMonth() +1;
var week = WEEKMAP[d1.getDay()];
var hour = d1.getHours();
var minute = d1.getMinutes();
var day= d1.getDate();
var strTime = `
${year}-${month}-${day} ${hour}:${minute} ${week}
`
console.log(strTime)
}
showTime()