Monotone-Parent: 1e6376f6599d032a3b57fc881d7ead6d4f903195

Monotone-Revision: 4fb91535d64ab4fed607ffde0f99efdc1f92a6e6

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2007-08-07T18:14:39
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2007-08-07 18:14:39 +00:00
parent 4e23c849c9
commit 679ef1b24f
7 changed files with 55 additions and 35 deletions
@@ -96,7 +96,8 @@ Date.prototype.daysUpTo = function(otherDate) {
}
Date.prototype.getDayString = function() {
var newString = this.getYear() + 1900;
var newString = this.getYear();
if (newString < 1000) newString += 1900;
var month = '' + (this.getMonth() + 1);
if (month.length == 1)
month = '0' + month;
@@ -132,15 +133,18 @@ Date.prototype.getDisplayHoursString = function() {
Date.prototype.stringWithSeparator = function(separator) {
var month = '' + (this.getMonth() + 1);
var day = '' + this.getDate();
var year = this.getYear();
if (year < 1000)
year = '' + (year + 1900);
if (month.length == 1)
month = '0' + month;
if (day.length == 1)
day = '0' + day;
if (separator == '-')
str = (this.getYear() + 1900) + '-' + month + '-' + day;
str = year + '-' + month + '-' + day;
else
str = day + '/' + month + '/' + (this.getYear() + 1900);
str = day + '/' + month + '/' + year;
return str;
}