mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-05 11:35:26 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user