Bugzilla Bug 315719 Events with neither DTEND nor DURATION handled incorrectly (end date is default value 01-Jan-1970). r=mvl, patch by ssitter@googlemail.com

git-svn-id: svn://10.0.0.236/trunk@186130 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mvl%exedo.nl
2005-12-15 21:55:48 +00:00
parent 814bda3b7d
commit ecfb0bf42c

View File

@@ -216,6 +216,19 @@ calEvent.prototype = {
this.endDate.addDuration(event.duration);
}
// If endDate is still invalid neither a end time nor a duration is set
// on the event. We have to set endDate ourselves.
// If the start time is a date-time the event ends on the same calendar
// date and time of day. If the start time is a date the events
// non-inclusive end is the end of the calendar date.
if (!this.endDate.isValid) {
this.endDate = this.startDate.clone();
if (this.startDate.isDate) {
this.endDate.day += 1;
this.endDate.normalize();
}
}
// Importing didn't really change anything
this.mDirty = false;
},