From 67da542ca6daf0f01ac1ea7795faab8b75aedfc4 Mon Sep 17 00:00:00 2001 From: "jminta%gmail.com" Date: Sat, 11 Feb 2006 14:55:52 +0000 Subject: [PATCH] Bug 326787 day/week view fails if event end is on next day [exception in getStartEndMinutesForOccurrence]. patch by ssitter@googlemail.com, r=jminta git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@189772 18797224-902f-48f8-a5cc-f745e15eee43 --- .../base/content/calendar-multiday-view.xml | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/mozilla/calendar/base/content/calendar-multiday-view.xml b/mozilla/calendar/base/content/calendar-multiday-view.xml index 80db8707481..773c013d837 100644 --- a/mozilla/calendar/base/content/calendar-multiday-view.xml +++ b/mozilla/calendar/base/content/calendar-multiday-view.xml @@ -522,24 +522,31 @@ var stdate = aOccurrence.startDate; var enddate = aOccurrence.endDate; - if (stdate.timezone != this.mTimezone) + if (stdate.timezone != this.mTimezone) { stdate = stdate.getInTimezone (this.mTimezone); + } - if (enddate.timezone != this.mTimezone) + if (enddate.timezone != this.mTimezone) { enddate = enddate.getInTimezone (this.mTimezone); + } + + var startHour = stdate.hour; + var startMinute = stdate.minute; + var endHour = enddate.hour; + var endMinute = enddate.minute; // Handle cases where an event begins or ends on a day other than this if (stdate.compare(this.mDate) == -1) { - stdate.hour = 0; - stdate.minute = 0; + startHour = 0; + startMinute = 0; } if (enddate.compare(this.mDate) == 1) { - enddate.hour = 24; - enddate.minute = 0; + endHour = 24; + endMinute = 0; } - return { start: stdate.hour * 60 + stdate.minute, - end: enddate.hour * 60 + enddate.minute }; + return { start: startHour * 60 + startMinute, + end: endHour * 60 + endMinute }; ]]>