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