vue计算某个日期加几天后的日期
作者:互联网
addDate(date,days){
var dates = new Date(date)
dates.setDate(dates.getDate()+days)
var year = dates.getFullYear()
var month = dates.getMonth()+1
var day = dates.getDate()
if(month<9)
{
month="0"+month
}
if(day<9)
{
day="0"+day
}
var time = year +'-'+month+'-'+day
return time
},
标签:dates,vue,days,month,var,日期,time,某个,day 来源: https://www.cnblogs.com/yll166/p/16435080.html