moment-isoduration

Adds ISO 8601 duration to support to moment durations.

moment-isoduration

Moment.js durations using ISO 8601

var duration = moment.duration.fromIsoduration('P3Y6M7W4DT12H30M5S');
var duration = moment.duration({
  years: 1,
  days: 2,
  minutes: 61
});
duration.isoduration(); // "P1Y2DT1H1M"