/**
* param  Date Object:Mon May 11 13:53:08 UTC+0800 2015 
* n 自param 起向后多少天
* return Date Object:Mon May 11 13:53:08 UTC+0800 2015
*/
function getDateBeforeParamDate(param,n){
var result = new Date();
if(param==null){
param = result;
}
if(n==null){
n=0;
}
param = new Date(param);
millSecond = param.valueOf();
millSecond =  millSecond - n*24*3600*1000;
result = new Date(millSecond);
result = getTodayFormatea(result);
return result;
}
/**
* param  Date对象:Mon May 11 13:53:08 UTC+0800 2015 
* n 自param 向前多少天
* return Date Object:Mon May 11 13:53:08 UTC+0800 2015
*/
function getDateNextParamDate(param,n){
var result = new Date();
if(param==null){
param = result;
}
if(n==null){
n=0;
}
param = new Date(param);
millSecond = param.valueOf();
millSecond = millSecond + n*24*3600*1000;
result = new Date(millSecond);
result = getTodayFormatea(result);
return result;
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-12-16
  • 2021-11-28
  • 2022-12-23
  • 2021-09-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-07
  • 2022-12-23
  • 2022-02-21
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案