js 日期增加


 function DateAdd(s,year){
  if(!s) return "";
  var aDate = (s).split("-");
  var dDate =  ( parseInt(aDate[0]) + parseInt(year)) + "-" + (aDate[1]-1) + "-" + (aDate[2]);
  return dDate;
 }

有时间优化一下

原文地址:https://www.cnblogs.com/y0umer/p/3839190.html