开发中遇到根据日期进行筛选从三个月前的时间当前时间
下面上代码 得出三个月前的时间戳getThreeMonths() { // let timeOne = new Date(1575158521000) let timeOne = new Date(new Date(new Date().toLocaleDateString()).getTime()); let year = timeOne.getFullYear() let month = timeOne.getMonth() + 1 let day = timeOne.getDate() let hours = timeOne.getHours() let minutes = timeOne.getMinutes() let seconds = timeOne.getSeconds() // console.log(
现在的时间是:${year}-${month}-${day} ${hours}