homework-//2017-12-27 11:11 星期三

//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()
上一篇:Java打印日历表


下一篇:构建之法 20191107-3 beta week 2/2 Scrum立会报告+燃尽图 02