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

    xsdurationjspublic

    build status xsdurationjs

    Implementation of adding duration to datetime

    Install

    node.js:

    $ npm install xsdurationjs
    

    Browser: Download xsdurationjs to your js directory and put a script tag

    <script type="text/javascript" src="/js/xsduration.js"></script>
    

    It does not have any dependency.

    synopsis

    // node.js
    var xsduration = require('xsdurationjs');
    
    var r =	xsduration.add('P5M', new Date(2012,0,1);
    console.log(r); // puts Thu, 31 May 2012 22:00:00 GMT
    
    // browser
    <script type="text/javascript" src="/js/xsduration.js"></script>
    <script type="text/javascript">
    	var r =	xsduration.add('P5M', new Date(2012,0,1);
    </script>
    

    License

    MIT. See LICENSE file.

    Keywords

    none

    install

    npm i xsdurationjs

    Downloadslast 7 days

    0

    version

    0.0.2

    license

    none

    last publish

    collaborators

    • avatar