create timespans objects for using with native js dates


Timespan is a chainable object you can use to create timespans for interacting with the js Date object in node.js.

Import into your file and create a timespan

   var Timespan = require('./timespan');
   var ts = new Timespan();

Add time


Add to a date

   var date = new Date();
   date = ts.addToDate(date);

Timespan is very for intervals and timeouts

    var everyThirtyMinutes = new Timespan().addMinutes(30);