js获取天数

gettoday(){
      let date = new Date()
      let day = date.getDate()
      let year = date.getFullYear()
      let month = date.getMonth()+1
      let days = this.amountday(year,month,day)
      return days
    },

js获取年月日时,月份是从0开始计算直到11月,所以如果需要获取到当前真正的月份需要date.getMonth()+1才是当前真正月份