code: function(aDate, bDate, addSub) {
              if(typeof(addSub) == 'undefined') { addSub = true };
              if(! aDate) { return bDate; }
              if(! bDate) { return aDate; }
              var a = Number(aDate);
              var b = Number(bDate);
              var c = addSub ? a + b : a - b;
              return new Date(c);
          }
docs: add two dates. if addSub is false, substract instead of add.