mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-06 03:55:26 +00:00
[fix] Issues with freebusy in attendees editor
This commit is contained in:
@@ -130,7 +130,7 @@ Date.prototype.deltaDays = function(otherDate) {
|
||||
day1 = tmp;
|
||||
}
|
||||
|
||||
return Math.floor((day2 - day1) / 86400000);
|
||||
return Math.round((day2 - day1) / 86400000);
|
||||
}
|
||||
|
||||
Date.prototype.daysUpTo = function(otherDate) {
|
||||
@@ -152,7 +152,7 @@ Date.prototype.daysUpTo = function(otherDate) {
|
||||
// var day1 = day1Date.getTime();
|
||||
// var day2 = day2Date.getTime();
|
||||
|
||||
var nbrDays = Math.floor((day2 - day1) / 86400000) + 1;
|
||||
var nbrDays = Math.round((day2 - day1) / 86400000) + 1;
|
||||
for (var i = 0; i < nbrDays; i++) {
|
||||
var newDate = new Date();
|
||||
newDate.setTime(day1 + (i * 86400000));
|
||||
@@ -217,9 +217,8 @@ Date.prototype.stringWithSeparator = function(separator) {
|
||||
};
|
||||
|
||||
Date.prototype.addDays = function(nbrDays) {
|
||||
var milliSeconds = this.getTime();
|
||||
milliSeconds += 86400000 * Math.round(nbrDays);
|
||||
this.setTime(milliSeconds);
|
||||
var dat = new Date(this.valueOf());
|
||||
this.setDate(dat.getDate() + Math.round(nbrDays));
|
||||
};
|
||||
|
||||
Date.prototype.earlierDate = function(otherDate) {
|
||||
|
||||
Reference in New Issue
Block a user