/**
Returns the number of milliseconds between this date and date
@param {Date} date (optional) Defaults to now
- @param {Date} date (optional) Defaults to now
- @param {String} interval A valid date interval enum value (eg. Date.DAY)
- @return {Number} The diff in milliseconds
+ @param {String} interval (optional) Default Date.MILLI, A valid date interval enum value (eg. Date.DAY)
+ @return {Number} The diff in milliseconds or units of interval
@member Date getElapsed
*/
Date.prototype.getElapsed = function(date, interval)
case Date.SECOND:
return Math.floor(ret / (1000));
case Date.MINUTE:
- return Math.floor(ret / (100*60));
+ return Math.floor(ret / (1000*60));
case Date.HOUR:
- return Math.floor(ret / (100*60*60));
+ return Math.floor(ret / (1000*60*60));
case Date.DAY:
- return Math.floor(ret / (100*60*60*24));
+ return Math.floor(ret / (1000*60*60*24));
case Date.MONTH: // this does not give exact number...??
return ((date.format("Y") - this.format("Y")) * 12) + (date.format("m") - this.format("m"));
case Date.YEAR: // this does not give exact number...??
maxWidth : this.align == 'center' ? '100% !important' : (this.width + ' !important'),
width : this.align == 'center' ? '100%' : this.width,
margin: '0px',
- padding: '10px',
+ padding: this.align == 'center' ? '10px 0' : '0',
textAlign : this.align // seems to work for email..
},