code: function addOrSubtractDurationFromMoment(mom, duration, isAdding) {
          var ms = duration._milliseconds,
              d = duration._days,
              M = duration._months,
              currentDate;
  
          if (ms) {
              mom._d.setTime(+mom + ms * isAdding);
          }
          if (d) {
              mom.date(mom.date() + d * isAdding);
          }
          if (M) {
              currentDate = mom.date();
              mom.date(1)
                  .month(mom.month() + M * isAdding)
                  .date(Math.min(currentDate, mom.daysInMonth()));
          }
      }
docs: helper function for _.addTime and _.subtractTime