feature(util) change format of date in logs

This commit is contained in:
coderaiser 2014-04-28 09:24:02 -04:00
parent c37509cfeb
commit 0ce853c147

View file

@ -1013,13 +1013,26 @@
* Gets current date in format yy.mm.dd hh:mm:ss
*/
this.getDate = function() {
var date = new Date(),
var date = Util.getShortDate(),
time = Util.getTime(),
ret = date + ' ' + time;
return ret;
};
this.getShortDate = function() {
var ret,
date = new Date(),
day = date.getDate(),
month = date.getMonth() + 1,
year = date.getFullYear(),
lRet = year + '-' + month + '-' + day + ' ' + Util.getTime();
year = date.getFullYear();
if (month <= 9)
month = '0' + month;
return lRet;
ret = year + '.' + month + '.' + day;
return ret;
};
}