let date1 = new Date(参数:this.beginTime)
let date2 = new Date(参数:this.endTime)
let options = {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit'
}
let result1 = new Intl.DateTimeFormat('zh-CN', options).format(date1)
let result2 = new Intl.DateTimeFormat('zh-CN', options).format(date2)
时间转化并标准化代码(超简单)
最新推荐文章于 2023-11-07 15:30:53 发布