Monotone-Parent: 01621f78171d7d62c9f2ae9d1fdfb5891f9447d7

Monotone-Revision: fc65291441ddc5ab8f0f12739ef176375714b331

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-06-07T23:23:29
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-06-07 23:23:29 +00:00
parent 26b3dfa6b0
commit 4abf2693d0
2 changed files with 34 additions and 8 deletions
@@ -77,6 +77,28 @@ Date.prototype.daysUpTo = function(otherDate) {
return days;
}
Date.prototype.getDayString = function() {
var newString = this.getYear() + 1900;
var month = '' + (this.getMonth() + 1);
if (month.length == 1)
month = '0' + month;
newString += month;
var day = '' + this.getDate();
if (day.length == 1)
day = '0' + day;
newString += day;
return newString;
}
Date.prototype.getHourString = function() {
var newString = this.getHours() + '00';
if (newString.length == 3)
newString = '0' + newString;
return newString;
}
Date.prototype.stringWithSeparator = function(separator) {
var month = '' + (this.getMonth() + 1);
var day = '' + this.getDate();