var date = new Date();
console.log(date.getFullYear()); //返回2020,2020年
console.log(date.getMonth()); //月 0-11
console.log(date.getDate()); //返回日 1-31
console.log(date.getHours()); //返回小时0-23
console.log(date.getMinutes()); //分钟0-59
console.log(date.getSeconds()); //秒0-59
console.log(date.getDay()); //3 星期3
console.log(date.getMilliseconds());//毫秒
console.log(date.getTime()); //时间戳