A w3c adding duration to datetime implementation for node and the browser with no dependencies.
// Install
$ npm install xsdurationjs
// Require
var xsduration = require('xsdurationjs');
Download xsduration-0.0.2.min.js to your scripts directory and include it with a script tag.
<script type="text/javascript" src="/js/xsduration-0.0.2.min.js"></script>
It does not have any dependency.
$ bower install xsduration
// Add five months
var r = xsduration.add('P5M', new Date(2012,0,1);
// Add five years and five months
var r = xsduration.add('P5Y5M', new Date(2012,0,1);
MIT. See LICENSE file.