mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 01:55:44 +00:00
bug 349040: Changes to events are not reflected in the day view. r=lilmatt, jminta
This commit is contained in:
parent
bd86d8b207
commit
c435e0ba25
@ -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 ]);
|
||||
|
@ -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 ]);
|
||||
|
Loading…
Reference in New Issue
Block a user