此外也有看過setDate()方式來作增減的,不過跨月份的話用setDate()方式就會出錯
  /**
  *  AddDate
  *
  *  add the date  
  *  
  *  param: day    [in] : the day , Date() format. 
  *  param: dadd   [in] : the day diffefent , integer format. 
  *
  *  
  *  return:   date 
  *   
  *  
  *  
  */   
  function AddDate(date,dadd){
   
   date = date.valueOf();
   date = date + dadd * 24 * 60 * 60 * 1000;
   date = new Date(date);
   return date;
  }
 
沒有留言:
張貼留言