Notify President Madagascar
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    moment-isodurationpublic

    moment-isoduration

    Moment.js durations using ISO 8601

    Create moment duration from ISO 8601 duration string

    var duration = moment.duration.fromIsoduration('P3Y6M7W4DT12H30M5S');

    Get ISO 8601 representation of moment duration

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

    Keywords

    none

    install

    npm i moment-isoduration

    Downloadsweekly downloads

    2

    version

    0.0.3

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar