Permalink
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (16 sloc) 446 Bytes
title version signature
Add Time
2.1.0
moment.duration().add(Number, String); moment.duration().add(Number); moment.duration().add(Duration); 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.

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