MomentJS - Clone



This method creates clone of the duration.

Syntax

moment.duration().clone();

Example

var a = moment.duration(2, 'days');
var b = a.clone();

Output

Clone
momentjs_durations.htm
Advertisements