Nodejs Day Add AddDays(amount)

Here you can find the source of AddDays(amount)

Method Source Code

/**/*from  ww  w .  j a v  a2 s  .c om*/
 *  Add 'amount' days to this date and return a new date object
 */
Date.prototype.AddDays = function(amount) {
   var d = new Date(this.getTime());
   d.setDate(this.getDate() + amount);
   return d;
};

Related

  1. AddDays(days)
    Date.prototype.AddDays = function (days) {
      this.setDate(this.getDate() + parseInt(days));
      return this.getFullYear() + "-" + (((this.getMonth()+1) < 10)?"0":"") + (this.getMonth()+1) +"-"+ ((this.getDate() < 10)?"0":"") + this.getDate();
    
  2. addDay()
    Date.prototype.addDay = function(){
      this.setDate(this.getDate() + 1);
    };
    
  3. addDay(day)
    Date.prototype.addDay = function(day) {
      if (null == day || isNaN(day)) {
        return this;
      this.setDate(this.getDate() + day);
      return this;
    };
    
  4. addDayaddDay ()
    Date.prototype.addDay = function addDay () {
      var day = this.getDate();
      this.setDate(day + 1);
      this.setHours(0);
      this.setMinutes(0);
      this.setSeconds(0);
      if (this.getDate() === day) {
        this.setDate(day + 2);
    };