Add Time2.1.0+

  1. moment.duration().add(Number, String);
  2. moment.duration().add(Number);
  3. moment.duration().add(Duration);
  4. moment.duration().add(Object);

Mutates the original duration by adding time.

The same keys and shorthands used to create durations can be used here as the second argument.

  1. var a = moment.duration(1, 'd');
  2. var b = moment.duration(2, 'd');
  3. a.add(b).days(); // 3

Note that adding an invalid duration to any other duration results in an invalidduration.