bug 349040: Changes to events are not reflected in the day view. r=lilmatt, jminta

This commit is contained in:
mvl%exedo.nl 2006-08-21 18:32:17 +00:00
parent bd86d8b207
commit c435e0ba25
2 changed files with 14 additions and 8 deletions

View File

@ -260,14 +260,17 @@ calEvent.prototype = {
var start = convertDate(this.startDate);
var end = convertDate(this.endDate);
var queryStart = convertDate(aStartDate);
var queryEnd = convertDate(aEndDate);
var isZeroLength = !start.compare(end);
if ((isZeroLength &&
start.compare(aStartDate) >= 0 &&
start.compare(aEndDate) < 0) ||
start.compare(queryStart) >= 0 &&
start.compare(queryEnd) < 0) ||
(!isZeroLength &&
start.compare(aEndDate) < 0 &&
end.compare(aStartDate) > 0)) {
start.compare(queryEnd) < 0 &&
end.compare(queryStart) > 0)) {
aCount.value = 1;
return ([ this ]);

View File

@ -268,16 +268,19 @@ calTodo.prototype = {
var entry = convertDate(this.entryDate);
var due = convertDate(this.dueDate);
var queryStart = convertDate(aStartDate);
var queryEnd = convertDate(aEndDate);
var isInterval = entry && due;
var isZeroLength = isInterval ? !entry.compare(due) : true;
var dateTime = entry ? entry : due;
if ((isZeroLength &&
dateTime.compare(aStartDate) >= 0 &&
dateTime.compare(aEndDate) < 0) ||
dateTime.compare(queryStart) >= 0 &&
dateTime.compare(queryEnd) < 0) ||
(!isZeroLength &&
entry.compare(aEndDate) < 0 &&
due.compare(aStartDate) > 0)) {
entry.compare(queryEnd) < 0 &&
due.compare(queryStart) > 0)) {
aCount.value = 1;
return ([ this ]);