mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-27 09:02:43 +00:00
Monotone-Parent: 2e1dcc41f16703f7e960267eb2423ae6d874faa3
Monotone-Revision: 8cf6ef1038282940b0c3e54c8dc7b05dd3a5a6e3 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-06-12T18:55:26 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -72,6 +72,7 @@ Date.prototype.sogoDayName = function() {
|
||||
|
||||
Date.prototype.daysUpTo = function(otherDate) {
|
||||
var days = new Array();
|
||||
|
||||
var day1 = this.getTime();
|
||||
var day2 = otherDate.getTime();
|
||||
|
||||
@@ -147,11 +148,20 @@ Date.prototype.addDays = function(nbrDays) {
|
||||
}
|
||||
|
||||
Date.prototype.earlierDate = function(otherDate) {
|
||||
return ((this.getTime() < otherDate.getTime())
|
||||
var workDate = new Date();
|
||||
workDate.setTime(otherDate.getTime());
|
||||
workDate.setHours(0);
|
||||
return ((this.getTime() < workDate.getTime())
|
||||
? this : otherDate);
|
||||
}
|
||||
|
||||
Date.prototype.laterDate = function(otherDate) {
|
||||
return ((this.getTime() < otherDate.getTime())
|
||||
var workDate = new Date();
|
||||
workDate.setTime(otherDate.getTime());
|
||||
workDate.setHours(23);
|
||||
workDate.setMinutes(59);
|
||||
workDate.setSeconds(59);
|
||||
workDate.setMilliseconds(999);
|
||||
return ((this.getTime() < workDate.getTime())
|
||||
? otherDate : this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user