自定义获取指定日期
//获取day天后的日期:格式为2010-1-1
Date.prototype.calculateDate = function(day) {
this.setDate(this.getDate() + day); //计算新日期
return this.getFullYear() + '-' + (this.getMonth() + 1) + '-' + this.getDate();
}
//获取day天后的日期:格式为2010-1-1
Date.prototype.calculateDate = function(day) {
this.setDate(this.getDate() + day); //计算新日期
return this.getFullYear() + '-' + (this.getMonth() + 1) + '-' + this.getDate();
}
暂无评论。
评论功能维护中,当前仅展示历史评论。