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)
人工智能学习网站:
https://chat.xutongbao.top