Skip to content

日期时间

// 毫秒时间戳
Date.now()

const now = new Date()

// 毫秒时间戳
now.getTime()

// 年、月、日
now.getFullYear()
now.getMonth() + 1
now.getDate()

// 时、分、秒
now.getHours()
now.getMinutes()
now.getSeconds()

联系 math@baima.site