js获取年月日
const date = new Date()
const options = { year: 'numeric', month: '2-digit', day: '2-digit' }
const dateString = date.toLocaleDateString('zh-CN', options)
const [year, month, day] = dateString.split('/')
console.log(year, month, day)
人工智能学习网站: