console 命令行工具
X
clear
> "2025-06-09T02:09:29.274Z",2025,6
> 2025年6月9日星期一2:9:29
console
var date = new Date()
const nowYear = date.getFullYear()
const nowMonth = date.getMonth() + 1
const nowDate = date.getDate()
const weekDay = ['星期天','星期一','星期二','星期三','星期四','星期五','星期六','星期天']
const nowWeek = weekDay[date.getDay()]
const nowHour = date.getHours()
const nowMinute = date.getMinutes()
const nowSecond = date.getSeconds()
console.log(date,nowYear,nowMonth)
console.log(nowYear + '年' + nowMonth + '月'+ nowDate +'日'+ nowWeek + nowHour + ':' + nowMinute + ':' + nowSecond)