const startDate = new Date('2017-11-10')const endDate = new Date('2018-12-14')const diffTime = Math.abs(endDate - startDate)const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24))console.log(diffDays) // 输出天数差
人工智能学习网站
https://chat.xutongbao.top