Clone2.19.0+
moment.duration().clone();
Create a clone of a duration. Durations are mutable, just like moment objects,so this lets you get a snapshot, at some point in time.
var d1 = moment.duration();
var d2 = d1.clone();
d1.add(1, 'second');
d1.asMilliseconds() !== d2.asMilliseconds();
当前内容版权归 momentjs.com 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 momentjs.com .