diff --git a/mozilla/calendar/resources/content/dayView.js b/mozilla/calendar/resources/content/dayView.js index d384cce1157..beb8d1edfe9 100644 --- a/mozilla/calendar/resources/content/dayView.js +++ b/mozilla/calendar/resources/content/dayView.js @@ -356,12 +356,12 @@ DayView.prototype.addToDisplayList = function(itemOccurrence, startDate, endDate //startDate.jsDate is not var adjustedStartDate = new Date(); var adjustedEndDate = new Date(); - adjustedStartDate.setFullYear(startDate.year); - adjustedStartDate.setMonth(startDate.month); adjustedStartDate.setDate(startDate.day); - adjustedEndDate.setFullYear(endDate.year); - adjustedEndDate.setMonth(endDate.month); + adjustedStartDate.setMonth(startDate.month); + adjustedStartDate.setFullYear(startDate.year); adjustedEndDate.setDate(endDate.day); + adjustedEndDate.setMonth(endDate.month); + adjustedEndDate.setFullYear(endDate.year); // Check if the event is within the bounds of events to be displayed. if ((adjustedEndDate < this.displayStartDate) || diff --git a/mozilla/calendar/resources/content/monthView.js b/mozilla/calendar/resources/content/monthView.js index fa03480ebd2..ffb42f0dadc 100644 --- a/mozilla/calendar/resources/content/monthView.js +++ b/mozilla/calendar/resources/content/monthView.js @@ -325,9 +325,9 @@ MonthView.prototype.createEventBoxInternal = function(itemOccurrence, startDate, //This is a HACK because startDate and indexOfDate don't get along well //in terms of timezones. var adjustedDate = new Date(); - adjustedDate.setFullYear(startDate.year); - adjustedDate.setMonth(startDate.month); adjustedDate.setDate(startDate.day); + adjustedDate.setMonth(startDate.month); + adjustedDate.setFullYear(startDate.year); dayBoxItem = this.dayBoxItemArray[this.indexOfDate(adjustedDate)]; if (!dayBoxItem) return; diff --git a/mozilla/calendar/resources/content/multiweekView.js b/mozilla/calendar/resources/content/multiweekView.js index 69568f60c3e..4a8cdc32f35 100644 --- a/mozilla/calendar/resources/content/multiweekView.js +++ b/mozilla/calendar/resources/content/multiweekView.js @@ -342,9 +342,9 @@ MultiweekView.prototype.createEventBoxInternal = function multiweekView_createEv //This is a HACK because startDate and indexOfDate don't get along well //in terms of timezones. var adjustedDate = new Date(); - adjustedDate.setFullYear(startDate.year); - adjustedDate.setMonth(startDate.month); adjustedDate.setDate(startDate.day); + adjustedDate.setMonth(startDate.month); + adjustedDate.setFullYear(startDate.year); var DisplayDate = new Date(adjustedDate); dayBoxItem = this.dayBoxItemArray[this.indexOfDate(DisplayDate)]; // Check if the day is visible diff --git a/mozilla/calendar/resources/content/weekView.js b/mozilla/calendar/resources/content/weekView.js index 9b81b5c388b..7445ae0a527 100644 --- a/mozilla/calendar/resources/content/weekView.js +++ b/mozilla/calendar/resources/content/weekView.js @@ -375,12 +375,12 @@ WeekView.prototype.createEventBoxInternal = function (event) //event.start.jsDate is not! var adjustedStartDate = new Date(); var adjustedEndDate = new Date(); - adjustedStartDate.setFullYear(startDate.year); - adjustedStartDate.setMonth(startDate.month); adjustedStartDate.setDate(startDate.day); - adjustedEndDate.setFullYear(endDate.year); - adjustedEndDate.setMonth(endDate.month); + adjustedStartDate.setMonth(startDate.month); + adjustedStartDate.setFullYear(startDate.year); adjustedEndDate.setDate(endDate.day); + adjustedEndDate.setMonth(endDate.month); + adjustedEndDate.setFullYear(endDate.year); // Check if the event is within the bounds of events to be displayed. if ((adjustedEndDate < this.displayStartDate) ||