/**
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...??
*/
Roo.util.Observable = function(cfg){
+ console.log("UTIL OBSERVABLE CONSTRUCTOR");
cfg = cfg|| {};
this.addEvents(cfg.events || {});
* and is used as the component id. Otherwise, it is assumed to be a standard config object and is applied to the component.
*/
Roo.Component = function(config){
+ console.log("COMPONENT CONSTRUCTOR");
config = config || {};
if(config.tagName || config.dom || typeof config == "string"){ // element object
config = {el: config, id: config.id || config};