Nodejs Day Add addDays(d)

Here you can find the source of addDays(d)

Method Source Code

Date.prototype.addDays = function (d) {
    if (d) {/*from   w w  w.j av  a2  s .  c o  m*/
        var t = this.getTime();
        t = t + (d * 86400000);
        this.setTime(t);
        return this;
    }
};

Related

  1. AddDays(amount)
    Date.prototype.AddDays = function(amount) {
       var d = new Date(this.getTime());
       d.setDate(this.getDate() + amount);
       return d;
    };
    
  2. 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();
    
  3. addDay()
    Date.prototype.addDay = function(){
      this.setDate(this.getDate() + 1);
    };
    
  4. addDay(day)
    Date.prototype.addDay = function(day) {
      if (null == day || isNaN(day)) {
        return this;
      this.setDate(this.getDate() + day);
      return this;
    };
    
  5. 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);
    };
    
  6. addDays(d)
    Date.prototype.addDays = function(d) {    
       this.setTime(this.getTime() + (d*24*60*60*1000)); 
       return this;   
    
  7. addDays(d)
    Date.prototype.addDays = function(d){
        this.setDate(this.getDate()+d);
        return this;
    
  8. addDays(d)
    Date.prototype.addDays = function(d) {
      this.setDate(this.getDate() + d);
    };
    Date.prototype.addWeeks = function(w) {
      this.addDays(w * 7);
    };
    Date.prototype.addMonths = function(m) {
      var d = this.getDate();
      this.setMonth(this.getMonth() + m);
    ...
    
  9. addDays(d)
    Date.prototype.addDays = function(d) {
      this.setDate(this.getDate() + d);
    };