function GetDateStr(AddDayCount) {
var dd = new Date();
dd.setDate(dd.getDate()+AddDayCount);//获取AddDayCount天后的日期
var y = dd.getFullYear();
var m = dd.getMonth()+1;//获取当前月份的日期
var d = dd.getDate();
if (m >= 1 && m <= 9) {
m = "0" + m;
}
if (d>= 0 && d<= 9) {
d= "0" + d;
}
return y+"-"+m+"-"+d;
}
时间: 2024-10-12 16:26:43