Bug 1280898 - Set up eslint for calendar files - enable no-multi-spaces rule. r=MakeMyDay
authoreslint <eslint@bugzilla.kewis.ch>
Fri, 08 Jul 2016 11:19:05 +0200
changeset 25955 bd2023dedb868294992a355e3302f08d5e65ce01
parent 25954 caff8e7186a8de640cb022a1f37566a5dcf11a6c
child 25956 aa60248fbd5094b03a082eca1685cf1062cbbf28
push id1771
push userclokep@gmail.com
push dateMon, 14 Nov 2016 17:47:53 +0000
treeherdercomm-beta@399ae9d71595 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMakeMyDay
bugs1280898
Bug 1280898 - Set up eslint for calendar files - enable no-multi-spaces rule. r=MakeMyDay MozReview-Commit-ID: KLQiUBzNctb
calendar/.eslintrc
calendar/base/backend/icaljs/calICSService.js
calendar/base/backend/icaljs/calRecurrenceRule.js
calendar/base/content/agenda-listbox.js
calendar/base/content/calendar-extract.js
calendar/base/content/calendar-item-editing.js
calendar/base/content/calendar-management.js
calendar/base/content/calendar-month-view.xml
calendar/base/content/calendar-multiday-view.xml
calendar/base/content/calendar-task-tree.js
calendar/base/content/calendar-task-tree.xml
calendar/base/content/calendar-ui-utils.js
calendar/base/content/dialogs/calendar-dialog-utils.js
calendar/base/content/dialogs/calendar-event-dialog-attendees.js
calendar/base/content/dialogs/calendar-event-dialog-freebusy.xml
calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
calendar/base/content/dialogs/calendar-event-dialog-reminder.js
calendar/base/content/dialogs/calendar-properties-dialog.js
calendar/base/content/dialogs/calendar-summary-dialog.js
calendar/base/content/import-export.js
calendar/base/content/preferences/alarms.js
calendar/base/content/preferences/categories.js
calendar/base/content/preferences/general.js
calendar/base/content/today-pane.js
calendar/base/content/widgets/calendar-list-tree.xml
calendar/base/content/widgets/calendar-widgets.xml
calendar/base/modules/calProviderUtils.jsm
calendar/base/src/calAlarm.js
calendar/base/src/calAlarmMonitor.js
calendar/base/src/calAttendee.js
calendar/base/src/calCachedCalendar.js
calendar/base/src/calCalendarManager.js
calendar/base/src/calFilter.js
calendar/base/src/calTimezone.js
calendar/base/src/calTimezoneService.js
calendar/base/src/calUtils.js
calendar/import-export/calMonthGridPrinter.js
calendar/import-export/calOutlookCSVImportExport.js
calendar/import-export/calWeekPrinter.js
calendar/itip/calItipEmailTransport.js
calendar/lightning/content/imip-bar.js
calendar/lightning/modules/ltnInvitationUtils.jsm
calendar/providers/caldav/calDavCalendar.js
calendar/providers/caldav/calDavRequestHandlers.js
calendar/providers/composite/calCompositeCalendar.js
calendar/providers/ics/calICSCalendar.js
calendar/providers/memory/calMemoryCalendar.js
calendar/providers/storage/calStorageCalendar.js
calendar/providers/storage/calStorageUpgrade.jsm
calendar/providers/wcap/calWcapCalendarItems.js
calendar/providers/wcap/calWcapUtils.js
calendar/resources/content/datetimepickers/datetimepickers.xml
calendar/resources/content/publish.js
calendar/test/mozmill/eventDialog/testEventDialogModificationPrompt.js
calendar/test/mozmill/recurrence/testLastDayOfMonthRecurrence.js
calendar/test/mozmill/recurrenceRotated/testLastDayOfMonthRecurrence.js
calendar/test/mozmill/shared-modules/calendar-utils.js
calendar/test/mozmill/timezoneTests/test10.js
calendar/test/mozmill/timezoneTests/test3.js
calendar/test/mozmill/timezoneTests/test4.js
calendar/test/mozmill/timezoneTests/test5.js
calendar/test/mozmill/timezoneTests/test6.js
calendar/test/mozmill/timezoneTests/test7.js
calendar/test/mozmill/timezoneTests/test8.js
calendar/test/mozmill/timezoneTests/test9.js
calendar/test/unit/test_attendee.js
calendar/test/unit/test_bug1204255.js
calendar/test/unit/test_bug343792.js
calendar/test/unit/test_bug356207.js
calendar/test/unit/test_deleted_items.js
calendar/test/unit/test_gdata_provider.js
calendar/test/unit/test_providers.js
calendar/test/unit/test_webcal.js
--- a/calendar/.eslintrc
+++ b/calendar/.eslintrc
@@ -132,16 +132,21 @@
     "space-unary-ops": [2, { "words": true, "nonwords": false }],
 
     // Enforce spacing after semicolons.
     "semi-spacing": [2, {"before": false, "after": true}],
 
     // Disallow the use of Boolean literals in conditional expressions.
     "no-unneeded-ternary": 2,
 
+    // Disallow use of multiple spaces (sometimes used to align const values,
+    // array or object items, etc.). It's hard to maintain and doesn't add that
+    // much benefit.
+    "no-multi-spaces": 2,
+
     // Will enable these rules later
     "keyword-spacing": 0,
     "block-spacing": 0,
     "no-lonely-if": 0,
     "space-before-blocks": 0,
     "computed-property-spacing": 0,
     "consistent-return": 0,
     "no-redeclare": 0,
--- a/calendar/base/backend/icaljs/calICSService.js
+++ b/calendar/base/backend/icaljs/calICSService.js
@@ -296,17 +296,17 @@ calIcalComponent.prototype = {
     set URL(val) { this.innerObject.updatePropertyWithValue("url", val); },
 
     get priority() {
         // If there is no value for this integer property, then we must return
         // the designated INVALID_VALUE.
         const INVALID_VALUE = Components.interfaces.calIIcalComponent.INVALID_VALUE;
         let prop = this.innerObject.getFirstProperty("priority");
         let val = prop ? prop.getFirstValue() : null;
-        return (val === null ?  INVALID_VALUE : val);
+        return (val === null ? INVALID_VALUE : val);
     },
     set priority(val) { this.innerObject.updatePropertyWithValue("priority", val); },
 
     _setTimeAttr: function(propName, val) {
         let prop = this.innerObject.updatePropertyWithValue(propName, val);
         if (val && val.zone &&
             val.zone != ICAL.Timezone.utcTimezone &&
             val.zone != ICAL.Timezone.localTimezone) {
--- a/calendar/base/backend/icaljs/calRecurrenceRule.js
+++ b/calendar/base/backend/icaljs/calRecurrenceRule.js
@@ -62,17 +62,17 @@ calRecurrenceRule.prototype = {
                 aCount.value = 0;
                 return [];
             }
         }
 
         let iter = this.innerObject.iterator(aStartTime);
 
         for (let next = iter.next(); next; next = iter.next()) {
-            let dtNext  = next.clone();
+            let dtNext = next.clone();
             dtNext.isDate = false;
 
             if (dtNext.compare(rangeStart) < 0) {
                 continue;
             }
 
             if (dtend && dtNext.compare(dtend) >= 0) {
                 break;
--- a/calendar/base/content/agenda-listbox.js
+++ b/calendar/base/content/agenda-listbox.js
@@ -212,17 +212,17 @@ function onKeyPress(aEvent) {
     }
 }
 
 /**
  * Calls the event dialog to edit the currently selected item
  */
 agendaListbox.editSelectedItem =
 function editSelectedItem() {
-    var listItem  = document.getElementById("agenda-listbox").selectedItem;
+    var listItem = document.getElementById("agenda-listbox").selectedItem;
     if (listItem) {
         modifyEventWithDialog(listItem.occurrence, null, true);
     }
 }
 
 /**
  * Finds the appropriate period for the given item, i.e finds "Tomorrow" if the
  * item occurrs tomorrow.
@@ -736,28 +736,28 @@ function setupCalendar() {
  *                        today.
  */
 agendaListbox.refreshPeriodDates =
 function refreshPeriodDates(newDate) {
      this.kDefaultTimezone = calendarDefaultTimezone();
     // Today: now until midnight of tonight
     var oldshowstoday = this.showstoday;
     this.showstoday = this.showsToday(newDate);
-    if ((this.showstoday) && (!oldshowstoday))  {
+    if ((this.showstoday) && (!oldshowstoday)) {
         this.addPeriodListItem(this.tomorrow, "tomorrow-header");
         this.addPeriodListItem(this.soon, "nextweek-header");
     } else if (!this.showstoday) {
         this.removePeriodListItem(this.tomorrow);
         this.removePeriodListItem(this.soon);
     }
     newDate.isDate = true;
     for (var i = 0; i < this.periods.length; i++) {
         var curPeriod = this.periods[i];
         newDate.hour = newDate.minute = newDate.second = 0;
-        if ((i == 0)  && (this.showstoday)){
+        if (i == 0 && this.showstoday) {
             curPeriod.start = now();
         } else {
             curPeriod.start = newDate.clone();
         }
         newDate.day += curPeriod.duration;
         curPeriod.end = newDate.clone();
         curPeriod.listItem.setItem(curPeriod, this.showstoday);
     }
@@ -835,18 +835,18 @@ function getSelectedItems() {
  * @param aListItem     The node to check for.
  * @return              True, if the node is not a period item.
  */
 agendaListbox.isEventListItem =
 function isEventListItem(aListItem) {
     var isEventListItem = (aListItem != null);
     if (isEventListItem) {
         var localName = aListItem.localName;
-        isEventListItem = ((localName ==  "agenda-richlist-item") ||
-                          (localName ==  "agenda-allday-richlist-item"));
+        isEventListItem = (localName == "agenda-richlist-item" ||
+                           localName == "agenda-allday-richlist-item");
     }
     return isEventListItem;
 }
 
 /**
  * Removes all Event items, keeping the period items intact.
  */
 agendaListbox.removeListItems =
--- a/calendar/base/content/calendar-extract.js
+++ b/calendar/base/content/calendar-extract.js
@@ -172,17 +172,17 @@ var calendarExtract = {
                 // set default
                 dueDate.setHours(0);
                 dueDate.setMinutes(0);
                 dueDate.setSeconds(0);
 
                 if (endGuess.year != null) {
                     dueDate.setYear(endGuess.year);
                 }
-                if (endGuess.month  != null) {
+                if (endGuess.month != null) {
                     dueDate.setMonth(endGuess.month - 1);
                 }
                 if (endGuess.day != null) {
                     dueDate.setDate(endGuess.day);
                 }
                 if (endGuess.hour != null) {
                     dueDate.setHours(endGuess.hour);
                 }
--- a/calendar/base/content/calendar-item-editing.js
+++ b/calendar/base/content/calendar-item-editing.js
@@ -417,17 +417,17 @@ function openEventDialog(calendarItem, c
         && (!isCalendarWritable(calendar)
             || !userCanAddItemsToCalendar(calendar)
             || !isItemSupported(calendar))) {
         if (calendars.length < 1) {
             // There are no writable calendars or no calendar supports the given
             // item. Don't show the dialog.
             disposeJob(job);
             return;
-        } else  {
+        } else {
             // Pick the first calendar that supports the item and is writable
             calendar = calendars[0];
             if (calendarItem) {
                 // XXX The dialog currently uses the items calendar as a first
                 // choice. Since we are shortly before a release to keep
                 // regression risk low, explicitly set the item's calendar here.
                 calendarItem.calendar = calendars[0];
             }
--- a/calendar/base/content/calendar-management.js
+++ b/calendar/base/content/calendar-management.js
@@ -189,17 +189,17 @@ function calendarListSetupContextMenu(ev
     let treeNode = document.getElementById("calendar-list-tree-widget");
     let composite = getCompositeCalendar();
 
     if (document.popupNode.localName == "tree") {
         // Using VK_APPS to open the context menu will target the tree
         // itself. In that case we won't have a client point even for
         // opening the context menu. The "target" element should then be the
         // selected calendar.
-        row.value =  treeNode.tree.currentIndex;
+        row.value = treeNode.tree.currentIndex;
         col.value = treeNode.getColumn("calendarname-treecol");
         calendar = treeNode.getCalendar(row.value);
     } else {
         // Using the mouse, the context menu will open on the treechildren
         // element. Here we can use client points.
         calendar = treeNode.getCalendarFromEvent(event, col, row);
     }
 
@@ -256,17 +256,17 @@ function calendarListSetupContextMenu(ev
 /**
  * Changes the "delete calendar" menuitem to have the right label based on the
  * removeModes. The menuitem must have the attributes "labelremove",
  * "labeldelete" and "labelunsubscribe".
  *
  * @param aDeleteId     The id of the menuitem to delete the calendar
  */
 function setupDeleteMenuitem(aDeleteId, aCalendar) {
-    let calendar = (aCalendar === undefined ?  getSelectedCalendar() : aCalendar);
+    let calendar = (aCalendar === undefined ? getSelectedCalendar() : aCalendar);
     let modes = new Set(calendar ? calendar.getProperty("capabilities.removeModes") || ["unsubscribe"] : []);
 
     let type = "remove";
     if (modes.has("delete") && !modes.has("unsubscribe")) {
         type = "delete";
     } else if (modes.has("unsubscribe") && !modes.has("delete")) {
         type = "unsubscribe";
     }
--- a/calendar/base/content/calendar-month-view.xml
+++ b/calendar/base/content/calendar-month-view.xml
@@ -88,17 +88,17 @@
                              calendarDefaultTimezone();
               var parentDate = ensureDateTime(this.parentBox.date);
               var startTime = val.startDate.getInTimezone(timezone);
               var endTime = val.endDate.getInTimezone(timezone);
               var nextDay = parentDate.clone();
               nextDay.day++;
               var comp = endTime.compare(nextDay);
               if(startTime.compare( parentDate) == -1 ) {
-                if (comp == 1)  {
+                if (comp == 1) {
                   label.value = "↔";
                 } else if (comp == 0) {
                   label.value = "↤";
                 } else {
                   label.value = "⇥ " + df.formatTime(endTime);
                 }
               } else {
                 if (comp == 1) {
@@ -270,17 +270,17 @@
           }
         ]]></body>
       </method>
 
       <method name="deleteItem">
         <parameter name="aItem"/>
         <body><![CDATA[
           if (aItem.hashId in this.mItemHash) {
-            let node =  this.mItemHash[aItem.hashId];
+            let node = this.mItemHash[aItem.hashId];
             node.remove();
             delete this.mItemHash[aItem.hashId];
           }
         ]]></body>
       </method>
 
       <method name="onDropItem">
         <parameter name="aItem"/>
--- a/calendar/base/content/calendar-multiday-view.xml
+++ b/calendar/base/content/calendar-multiday-view.xml
@@ -141,18 +141,18 @@
               theMin += dur;
               if (dur == 0) {
                   dur = 60;
               }
 
               // calculate duration pixel as the difference between
               // start pixel and end pixel to avoid rounding errors.
               var startPix = Math.round(theMin * this.mPixPerMin);
-              var endPix   = Math.round((theMin + dur) * this.mPixPerMin);
-              var durPix   = endPix - startPix;
+              var endPix = Math.round((theMin + dur) * this.mPixPerMin);
+              var durPix = endPix - startPix;
               var box;
               if (dur != 60) {
                   box = makeTimeBox("", durPix);
               } else {
                   timeString = formatter.FormatTime("",
                                                     Components.interfaces.nsIScriptableDateFormat.timeFormatNoSeconds,
                                                     theHour, 0, 0);
                   box = makeTimeBox(timeString, durPix);
@@ -536,19 +536,19 @@
            if (!compareObjects(stdate.timezone, this.mTimezone)) {
                stdate = stdate.getInTimezone (this.mTimezone);
            }
 
            if (!compareObjects(enddate.timezone, this.mTimezone)) {
                enddate = enddate.getInTimezone (this.mTimezone);
            }
 
-           var startHour   = stdate.hour;
+           var startHour = stdate.hour;
            var startMinute = stdate.minute;
-           var endHour   = enddate.hour;
+           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) {
                startHour = 0;
                startMinute = 0;
            }
            if (enddate.compare(this.mDate) == 1) {
@@ -563,17 +563,17 @@
            let durstart = stdate.subtractDate(this.mDate);
            // 'durend' is always positive, instead 'durstart' might be negative
            // if the event starts one or more days before the date of this column
            let realStart_ = (durstart.days * 24 + durstart.hours) * 60 + durstart.minutes;
            realStart_ = durstart.isNegative ? -1 * realStart_ : realStart_;
            let realEnd_ = (durend.days * 24 + durend.hours) * 60 + durend.minutes;
 
            return { start:        startHour * 60 + startMinute,
-                    end:          endHour   * 60 + endMinute,
+                    end:          endHour * 60 + endMinute,
                     realStart:    realStart_,
                     realEnd:      realEnd_ };
         ]]></body>
       </method>
 
       <method name="createChunk">
         <parameter name="aOccurrence"/>
         <body><![CDATA[
@@ -679,18 +679,18 @@
               }
 
               // Carry forth the day relation
               box.setAttribute("relation", this.getAttribute("relation"));
 
               // calculate duration pixel as the difference between
               // start pixel and end pixel to avoid rounding errors.
               let startPix = Math.round(theMin * this.mPixPerMin);
-              let endPix   = Math.round((theMin + dur) * this.mPixPerMin);
-              let durPix   = endPix - startPix;
+              let endPix = Math.round((theMin + dur) * this.mPixPerMin);
+              let durPix = endPix - startPix;
               if (orient == "vertical") {
                   box.setAttribute("height", durPix);
               } else {
                   box.setAttribute("width", durPix);
               }
 
               box.setAttribute("style", "min-width: 1px; min-height: 1px;");
 
@@ -1174,29 +1174,29 @@
                       col.specialSpan = specialSpan;
                   }
 
                   // take into account that items can span several days.
                   // that's why i'm clipping the start- and end-time to the
                   // timespan of this column.
                   var start = data.itemInfo.layoutStart;
                   var end = data.itemInfo.layoutEnd;
-                  if (start.year  != this.date.year ||
+                  if (start.year != this.date.year ||
                       start.month != this.date.month ||
-                      start.day   != this.date.day) {
+                      start.day != this.date.day) {
                       start = start.clone();
                       start.resetTo(this.date.year,
                                     this.date.month,
                                     this.date.day,
                                     0, this.mStartMin, 0,
                                     start.timezone);
                   }
-                  if (end.year  != this.date.year ||
+                  if (end.year != this.date.year ||
                       end.month != this.date.month ||
-                      end.day   != this.date.day) {
+                      end.day != this.date.day) {
                       end = end.clone();
                       end.resetTo(this.date.year,
                                   this.date.month,
                                   this.date.day,
                                   0, this.mEndMin, 0,
                                   end.timezone);
                   }
                   var prevEnd;
@@ -1541,17 +1541,17 @@
               sizeattr = "width";
           }
           // don't let mouse position go outside the window edges
           let pos = Math.max(0, mousePos) - dragState.mouseOffset;
 
           // snap interval: 15 minutes or 1 minute if modifier key is pressed
           let snapIntMin = (event.shiftKey &&
                             !event.ctrlKey &&
-                            !event.altKey  &&
+                            !event.altKey &&
                             !event.metaKey) ? 1 : 15;
           let interval = col.mPixPerMin * snapIntMin;
           let curmin = Math.floor(pos / interval) * snapIntMin;
           let deltamin = curmin - dragState.origMin;
 
           let shadowElements;
           if (dragState.dragType == "new") {
               // Extend deltamin in a linear way over the columns
@@ -1862,17 +1862,17 @@
                                       0, this.mDragState.shadows,
                                       sizeattr);
 
               // update drag labels
               let lastCol = this.firstLastShadowColumns().lastCol;
               this.updateDragLabels(this, lastCol);
 
           } else if (aGrabbedElement == "end") {
-              this.mDragState.dragType =  "modify-end";
+              this.mDragState.dragType = "modify-end";
               // we have to use "realStart" as fixed end value
               this.mDragState.limitStartMin = mins.realStart;
 
               // snap end
               this.mDragState.origMin = Math.floor(mins.end / snapIntMin) * snapIntMin;
 
               // show the shadows and drag labels when clicking on gripbars
               let shadowElements = this.getShadowElements(this.mDragState.limitStartMin,
@@ -2077,17 +2077,17 @@
             limitStartMin: null,
             limitEndMin: null,
             jumpedColumns: 0
         };
 
         // snap interval: 15 minutes or 1 minute if modifier key is pressed
         let snapIntMin = (event.shiftKey &&
                           !event.ctrlKey &&
-                          !event.altKey  &&
+                          !event.altKey &&
                           !event.metaKey) ? 1 : 15;
         let interval = this.mPixPerMin * snapIntMin;
 
         if (this.getAttribute("orient") == "vertical") {
             this.mDragState.origLoc = event.screenY;
             this.mDragState.origMin = Math.floor((event.screenY - this.parentNode.boxObject.screenY)/interval) * snapIntMin;
             this.mDragState.limitEndMin = this.mDragState.origMin;
             this.mDragState.limitStartMin = this.mDragState.origMin;
@@ -2433,17 +2433,17 @@
             this.mInMouseDown = true;
             return;
         } else {
             this.calendarView.setSelectedItems(1,
                 [event.ctrlKey ? this.mOccurrence.parentItem : this.mOccurrence]);
 
             let snapIntMin = (event.shiftKey &&
                               !event.ctrlKey &&
-                              !event.altKey  &&
+                              !event.altKey &&
                               !event.metaKey) ? 1 : 15;
             // start edge resize drag
             this.parentColumn.startSweepingToModifyEvent(this, this.mOccurrence, whichside,
                                                          event.screenX, event.screenY,
                                                          snapIntMin);
         }
       ]]></handler>
 
@@ -3082,17 +3082,17 @@
                   // must have at least one of start or end
                   if (!occStart && !occEnd) {
                       continue; // task with no dates
                   }
 
                   // if just has single datetime, treat as zero duration item
                   // (such as task with due datetime or start datetime only)
                   occStart = (occStart || occEnd);
-                  occEnd   = (occEnd || occStart);
+                  occEnd = (occEnd || occStart);
                   // Now both occStart and occEnd are datetimes.
 
                   // skip occurrence if all-day: it won't show in time view.
                   if (occStart.isDate || occEnd.isDate) {
                      continue;
                   }
 
                   // Trim dates to view.  (Not mutated so just reuse view dates)
--- a/calendar/base/content/calendar-task-tree.js
+++ b/calendar/base/content/calendar-task-tree.js
@@ -272,18 +272,17 @@ function getTaskTree() {
  * functions.
  *
  * @param aEvent      Unused
  */
 function getSelectedTasks(aEvent) {
     var taskTree = getTaskTree();
     if (taskTree != null) {
         return taskTree.selectedTasks;
-    }
-    else  {
+    } else {
         return [];
     }
 }
 
 /**
  * Convert selected tasks to emails.
  */
 function tasksToMail(aEvent) {
--- a/calendar/base/content/calendar-task-tree.xml
+++ b/calendar/base/content/calendar-task-tree.xml
@@ -516,17 +516,17 @@
                   properties.push("highpriority");
               } else if (item.priority > 5 && item.priority < 10) {
                   properties.push("lowpriority");
               }
               properties.push(getProgressAtom(item));
 
               // Add calendar name and id atom
               properties.push("calendar-" + formatStringForCSSRule(item.calendar.name));
-              properties.push("calendarid-" +  formatStringForCSSRule(item.calendar.id));
+              properties.push("calendarid-" + formatStringForCSSRule(item.calendar.id));
 
               // Add item status atom
               if (item.status) {
                   properties.push("status-" + item.status.toLowerCase());
               }
 
               // Alarm status atom
               if (item.getAlarms({}).length) {
@@ -547,17 +547,17 @@
 
               // prevent toggling completed status for parent items of
               // repeating tasks or when the calendar is read-only.
               if (!task || task.recurrenceInfo || task.calendar.readOnly) {
                   return;
               }
               if (aCol != null) {
                   var content = aCol.element.getAttribute("itemproperty");
-                  if (content == "completed")  {
+                  if (content == "completed") {
                       var newTask = task.clone().QueryInterface(Components.interfaces.calITodo);
                       newTask.isCompleted = !task.completedDate;
                       doTransaction('modify', newTask, newTask.calendar, task, null);
                   }
               }
           },
 
           // Called on the view when a header is clicked.
--- a/calendar/base/content/calendar-ui-utils.js
+++ b/calendar/base/content/calendar-ui-utils.js
@@ -438,30 +438,30 @@ function unitPluralForm(aLength, aUnit, 
 /**
  * Update the given unit label to show the correct plural form.
  *
  * @param aLengthFieldId     The ID of the element containing the number
  * @param aLabelId           The ID of the label to update.
  * @param aUnit              The unit to use for the label.
  */
 function updateUnitLabelPlural(aLengthFieldId, aLabelId, aUnit) {
-    let label  = document.getElementById(aLabelId);
+    let label = document.getElementById(aLabelId);
     let length = Number(document.getElementById(aLengthFieldId).value);
 
     label.value = unitPluralForm(length, aUnit, false);
 }
 
 /**
  * Update the given menu to show the correct plural form in the list.
  *
  * @param aLengthFieldId    The ID of the element containing the number
  * @param aMenuId           The menu to update labels in.
  */
 function updateMenuLabelsPlural(aLengthFieldId, aMenuId) {
-    let menu  = document.getElementById(aMenuId);
+    let menu = document.getElementById(aMenuId);
     let length = Number(document.getElementById(aLengthFieldId).value);
 
     // update the menu items
     let items = menu.getElementsByTagName("menuitem");
     for (let menuItem of items) {
         menuItem.label = unitPluralForm(length, menuItem.value, false);
     }
 
--- a/calendar/base/content/dialogs/calendar-dialog-utils.js
+++ b/calendar/base/content/dialogs/calendar-dialog-utils.js
@@ -123,17 +123,17 @@ function createReminderFromMenuitem(aMen
 
 /**
  * This function opens the needed dialogs to edit the reminder. Note however
  * that calling this function from an extension is not recommended. To allow an
  * extension to open the reminder dialog, set the menulist "item-alarm" to the
  * custom menuitem and call updateReminder().
  */
 function editReminder() {
-    let customItem =  document.getElementById("reminder-custom-menuitem");
+    let customItem = document.getElementById("reminder-custom-menuitem");
     let args = {};
     args.reminders = customItem.reminders;
     args.item = window.calendarItem;
     args.timezone = (window.gStartTimezone ||
                      window.gEndTimezone ||
                      calendarDefaultTimezone());
 
     args.calendar = getCurrentCalendar();
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees.js
@@ -504,17 +504,17 @@ function editEndTimezone() {
  * This for example disables the timepicker since its not needed.
  */
 function updateAllDay() {
     if (gIgnoreUpdate) {
         return;
     }
 
     var allDayElement = document.getElementById("all-day");
-    var allDay  = (allDayElement.getAttribute("checked") == "true");
+    var allDay = (allDayElement.getAttribute("checked") == "true");
     var startpicker = document.getElementById("event-starttime");
     var endpicker = document.getElementById("event-endtime");
 
     var tzStart = document.getElementById("timezone-starttime");
     var tzEnd = document.getElementById("timezone-endtime");
 
     // Disable the timezone links if 'allday' is checked OR the
     // calendar of this item is read-only. In any other case we
--- a/calendar/base/content/dialogs/calendar-event-dialog-freebusy.xml
+++ b/calendar/base/content/dialogs/calendar-event-dialog-freebusy.xml
@@ -637,17 +637,17 @@
           this.mOffset = val * this.numHours;
           this.showState();
           return val;
         ]]></setter>
       </property>
 
       <property name="documentSize">
         <getter><![CDATA[
-          return  this.contentWidth * this.mRange;
+          return this.contentWidth * this.mRange;
         ]]></getter>
       </property>
 
       <property name="scroll">
         <setter><![CDATA[
           // How much pixels spans a single day
           var oneday = this.contentWidth;
           if (oneday <= 0) {
--- a/calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
@@ -133,17 +133,17 @@ function initializeControls(rule) {
     var byMonthRuleComponent = rule.getComponent("BYMONTH", {});
     var kDefaultTimezone = calendarDefaultTimezone();
     var startDate = gStartTime.getInTimezone(kDefaultTimezone);
 
     // "DAILY" ruletype
     // byDayRuleComponents may have been set priorily by "MONTHLY"- ruletypes
     // where they have a different context-
     // that's why we also query the current rule-type
-    if (byDayRuleComponent.length == 0  || rule.type != "DAILY") {
+    if (byDayRuleComponent.length == 0 || rule.type != "DAILY") {
         document.getElementById("daily-group").selectedIndex = 0;
     } else {
         document.getElementById("daily-group").selectedIndex = 1;
     }
 
     // "WEEKLY" ruletype
     if (byDayRuleComponent.length == 0 || rule.type != "WEEKLY") {
         document.getElementById("daypicker-weekday").days = [startDate.weekday + 1];
@@ -179,17 +179,17 @@ function initializeControls(rule) {
             setElementValue("monthly-weekday", byMonthDayRuleComponent[0]);
         } else if (byMonthDayRuleComponent.length > 0) {
             document.getElementById("monthly-group").selectedIndex = 1;
             document.getElementById("monthly-days").days = byMonthDayRuleComponent;
         }
     }
 
     // "YEARLY" ruletype
-    if (byMonthRuleComponent.length == 0  || rule.type != "YEARLY") {
+    if (byMonthRuleComponent.length == 0 || rule.type != "YEARLY") {
         setElementValue("yearly-month-rule", startDate.month + 1);
         setElementValue("yearly-month-ordinal", startDate.month + 1);
         if (byMonthDayRuleComponent.length > 0) {
             setControlsForByMonthDay_YearlyRule(startDate, byMonthDayRuleComponent[0]);
         } else {
             setElementValue("yearly-days", startDate.day);
             let day = Math.floor((startDate.day - 1) / 7) + 1;
             setElementValue("yearly-ordinal", day);
--- a/calendar/base/content/dialogs/calendar-event-dialog-reminder.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-reminder.js
@@ -242,17 +242,17 @@ function onReminderSelected() {
 
         // Absolute/relative things
         if (reminder.related == Components.interfaces.calIAlarm.ALARM_RELATED_ABSOLUTE) {
             relationType.value = "absolute";
 
             // Date
             absDate.value = cal.dateTimeToJsDate(reminder.alarmDate || cal.getDefaultStartDate());
         } else {
-            relationType.value =  "relative";
+            relationType.value = "relative";
 
             // Unit and length
             let alarmlen = Math.abs(reminder.offset.inSeconds / 60);
             if (alarmlen % 1440 == 0) {
                 unit.value = "days";
                 length.value = alarmlen / 1440;
             } else if (alarmlen % 60 == 0) {
                 unit.value = "hours";
--- a/calendar/base/content/dialogs/calendar-properties-dialog.js
+++ b/calendar/base/content/dialogs/calendar-properties-dialog.js
@@ -117,17 +117,17 @@ function setupEnabledCheckbox() {
     }
 }
 
 /**
  * Called to unsubscribe from a calendar. The button for this function is not
  * shown unless the provider for the calendar is missing (i.e force-disabled)
  */
 function unsubscribeCalendar() {
-    let calmgr =  cal.getCalendarManager();
+    let calmgr = cal.getCalendarManager();
 
     calmgr.unregisterCalendar(gCalendar);
     window.close();
 }
 
 function initRefreshInterval() {
     function createMenuItem(minutes) {
         let menuitem = createXULElement("menuitem");
--- a/calendar/base/content/dialogs/calendar-summary-dialog.js
+++ b/calendar/base/content/dialogs/calendar-summary-dialog.js
@@ -276,17 +276,17 @@ function updateRepeatDetails() {
     // create a details string, we simply don't show anything.
     // this could happen if the repeat rule is something exotic
     // we don't have any strings prepared for.
     var repeatDetails = document.getElementById("repeat-details");
     repeatDetails.setAttribute("collapsed", "true");
 
     // Try to create a descriptive string from the rule(s).
     var kDefaultTimezone = calendarDefaultTimezone();
-    var startDate =  item.startDate || item.entryDate;
+    var startDate = item.startDate || item.entryDate;
     var endDate = item.endDate || item.dueDate;
     startDate = startDate ? startDate.getInTimezone(kDefaultTimezone) : null;
     endDate = endDate ? endDate.getInTimezone(kDefaultTimezone) : null;
     var detailsString = recurrenceRule2String(recurrenceInfo, startDate,
                                               endDate, startDate.isDate);
 
     if (!detailsString) {
         detailsString = cal.calGetString("calendar-event-dialog", "ruleTooComplexSummary");
--- a/calendar/base/content/import-export.js
+++ b/calendar/base/content/import-export.js
@@ -1,23 +1,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 // File constants copied from file-utils.js
-var MODE_RDONLY   = 0x01;
-var MODE_WRONLY   = 0x02;
-var MODE_RDWR     = 0x04;
-var MODE_CREATE   = 0x08;
-var MODE_APPEND   = 0x10;
+var MODE_RDONLY = 0x01;
+var MODE_WRONLY = 0x02;
+var MODE_RDWR = 0x04;
+var MODE_CREATE = 0x08;
+var MODE_APPEND = 0x10;
 var MODE_TRUNCATE = 0x20;
-var MODE_SYNC     = 0x40;
-var MODE_EXCL     = 0x80;
+var MODE_SYNC = 0x40;
+var MODE_EXCL = 0x80;
 
 /**
  * Shows a file dialog, reads the selected file(s) and tries to parse events from it.
  *
  * @param aCalendar  (optional) If specified, the items will be imported directly
  *                              into the calendar
  */
 function loadEventsFromFile(aCalendar) {
--- a/calendar/base/content/preferences/alarms.js
+++ b/calendar/base/content/preferences/alarms.js
@@ -15,17 +15,17 @@ var gAlarmsPane = {
      * values set in prefs.
      */
     init: function gAP_init() {
         // Enable/disable the alarm sound URL box and buttons
         this.alarmsPlaySoundPrefChanged();
 
         // Set the correct singular/plural for the time units
         updateMenuLabelsPlural("eventdefalarmlen", "eventdefalarmunit");
-        updateMenuLabelsPlural("tododefalarmlen",  "tododefalarmunit");
+        updateMenuLabelsPlural("tododefalarmlen", "tododefalarmunit");
         updateUnitLabelPlural("defaultsnoozelength", "defaultsnoozelengthunit", "minutes");
     },
 
     /**
      * Converts the given file url to a nsILocalFile
      *
      * @param aFileURL    A string with a file:// url.
      * @return            The corresponding nsILocalFile.
--- a/calendar/base/content/preferences/categories.js
+++ b/calendar/base/content/preferences/categories.js
@@ -244,17 +244,17 @@ var gCategoriesPane = {
         var updatedCategory = gCategoryList.indexOf(categoryName);
         list.ensureIndexIsVisible(updatedCategory);
         list.selectedIndex = updatedCategory;
     },
 
     /**
      * Enable the edit and delete category buttons.
      */
-    updateButtons: function  gCP_updateButtons() {
+    updateButtons: function gCP_updateButtons() {
         let categoriesList = document.getElementById("categorieslist");
         document.getElementById("deleteCButton").disabled = (categoriesList.selectedCount <= 0);
         document.getElementById("editCButton").disabled = (categoriesList.selectedCount != 1)
     },
 
     /**
      * Backs up the category name in case the dialog is canceled.
      *
--- a/calendar/base/content/preferences/general.js
+++ b/calendar/base/content/preferences/general.js
@@ -13,17 +13,17 @@ var gCalendarGeneralPane = {
     /**
      * Initialize the general pref pane. Sets up dialog controls to match the
      * values set in prefs.
      */
     init: function gCGP_init() {
         var df = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
                     .getService(Components.interfaces.calIDateTimeFormatter);
 
-        var dateFormattedLong  = df.formatDateLong(now());
+        var dateFormattedLong = df.formatDateLong(now());
         var dateFormattedShort = df.formatDateShort(now());
 
         // menu items include examples of current date formats.
         document.getElementById("dateformat-long-menuitem")
                 .setAttribute("label", labelLong + ": " + dateFormattedLong);
         document.getElementById("dateformat-short-menuitem")
                 .setAttribute("label", labelShort + ": " + dateFormattedShort);
 
--- a/calendar/base/content/today-pane.js
+++ b/calendar/base/content/today-pane.js
@@ -96,17 +96,17 @@ var TodayPane = {
         // during runtime
         const kYEARINIT= "5555";
         const kCALWEEKINIT= "55";
         let monthdisplaydeck = document.getElementById("monthNameContainer");
         let childNodes = monthdisplaydeck.childNodes;
 
         for (let i = 0; i < childNodes.length; i++) {
             let monthlabel = childNodes[i];
-            this.setMonthDescription(monthlabel, i,  kYEARINIT, kCALWEEKINIT);
+            this.setMonthDescription(monthlabel, i, kYEARINIT, kCALWEEKINIT);
         }
 
         let now = cal.now();
         // Workaround for bug 1070491. Show the correct month and year
         // after startup even if deck's selectedIndex is reset to 0.
         this.setMonthDescription(childNodes[0], now.month, now.year, kCALWEEKINIT);
 
         agendaListbox.addListener(this);
--- a/calendar/base/content/widgets/calendar-list-tree.xml
+++ b/calendar/base/content/widgets/calendar-list-tree.xml
@@ -566,17 +566,17 @@
           - @param aCalendar     The calendar to update.
           -->
         <parameter name="aCalendar"/>
         <body><![CDATA[
           let color = aCalendar.getProperty("color") || "#a8c2e1";
           let sheet = this.sheet;
           if (!(aCalendar.id in this.ruleCache)) {
               let ruleString = "calendar-list-tree > tree > treechildren" +
-                               "::-moz-tree-cell(color-treecol, id-"  +
+                               "::-moz-tree-cell(color-treecol, id-" +
                                aCalendar.id + ") {}";
 
               let ruleIndex = sheet.insertRule(ruleString, sheet.cssRules.length);
               this.ruleCache[aCalendar.id] = sheet.cssRules[ruleIndex];
           }
           this.ruleCache[aCalendar.id].style.backgroundColor = color;
         ]]></body>
       </method>
--- a/calendar/base/content/widgets/calendar-widgets.xml
+++ b/calendar/base/content/widgets/calendar-widgets.xml
@@ -405,30 +405,30 @@
                         collapsedModes.push(this.currentMode);
                         if (this.getAttribute("collapsedinmodes") == ",") {
                             collapsedModes.splice(0, 2);
                         }
                     }
                 } else {
                     if (modeIndex > -1) {
                         collapsedModes.splice(modeIndex, 1);
-                        if (collapsedModes.join(",")  == "") {
+                        if (collapsedModes.join(",") == "") {
                             collapsedModes[0]=",";
                         }
                     }
                 }
                 this.setAttribute("collapsedinmodes", collapsedModes.join(","));
                 var id = this.getAttribute("id");
                 if (id) {
                     document.persist(id, "collapsedinmodes");
                 }
             }
             if (notifyRefControl === true) {
                 if (this.hasAttribute("refcontrol")) {
-                    var command =  document.getElementById(this.getAttribute("refcontrol"))
+                    var command = document.getElementById(this.getAttribute("refcontrol"))
                     if (command) {
                         command.setAttribute("checked", display);
                         setBooleanAttribute(command, "disabled", !this.isVisibleInMode());
                     }
                 }
             }
         ]]></body>
       </method>
--- a/calendar/base/modules/calProviderUtils.jsm
+++ b/calendar/base/modules/calProviderUtils.jsm
@@ -399,17 +399,17 @@ cal.toRFC3339 = function toRFC3339(aDate
 
     var full_tzoffset = aDateTime.timezoneOffset;
     var tzoffset_hr = Math.floor(Math.abs(full_tzoffset) / 3600);
 
     var tzoffset_mn = ((Math.abs(full_tzoffset) / 3600).toFixed(2) -
                        tzoffset_hr) * 60;
 
     var str = aDateTime.year + "-" +
-        ("00" + (aDateTime.month + 1)).substr(-2) +  "-" +
+        ("00" + (aDateTime.month + 1)).substr(-2) + "-" +
         ("00" + aDateTime.day).substr(-2);
 
     // Time and Timezone extension
     if (!aDateTime.isDate) {
         str += "T" +
                ("00" + aDateTime.hour).substr(-2) + ":" +
                ("00" + aDateTime.minute).substr(-2) + ":" +
                ("00" + aDateTime.second).substr(-2);
--- a/calendar/base/src/calAlarm.js
+++ b/calendar/base/src/calAlarm.js
@@ -508,17 +508,17 @@ calAlarm.prototype = {
 
         if (actionProp) {
             this.action = actionProp.value;
         } else {
             throw Components.results.NS_ERROR_INVALID_ARG;
         }
 
         if (triggerProp) {
-            if (triggerProp.getParameter("VALUE") == "DATE-TIME")  {
+            if (triggerProp.getParameter("VALUE") == "DATE-TIME") {
                 this.mAbsoluteDate = triggerProp.valueAsDatetime;
                 this.related = ALARM_RELATED_ABSOLUTE;
             } else {
                 this.mOffset = cal.createDuration(triggerProp.valueAsIcalString);
 
                 let related = triggerProp.getParameter("RELATED");
                 this.related = (related == "END" ? ALARM_RELATED_END : ALARM_RELATED_START);
             }
--- a/calendar/base/src/calAlarmMonitor.js
+++ b/calendar/base/src/calAlarmMonitor.js
@@ -113,18 +113,18 @@ calAlarmMonitor.prototype = {
             }
         }
 
         if (!Preferences.get("calendar.alarms.show", true)) {
             return;
         }
 
         let calAlarmWindow = peekAlarmWindow();
-        if (!calAlarmWindow  && (!this.mWindowOpening ||
-                                  this.mWindowOpening.closed)) {
+        if (!calAlarmWindow && (!this.mWindowOpening ||
+                                 this.mWindowOpening.closed)) {
             this.mWindowOpening = Services.ww.openWindow(
                 null,
                 "chrome://calendar/content/calendar-alarm-dialog.xul",
                 "_blank",
                 "chrome,dialog=yes,all,resizable",
                 this);
         }
         if (!this.mWindowOpening) {
--- a/calendar/base/src/calAttendee.js
+++ b/calendar/base/src/calAttendee.js
@@ -53,21 +53,22 @@ calAttendee.prototype = {
             a.setProperty(key, value);
         }
 
         return a;
     },
     // XXX enforce legal values for our properties;
 
     icalAttendeePropMap: [
-    { cal: "rsvp",                ics: "RSVP" },
-    { cal: "commonName",          ics: "CN" },
-    { cal: "participationStatus", ics: "PARTSTAT" },
-    { cal: "userType",            ics: "CUTYPE" },
-    { cal: "role",                ics: "ROLE" } ],
+        { cal: "rsvp", ics: "RSVP" },
+        { cal: "commonName", ics: "CN" },
+        { cal: "participationStatus", ics: "PARTSTAT" },
+        { cal: "userType", ics: "CUTYPE" },
+        { cal: "role", ics: "ROLE" }
+    ],
 
     mIsOrganizer: false,
     get isOrganizer() { return this.mIsOrganizer; },
     set isOrganizer(bool) { this.mIsOrganizer = bool; },
 
     // icalatt is a calIcalProperty of type attendee
     set icalProperty (icalatt) {
         this.modify();
--- a/calendar/base/src/calCachedCalendar.js
+++ b/calendar/base/src/calCachedCalendar.js
@@ -444,17 +444,17 @@ calCachedCalendar.prototype = {
                     this_.playbackOfflineItems(function() {this_.mCachedObserver.onLoad(this_.mCachedCalendar);});
                     emptyQueue(aStatus);
                 }
             }
         };
 
         this.getOfflineAddedItems(function(){
             this_.mPendingSync = this_.mUncachedCalendar.getItems(Components.interfaces.calICalendar.ITEM_FILTER_ALL_ITEMS,
-                                                                    0, null,  null, completeListener);
+                                                                    0, null, null, completeListener);
         });
         return this.mPendingSync;
     },
 
     onOfflineStatusChanged: function cCC_onOfflineStatusChanged(aNewState) {
         if (aNewState) {
             // Going offline: (XXX get items before going offline?) => we may ask the user to stay online a bit longer
         } else {
--- a/calendar/base/src/calCalendarManager.js
+++ b/calendar/base/src/calCalendarManager.js
@@ -1007,17 +1007,17 @@ calMgrCalendarObserver.prototype = {
 
         // Will remove paramBlock from announced messages when promptWindow is
         // closed.  (Closing fires unloaded event, but promptWindow is also
         // unloaded [to clean it?] before loading, so wait for detected load
         // event before detecting unload event that signifies user closed this
         // prompt window.)
         let promptUrl = "chrome://calendar/content/calendar-error-prompt.xul";
         let features = "chrome,dialog=yes,alwaysRaised=yes";
-        let promptWindow =  Services.ww.openWindow(null, promptUrl, "_blank", features, paramBlock);
+        let promptWindow = Services.ww.openWindow(null, promptUrl, "_blank", features, paramBlock);
         promptWindow.addEventListener("load", awaitLoad, false);
     }
 };
 
 function calDummyCalendar(type) {
     this.initProviderBase();
     this.type = type;
 }
--- a/calendar/base/src/calFilter.js
+++ b/calendar/base/src/calFilter.js
@@ -888,21 +888,21 @@ calFilter.prototype = {
                 aListener.onGetResult(aCalendar, aStatus, aItemType, aDetail, items.length, items);
             }
         };
 
         // build the filter argument for calICalendar.getItems() from the filter properties
         let filter = aItemType || aCalendar.FILTER_TYPE_ALL;
         if (!props.status || (props.status & (props.FILTER_STATUS_COMPLETED_TODAY |
                                               props.FILTER_STATUS_COMPLETED_BEFORE))) {
-            filter |=  aCalendar.ITEM_FILTER_COMPLETED_YES;
+            filter |= aCalendar.ITEM_FILTER_COMPLETED_YES;
         }
         if (!props.status || (props.status & (props.FILTER_STATUS_INCOMPLETE |
                                               props.FILTER_STATUS_IN_PROGRESS))) {
-            filter |=  aCalendar.ITEM_FILTER_COMPLETED_NO;
+            filter |= aCalendar.ITEM_FILTER_COMPLETED_NO;
         }
 
         let startDate = this.startDate;
         let endDate = this.endDate;
 
         // we only want occurrences returned from calICalendar.getItems() with a default
         // occurence filter property and a bound date range, otherwise the local listener
         // will handle occurrence expansion.
--- a/calendar/base/src/calTimezone.js
+++ b/calendar/base/src/calTimezone.js
@@ -7,17 +7,17 @@ Components.utils.import("resource://cale
 Components.utils.import("resource://calendar/modules/ical.js");
 
 function calICALJSTimezone(innerObject) {
     this.innerObject = innerObject || new ICAL.Timezone();
     this.wrappedJSObject = this;
 }
 
 var calTimezoneInterfaces = [Components.interfaces.calITimezone];
-var calTimezoneClassID =  Components.ID("{6702eb17-a968-4b43-b562-0d0c5f8e9eb5}");
+var calTimezoneClassID = Components.ID("{6702eb17-a968-4b43-b562-0d0c5f8e9eb5}");
 calICALJSTimezone.prototype = {
     QueryInterface: XPCOMUtils.generateQI(calTimezoneInterfaces),
     classID: calTimezoneClassID,
     classInfo: XPCOMUtils.generateCI({
         contractID: "@mozilla.org/calendar/timezone;1",
         classDescription: "Calendar Timezone",
         classID: calTimezoneClassID,
         interfaces: calTimezoneInterfaces
--- a/calendar/base/src/calTimezoneService.js
+++ b/calendar/base/src/calTimezoneService.js
@@ -307,19 +307,19 @@ function guessSystemTimezone() {
     const tzNameDec = nameDataDec && nameDataDec[2];
     const offsetRegex = /[+-]\d{4}/;
     const offsetJun = dateJun.match(offsetRegex)[0];
     const offsetDec = dateDec.match(offsetRegex)[0];
 
     const tzSvc = cal.getTimezoneService();
 
     var continent = "Africa|America|Antarctica|Asia|Australia|Europe";
-    var ocean     = "Arctic|Atlantic|Indian|Pacific";
-    var tzRegex   = new RegExp(".*((?:"+continent+"|"+ocean+")"+
-                               "(?:[/][-A-Z_a-z]+)+)");
+    var ocean = "Arctic|Atlantic|Indian|Pacific";
+    var tzRegex = new RegExp(".*((?:"+continent+"|"+ocean+")"+
+                             "(?:[/][-A-Z_a-z]+)+)");
 
     function getIcalString(component, property) {
         var prop = (component && component.getFirstProperty(property));
         return (prop ? prop.valueAsIcalString : null);
     }
 
     // Check if Olson ZoneInfo timezone matches OS/JSDate timezone properties:
     // * standard offset and daylight/summer offset if present (longitude),
@@ -345,20 +345,20 @@ function guessSystemTimezone() {
             }
         }
 
         var subComp = tz.icalComponent;
         // find currently applicable time period, not just first,
         // because offsets of timezone may be changed over the years.
         var standard = findCurrentTimePeriod(tz, subComp, "STANDARD");
         var standardTZOffset = getIcalString(standard, "TZOFFSETTO");
-        var standardName     = getIcalString(standard, "TZNAME");
+        var standardName = getIcalString(standard, "TZNAME");
         var daylight = findCurrentTimePeriod(tz, subComp, "DAYLIGHT");
         var daylightTZOffset = getIcalString(daylight, "TZOFFSETTO");
-        var daylightName     = getIcalString(daylight, "TZNAME");
+        var daylightName = getIcalString(daylight, "TZNAME");
 
         // Try northern hemisphere cases.
         if (offsetDec == standardTZOffset && offsetDec == offsetJun &&
             !daylight) {
             if (standardName && standardName == tzNameJun) {
                 return 3;
             } else {
                 return 2;
@@ -614,17 +614,17 @@ function guessSystemTimezone() {
                          "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones",
                          wrk.ACCESS_READ);
 
                 // Linear search matching localized name of standard timezone
                 // to find the non-localized registry key.
                 // (Registry keys are sorted by subkeyName, not by localized name
                 //  nor offset, so cannot use binary search.)
                 for (var i = 0; i < wrk.childCount; i++) {
-                    var subkeyName  = wrk.getChildName(i);
+                    var subkeyName = wrk.getChildName(i);
                     var subkey = wrk.openChild(subkeyName, wrk.ACCESS_READ);
                     var std = subkey.readStringValue("Std");
                     subkey.close();
                     if (std == currentTZStandardName) {
                         osUserTimeZone = subkeyName;
                         break;
                     }
                 }
@@ -775,23 +775,23 @@ function guessSystemTimezone() {
             var daylight = findCurrentTimePeriod(tz, subComp, "DAYLIGHT");
             var daylightTZOffset = getIcalString(daylight, "TZOFFSETTO");
             var warningDetail;
             if (probableTZScore == 1) {
                 // score 1 means has daylight time,
                 // but transitions start on different weekday from os timezone.
                 var standardStart = getIcalString(standard, "DTSTART");
                 var standardStartWeekday = weekday(standardStart, tz);
-                var standardRule  = getIcalString(standard, "RRULE");
+                var standardRule = getIcalString(standard, "RRULE");
                 var standardText =
                     ("  Standard: "+standardStart+" "+standardStartWeekday+"\n"+
                      "            "+standardRule+"\n");
                 var daylightStart = getIcalString(daylight, "DTSTART");
                 var daylightStartWeekday = weekday(daylightStart, tz);
-                var daylightRule  = getIcalString(daylight, "RRULE");
+                var daylightRule = getIcalString(daylight, "RRULE");
                 var daylightText =
                     ("  Daylight: "+daylightStart+" "+daylightStartWeekday+"\n"+
                      "            "+daylightRule+"\n");
                 warningDetail =
                     ((standardStart < daylightStart
                       ? standardText + daylightText
                       : daylightText + standardText)+
                      (calProperties.GetStringFromName(
--- a/calendar/base/src/calUtils.js
+++ b/calendar/base/src/calUtils.js
@@ -22,18 +22,18 @@ function _calIcalCreator(cid, iid) {
         return thing;
     };
 }
 
 var createEvent = _calIcalCreator("@mozilla.org/calendar/event;1",
                                   Components.interfaces.calIEvent);
 var createTodo = _calIcalCreator("@mozilla.org/calendar/todo;1",
                                  Components.interfaces.calITodo);
-var createDateTime  = _calIcalCreator("@mozilla.org/calendar/datetime;1",
-                                      Components.interfaces.calIDateTime);
+var createDateTime = _calIcalCreator("@mozilla.org/calendar/datetime;1",
+                                     Components.interfaces.calIDateTime);
 var createDuration = _calIcalCreator("@mozilla.org/calendar/duration;1",
                                      Components.interfaces.calIDuration);
 var createAttendee = _calIcalCreator("@mozilla.org/calendar/attendee;1",
                                      Components.interfaces.calIAttendee);
 var createAttachment = _calIcalCreator("@mozilla.org/calendar/attachment;1",
                                        Components.interfaces.calIAttachment);
 var createAlarm = _calIcalCreator("@mozilla.org/calendar/alarm;1",
                                   Components.interfaces.calIAlarm);
--- a/calendar/import-export/calMonthGridPrinter.js
+++ b/calendar/import-export/calMonthGridPrinter.js
@@ -193,17 +193,17 @@ calMonthPrinter.prototype = {
         // Clone the template week and make sure it doesn't have an id
         let currentWeek = weekTemplate.cloneNode(true);
         currentWeek.removeAttribute("id");
 
         // Set up day numbers for all days in this week
         let currentDate = startOfWeek.clone();
         for (let i = 1; i <= 7; i++) {
             let dayNumber = currentWeek.querySelector(".day" + i + "-number");
-            let dayContainer =  currentWeek.querySelector(".day" + i + "-container");
+            let dayContainer = currentWeek.querySelector(".day" + i + "-container");
             let dayBox = currentWeek.querySelector(".day" + i + "-box");
             let dateKey = cal.print.getDateKey(currentDate);
             dayNumber.textContent = currentDate.day;
 
             // We need to support adding multiple boxes, since the months have
             // overlapping days.
             if (dateKey in dayTable) {
                 if (Array.isArray(dayTable[dateKey])) {
--- a/calendar/import-export/calOutlookCSVImportExport.js
+++ b/calendar/import-export/calOutlookCSVImportExport.js
@@ -151,29 +151,29 @@ calOutlookCSVImporter.prototype = {
         let knownIndxs;
         for (i in locales) {
             locale = locales[i];
             knownIndxs = 0;
             args.titleIndex = 0;
             args.startDateIndex = 0;
             for (let i = 1; i <= header.length; ++i) {
                 switch( header[i-1] ) {
-                    case locale.headTitle:        args.titleIndex = i;       knownIndxs++; break;
-                    case locale.headStartDate:    args.startDateIndex = i;   knownIndxs++; break;
-                    case locale.headStartTime:    args.startTimeIndex = i;   knownIndxs++; break;
-                    case locale.headEndDate:      args.endDateIndex = i;     knownIndxs++; break;
-                    case locale.headEndTime:      args.endTimeIndex = i;     knownIndxs++; break;
-                    case locale.headAllDayEvent:  args.allDayIndex = i;      knownIndxs++; break;
-                    case locale.headAlarm:        args.alarmIndex = i;       knownIndxs++; break;
-                    case locale.headAlarmDate:    args.alarmDateIndex = i;   knownIndxs++; break;
-                    case locale.headAlarmTime:    args.alarmTimeIndex = i;   knownIndxs++; break;
-                    case locale.headCategories:   args.categoriesIndex = i;  knownIndxs++; break;
-                    case locale.headDescription:  args.descriptionIndex = i; knownIndxs++; break;
-                    case locale.headLocation:     args.locationIndex = i;    knownIndxs++; break;
-                    case locale.headPrivate:      args.privateIndex = i;     knownIndxs++; break;
+                    case locale.headTitle: args.titleIndex = i; knownIndxs++; break;
+                    case locale.headStartDate: args.startDateIndex = i; knownIndxs++; break;
+                    case locale.headStartTime: args.startTimeIndex = i; knownIndxs++; break;
+                    case locale.headEndDate: args.endDateIndex = i; knownIndxs++; break;
+                    case locale.headEndTime: args.endTimeIndex = i; knownIndxs++; break;
+                    case locale.headAllDayEvent: args.allDayIndex = i; knownIndxs++; break;
+                    case locale.headAlarm: args.alarmIndex = i; knownIndxs++; break;
+                    case locale.headAlarmDate: args.alarmDateIndex = i; knownIndxs++; break;
+                    case locale.headAlarmTime: args.alarmTimeIndex = i; knownIndxs++; break;
+                    case locale.headCategories: args.categoriesIndex = i; knownIndxs++; break;
+                    case locale.headDescription: args.descriptionIndex = i; knownIndxs++; break;
+                    case locale.headLocation: args.locationIndex = i; knownIndxs++; break;
+                    case locale.headPrivate: args.privateIndex = i; knownIndxs++; break;
                 }
             }
             // Were both mandatory fields recognized?
             if (args.titleIndex != 0 && args.startDateIndex != 0) {
                 break;
             }
         }
 
@@ -289,17 +289,17 @@ calOutlookCSVImporter.prototype = {
                             eDate = sDate.clone();
                             eDate.day += 1;
                         }
                     } else {
                         // We now have a timed startDate and an endDate. If the
                         // end time is invalid set it to 23:59:00
                         if (eDate.isDate) {
                             eDate.isDate = false;
-                            eDate.hour   = 23;
+                            eDate.hour = 23;
                             eDate.minute = 59;
                         }
                         // Correct the duration to 0 seconds if it is negative.
                         if (eDate.subtractDate(sDate).isNegative ) {
                             eDate = sDate.clone();
                         }
                     }
                 }
--- a/calendar/import-export/calWeekPrinter.js
+++ b/calendar/import-export/calWeekPrinter.js
@@ -114,17 +114,17 @@ calWeekPrinter.prototype = {
         let weekTitle = cal.calGetString("calendar", 'WeekTitle', [weekno]);
         currentPage.querySelector(".week-number").textContent = weekTitle;
 
         // Set up the day boxes
         let endOfWeek = weekInfo.getEndOfWeek(startOfWeek);
         for (let currentDate = startOfWeek.clone(); currentDate.compare(endOfWeek) <= 0; currentDate.day++) {
             let weekday = currentDate.weekday;
             let weekdayName = weekdayMap[weekday];
-            let dayOffPrefName = "calendar.week.d" +  weekday + weekdayName + "soff";
+            let dayOffPrefName = "calendar.week.d" + weekday + weekdayName + "soff";
             dayTable[cal.print.getDateKey(currentDate)] = currentPage.querySelector("." + weekdayName + "-container");
 
             let titleNode = currentPage.querySelector("." + weekdayName + "-title");
             titleNode.textContent = dateFormatter.formatDateLong(currentDate.getInTimezone(defaultTimezone));
 
             if (Preferences.get(dayOffPrefName, false)) {
                 let daysOffNode = currentPage.querySelector("." + weekdayName + "-box");
                 daysOffNode.className += " day-off";
--- a/calendar/itip/calItipEmailTransport.js
+++ b/calendar/itip/calItipEmailTransport.js
@@ -400,18 +400,18 @@ calItipEmailTransport.prototype = {
             let tempFile = Services.dirsvc.get("TmpD", Components.interfaces.nsIFile);
             tempFile.append("itipTemp");
             tempFile.createUnique(Components.interfaces.nsIFile.NORMAL_FILE_TYPE,
                                   parseInt("0600", 8));
 
             let outputStream = Components.classes["@mozilla.org/network/file-output-stream;1"]
                                          .createInstance(Components.interfaces.nsIFileOutputStream);
             // Let's write the file - constants from file-utils.js
-            const MODE_WRONLY   = 0x02;
-            const MODE_CREATE   = 0x08;
+            const MODE_WRONLY = 0x02;
+            const MODE_CREATE = 0x08;
             const MODE_TRUNCATE = 0x20;
             outputStream.init(tempFile,
                               MODE_WRONLY | MODE_CREATE | MODE_TRUNCATE,
                               parseInt("0600", 8),
                               0);
             outputStream.write(mailText, mailText.length);
             outputStream.close();
 
--- a/calendar/lightning/content/imip-bar.js
+++ b/calendar/lightning/content/imip-bar.js
@@ -89,17 +89,17 @@ var ltnImipBar = {
                 return;
             }
 
             let imipMethod = gMessageDisplay.displayedMessage.getStringProperty("imip_method");
             cal.itip.initItemFromMsgData(itipItem, imipMethod, gMessageDisplay.displayedMessage);
 
             let imipBar = document.getElementById("imip-bar");
             imipBar.setAttribute("collapsed", "false");
-            imipBar.setAttribute("label",  cal.itip.getMethodText(itipItem.receivedMethod));
+            imipBar.setAttribute("label", cal.itip.getMethodText(itipItem.receivedMethod));
 
             ltnImipBar.msgOverlay = msgOverlay;
 
             cal.itip.processItipItem(itipItem, ltnImipBar.setupOptions);
         }
     },
 
     /**
@@ -189,17 +189,17 @@ var ltnImipBar = {
      *
      * @param itipItem      The iTIP item to set up for
      * @param rc            The status code from processing
      * @param actionFunc    The action function called for execution
      * @param foundItems    An array of items found while searching for the item
      *                      in subscribed calendars
      */
     setupOptions: function setupOptions(itipItem, rc, actionFunc, foundItems) {
-        let imipBar =  document.getElementById("imip-bar");
+        let imipBar = document.getElementById("imip-bar");
         let data = cal.itip.getOptionsText(itipItem, rc, actionFunc, foundItems);
 
         if (Components.isSuccessCode(rc)) {
             ltnImipBar.itipItem = itipItem;
             ltnImipBar.actionFunc = actionFunc;
             ltnImipBar.foundItems = foundItems;
         }
 
--- a/calendar/lightning/modules/ltnInvitationUtils.jsm
+++ b/calendar/lightning/modules/ltnInvitationUtils.jsm
@@ -112,17 +112,17 @@ ltn.invitation = {
 
         field("summary", aEvent.title);
         field("location", aEvent.getProperty("LOCATION"));
 
         let dateString = formatter.formatItemInterval(aEvent);
 
         if (aEvent.recurrenceInfo) {
             let kDefaultTimezone = cal.calendarDefaultTimezone();
-            let startDate =  aEvent.startDate;
+            let startDate = aEvent.startDate;
             let endDate = aEvent.endDate;
             startDate = startDate ? startDate.getInTimezone(kDefaultTimezone) : null;
             endDate = endDate ? endDate.getInTimezone(kDefaultTimezone) : null;
             let repeatString = recurrenceRule2String(aEvent.recurrenceInfo, startDate,
                                                      endDate, startDate.isDate);
             if (repeatString) {
                 dateString = repeatString;
             }
--- a/calendar/providers/caldav/calDavCalendar.js
+++ b/calendar/providers/caldav/calDavCalendar.js
@@ -2050,17 +2050,17 @@ calDavCalendar.prototype = {
             xmlHeader +
             '<D:propfind xmlns:D="DAV:">' +
               '<D:prop>' +
                 '<D:principal-collection-set/>' +
               '</D:prop>' +
             '</D:propfind>';
 
         if (this.verboseLogging()) {
-            cal.LOG("CalDAV: send: " + homeSet.spec + "\n"  + queryXml);
+            cal.LOG("CalDAV: send: " + homeSet.spec + "\n" + queryXml);
         }
         var streamListener = {};
         streamListener.onStreamComplete =
             function findInOutboxes_oSC(aLoader, aContext, aStatus,
                                          aResultLength, aResult) {
             let request = aLoader.request.QueryInterface(Components.interfaces.nsIHttpChannel);
             if (request.responseStatus != 207) {
                 cal.LOG("CalDAV: Unexpected status " + request.responseStatus +
@@ -2307,17 +2307,17 @@ calDavCalendar.prototype = {
      * findPrincipalNS
      * checkPrincipalsNameSpace
      * completeCheckServerInfo                      * You are here
      */
     completeCheckServerInfo: function caldav_completeCheckServerInfo(aChangeLogListener, aError) {
         if (Components.isSuccessCode(aError)) {
             // "undefined" is a successcode, so all is good
             this.saveCalendarProperties();
-            this.checkedServerInfo  = true;
+            this.checkedServerInfo = true;
             this.setProperty("currentStatus", Components.results.NS_OK);
 
             if (this.isCached) {
                 this.safeRefresh(aChangeLogListener);
             } else {
                 this.refresh();
             }
         } else {
--- a/calendar/providers/caldav/calDavRequestHandlers.js
+++ b/calendar/providers/caldav/calDavRequestHandlers.js
@@ -538,17 +538,17 @@ webDavSyncHandler.prototype = {
         switch (aLocalName) {
             case "response": // WebDAV Sync draft 3
             case "sync-response": // WebDAV Sync draft 0,1,2
                 let r = this.currentResponse;
                 if (r.href && r.href.length) {
                     r.href = this.calendar.ensureDecodedPath(r.href);
                 }
 
-                if ((!r.getcontenttype || r.getcontenttype == "text/plain")  &&
+                if ((!r.getcontenttype || r.getcontenttype == "text/plain") &&
                     r.href &&
                     r.href.endsWith(".ics")) {
                   // If there is no content-type (iCloud) or text/plain was passed
                   // (iCal Server) for the resource but its name ends with ".ics"
                   // assume the content type to be text/calendar. Apple
                   // iCloud/iCal Server interoperability fix.
                   r.getcontenttype = "text/calendar";
                 }
--- a/calendar/providers/composite/calCompositeCalendar.js
+++ b/calendar/providers/composite/calCompositeCalendar.js
@@ -214,17 +214,17 @@ calCompositeCalendar.prototype = {
         if (calendar && this.mDefaultCalendar && this.mDefaultCalendar.id == calendar.id) {
             return;
         }
         if (usePref && this.mPrefPrefix) {
             if (this.mDefaultCalendar) {
                 this.mDefaultCalendar.deleteProperty(this.mDefaultPref);
             }
             // if not null set the new calendar as default in the preferences
-            if (calendar)  {
+            if (calendar) {
                 calendar.setProperty(this.mDefaultPref, true);
             }
         }
         this.mDefaultCalendar = calendar;
         this.mCompositeObservers.notify("onDefaultCalendarChanged", [calendar]);
     },
 
     set defaultCalendar(v) {
--- a/calendar/providers/ics/calICSCalendar.js
+++ b/calendar/providers/ics/calICSCalendar.js
@@ -320,17 +320,17 @@ calICSCalendar.prototype = {
         var savedthis = this;
         var listener =
         {
             serializer: null,
             QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calIOperationListener]),
             onOperationComplete: function(aCalendar, aStatus, aOperationType, aId, aDetail)
             {
                 var inLastWindowClosingSurvivalArea = false;
-                try  {
+                try {
                     // All events are returned. Now set up a channel and a
                     // streamloader to upload.  onStopRequest will be called
                     // once the write has finished
                     var channel = Services.io.newChannelFromURI2(savedthis.mUri,
                                                                  null,
                                                                  Services.scriptSecurityManager.getSystemPrincipal(),
                                                                  null,
                                                                  Components.interfaces.nsILoadInfo.SEC_NORMAL,
--- a/calendar/providers/memory/calMemoryCalendar.js
+++ b/calendar/providers/memory/calMemoryCalendar.js
@@ -446,17 +446,17 @@ calMemoryCalendar.prototype = {
             // If the offline flag doesn't match, skip the item
             if ((hasItemFlag ||
                     (offline_filter != 0 && offlineFlag == cICL.OFFLINE_FLAG_DELETED_RECORD)) &&
                 (offlineFlag != offline_filter)) {
                 return cal.forEach.CONTINUE;
             }
 
             if (itemReturnOccurrences && item.recurrenceInfo) {
-                let startDate  = aRangeStart;
+                let startDate = aRangeStart;
                 if (!aRangeStart && cal.isToDo(item)) {
                     startDate = item.entryDate;
                 }
                 let occurrences = item.recurrenceInfo.getOccurrences(
                     startDate, aRangeEnd, aCount ? aCount - itemsFound.length : 0, {});
                 if (wantUnrespondedInvitations) {
                     occurrences = occurrences.filter(checkUnrespondedInvitation);
                 }
--- a/calendar/providers/storage/calStorageCalendar.js
+++ b/calendar/providers/storage/calStorageCalendar.js
@@ -233,19 +233,19 @@ calStorageCalendar.prototype = {
                 try {
                     // hold lock on storage.sdb until we've migrated data from storage.sdb:
                     this.mDB.beginTransactionAs(Components.interfaces.mozIStorageConnection.TRANSACTION_EXCLUSIVE);
                     try {
                         if (this.mDB.tableExists("cal_events")) { // check again (with lock)
                             // take over data and drop from storage.sdb tables:
                             for (let table in getSqlTable(DB_SCHEMA_VERSION)) {
                                 if (table.substr(0, 4) != "idx_") {
-                                    this.mDB.executeSimpleSQL("CREATE TABLE local_sqlite." +  table +
+                                    this.mDB.executeSimpleSQL("CREATE TABLE local_sqlite." + table +
                                                               " AS SELECT * FROM " + table +
-                                                              "; DROP TABLE IF EXISTS " +  table);
+                                                              "; DROP TABLE IF EXISTS " + table);
                                 }
                             }
                             this.mDB.commitTransaction();
                         } else { // migration done in the meantime
                             this.mDB.rollbackTransaction();
                         }
                     } catch (exc) {
                         this.logError("prepareInitDB storage.sdb migration exception", exc);
@@ -988,29 +988,29 @@ calStorageCalendar.prototype = {
         let aID = aItem.id;
         if (cal.isEvent(aItem)) {
             this.prepareStatement(this.mEditEventOfflineFlag);
             this.mEditEventOfflineFlag.params.id = aID;
             this.mEditEventOfflineFlag.params.offline_journal = flag || null;
             try {
                 this.mEditEventOfflineFlag.executeStep();
             } catch (e) {
-                this.logError("Error setting offline journal flag for "  + aItem.title, e);
+                this.logError("Error setting offline journal flag for " + aItem.title, e);
             } finally {
                 this.mEditEventOfflineFlag.reset();
             }
 
         } else if (cal.isToDo(aItem)) {
             this.prepareStatement(this.mEditTodoOfflineFlag);
             this.mEditTodoOfflineFlag.params.id = aID;
             this.mEditTodoOfflineFlag.params.offline_journal = flag || null;
             try {
                 this.mEditTodoOfflineFlag.executeStep();
             } catch (e) {
-                this.logError("Error setting offline journal flag for "  + aItem.title, e);
+                this.logError("Error setting offline journal flag for " + aItem.title, e);
             } finally {
                 this.mEditTodoOfflineFlag.reset();
             }
         }
     },
 
     //
     // calIOfflineStorage interface
@@ -2208,17 +2208,17 @@ calStorageCalendar.prototype = {
                 for (let exid of exceptions) {
                     let ex = rec.getExceptionFor(exid);
                     if (!ex) {
                         throw Components.results.NS_ERROR_UNEXPECTED;
                     }
                     this.writeItem(ex, null);
                 }
             }
-        } else  if (item.recurrenceId && item.recurrenceId.isDate) {
+        } else if (item.recurrenceId && item.recurrenceId.isDate) {
             flags |= CAL_ITEM_FLAG.RECURRENCE_ID_ALLDAY;
         }
 
         return flags;
     },
 
     writeAttachments: function cSC_writeAttachments(item, olditem) {
         let attachments = item.getAttachments({});
--- a/calendar/providers/storage/calStorageUpgrade.jsm
+++ b/calendar/providers/storage/calStorageUpgrade.jsm
@@ -95,18 +95,18 @@ function getSql(tblName, tblData, altern
     let altName = (alternateName || tblName);
     let sql;
     if (tblName.substr(0, 4) == "idx_") {
         // If this is an index, we need construct the SQL differently
         let idxTbl = tblData[tblName].shift();
         let idxOn = idxTbl + "(" + tblData[tblName].join(",") + ")";
         sql = "CREATE INDEX " + altName + " ON " + idxOn + ";";
     } else {
-        sql = "CREATE TABLE " + altName  + " (\n";
-        for (let [key, type] in Iterator(tblData[tblName]))  {
+        sql = "CREATE TABLE " + altName + " (\n";
+        for (let [key, type] in Iterator(tblData[tblName])) {
             sql += "    " + key + " " + type + ",\n";
         }
     }
 
     return sql.replace(/,\s*$/, ");");
 }
 
 /**
@@ -867,19 +867,19 @@ upgrade.v6 = function upgrade_v6(db, ver
                          "todo_due_tz", "todo_completed_tz",
                          "alarm_time_tz"];
         alterTypes(tbl, "cal_todos", todoCols, "TEXT", db);
 
         let attendeeCols = ["item_id", "recurrence_id_tz", "attendee_id",
                             "common_name", "role", "status", "type"];
         alterTypes(tbl, "cal_attendees", attendeeCols, "TEXT", db);
 
-        let recurrenceCols =  ["item_id", "recur_type", "dates", "second",
-                               "minute", "hour", "day", "monthday", "yearday",
-                               "weekno", "month", "setpos"];
+        let recurrenceCols = ["item_id", "recur_type", "dates", "second",
+                              "minute", "hour", "day", "monthday", "yearday",
+                              "weekno", "month", "setpos"];
         alterTypes(tbl, "cal_recurrence", recurrenceCols, "TEXT", db);
 
         let propertyCols = ["item_id", "recurrence_id_tz", "key"];
         alterTypes(tbl, "cal_properties", propertyCols, "TEXT", db);
         setDbVersionAndCommit(db, 6);
     } catch (e) {
         throw reportErrorAndRollback(db, e);
     }
@@ -1143,20 +1143,20 @@ upgrade.v16 = function upgrade_v16(db, v
             // Note the following two columns were not originally part of the
             // v16 upgrade, see note above function.
             recurrence_id: "INTEGER",
             recurrence_id_tz: "TEXT",
             icalString: "TEXT"
         }, db);
 
         let copyDataOver = function copyDataOver(tbl) {
-            const transAlarm =  "translateAlarm(alarm_offset, " +
-                                               "alarm_related, " +
-                                               "alarm_time, " +
-                                               "alarm_time_tz)";
+            const transAlarm = "translateAlarm(alarm_offset, " +
+                                              "alarm_related, " +
+                                              "alarm_time, " +
+                                              "alarm_time_tz)";
             executeSimpleSQL(db, "INSERT INTO cal_alarms (cal_id, item_id," +
                                  "                        recurrence_id, " +
                                  "                        recurrence_id_tz, " +
                                  "                        icalString)" +
                                  " SELECT cal_id, id, recurrence_id," +
                                  "        recurrence_id_tz, " + transAlarm +
                                  "   FROM " + tbl +
                                  "  WHERE alarm_offset IS NOT NULL" +
--- a/calendar/providers/wcap/calWcapCalendarItems.js
+++ b/calendar/providers/wcap/calWcapCalendarItems.js
@@ -269,19 +269,19 @@ function diffProperty(newItem, oldItem, 
             val = null;
         }
     }
     return val;
 }
 
 var METHOD_PUBLISH = 1;
 var METHOD_REQUEST = 2;
-var METHOD_REPLY   = 4;
-var METHOD_CANCEL  = 8;
-var METHOD_UPDATE  = 256;
+var METHOD_REPLY = 4;
+var METHOD_CANCEL = 8;
+var METHOD_UPDATE = 256;
 
 calWcapCalendar.prototype.storeItem =
 function calWcapCalendar_storeItem(bAddItem, item, oldItem, request) {
     function getOrgId(item) {
         return (item && item.organizer && item.organizer.id ? item.organizer.id : null);
     }
     function encodeAttendees(atts) {
         function attendeeSort(one, two) {
@@ -475,24 +475,24 @@ function calWcapCalendar_storeItem(bAddI
 
         var icsClass = getPrivacy(item);
         if (!oldItem || icsClass != getPrivacy(oldItem)) {
             params += ("&icsClass=" + icsClass);
         }
 
         if (!oldItem || item.status != oldItem.status) {
             switch (item.status) {
-                case "CONFIRMED":    params += "&status=0"; break;
-                case "CANCELLED":    params += "&status=1"; break;
-                case "TENTATIVE":    params += "&status=2"; break;
+                case "CONFIRMED": params += "&status=0"; break;
+                case "CANCELLED": params += "&status=1"; break;
+                case "TENTATIVE": params += "&status=2"; break;
                 case "NEEDS-ACTION": params += "&status=3"; break;
-                case "COMPLETED":    params += "&status=4"; break;
-                case "IN-PROCESS":   params += "&status=5"; break;
-                case "DRAFT":        params += "&status=6"; break;
-                case "FINAL":        params += "&status=7"; break;
+                case "COMPLETED": params += "&status=4"; break;
+                case "IN-PROCESS": params += "&status=5"; break;
+                case "DRAFT": params += "&status=6"; break;
+                case "FINAL": params += "&status=7"; break;
                 default: // reset to default
                     params += (bIsEvent ? "&status=0" : "&status=3");
                     break;
             }
         }
 
         val = diffProperty(item, oldItem, "TRANSP");
         if (val !== null) {
--- a/calendar/providers/wcap/calWcapUtils.js
+++ b/calendar/providers/wcap/calWcapUtils.js
@@ -103,17 +103,17 @@ function log(msg, context, bForce) {
             try {
                 // xxx todo?
                 // assuming ANSI chars here, for logging sufficient:
                 initLogging.mLogFilestream.write(str, str.length);
             } catch (exc) { // catching any io errors here:
                 var err = ("error writing log file: " + errorToString(exc));
                 Components.utils.reportError(exc);
                 Services.console.logStringMessage(err);
-                dump(err  + "\n\n");
+                dump(err + "\n\n");
             }
         }
         return ret;
     } else {
         return msg;
     }
 }
 
--- a/calendar/resources/content/datetimepickers/datetimepickers.xml
+++ b/calendar/resources/content/datetimepickers/datetimepickers.xml
@@ -1708,32 +1708,32 @@
             } catch(ex) {
             }
 
             var time = null;
             var timePartsArray = this.parseTimeRegExp.exec(aValue);
             const PRE_INDEX=1, HR_INDEX=2, MIN_INDEX=4, SEC_INDEX=6, POST_INDEX=8;
 
             if (timePartsArray != null) {
-              var hoursString   = timePartsArray[HR_INDEX]
-              var hours         = Number(hoursString);
-              var hoursSuffix   = timePartsArray[HR_INDEX + 1];
+              var hoursString = timePartsArray[HR_INDEX]
+              var hours = Number(hoursString);
+              var hoursSuffix = timePartsArray[HR_INDEX + 1];
               if (!(hours >= 0 && hours < 24)) {
                 return null;
               }
 
               var minutesString = timePartsArray[MIN_INDEX];
-              var minutes       = (minutesString == null? 0 : Number(minutesString));
+              var minutes = (minutesString == null? 0 : Number(minutesString));
               var minutesSuffix = timePartsArray[MIN_INDEX + 1];
               if (!(minutes >= 0 && minutes < 60)) {
                 return null;
               }
 
               var secondsString = timePartsArray[SEC_INDEX];
-              var seconds       = (secondsString == null? 0 : Number(secondsString));
+              var seconds = (secondsString == null? 0 : Number(secondsString));
               var secondsSuffix = timePartsArray[SEC_INDEX + 1];
               if (!(seconds >= 0 && seconds < 60)) {
                 return null;
               }
 
               var ampmCode = null;
               if (timePartsArray[PRE_INDEX] || timePartsArray[POST_INDEX]) {
                 if (this.ampmIndex && timePartsArray[this.ampmIndex]) {
@@ -1792,20 +1792,20 @@
             this.parseShortDateRegex = /^\D*(\d+)\D+(\d+)\D+(\d+)\D?$/;
             var probeDate = new Date(2002, 3-1, 4); // month is 0-based
             var probeString = this.formatDate(probeDate);
             var probeArray = this.parseShortDateRegex.exec(probeString);
             if (probeArray != null) {
               // Numeric month format
               for (var i = 1; i <= 3; i++) {
                 switch (Number(probeArray[i])) {
-                  case 2:    this.twoDigitYear = true; // fall thru
-                  case 2002: this.yearIndex = i;       break;
-                  case 3:    this.monthIndex = i;      break;
-                  case 4:    this.dayIndex = i;        break;
+                  case 2: this.twoDigitYear = true; // fall thru
+                  case 2002: this.yearIndex = i; break;
+                  case 3: this.monthIndex = i; break;
+                  case 4: this.dayIndex = i; break;
                 }
               }
               // All three indexes are set (not -1) at this point.
               this.probeSucceeded = true;
             } else {
               // SHORT DATE WITH ALPHABETIC MONTH, such as "dd MMM yy" or "MMMM dd, yyyy"
               // (\d+|[^\d\W]) is digits or letters, not both together.
               // Allows 31dec1999 (no delimiters between parts) if OS does (w2k does not).
@@ -1814,20 +1814,20 @@
               // easy way to describe unicode letters short of a HUGE character range
               // regexp derived from the Alphabetic ranges in
               // http://www.unicode.org/Public/UNIDATA/DerivedCoreProperties.txt)
               this.parseShortDateRegex = /^\s*(\d+|[^\d\W]+)\W{0,2}(\d+|[^\d\W]+)\W{0,2}(\d+|[^\d\W]+)\s*$/;
               probeArray = this.parseShortDateRegex.exec(probeString);
               if (probeArray != null) {
                 for (var j = 1; j <= 3; j++) {
                   switch (Number(probeArray[j])) {
-                    case 2:    this.twoDigitYear = true; // fall thru
-                    case 2002: this.yearIndex = j;       break;
-                    case 4:    this.dayIndex = j;        break;
-                    default:   this.monthIndex = j;      break;
+                    case 2: this.twoDigitYear = true; // fall thru
+                    case 2002: this.yearIndex = j; break;
+                    case 4: this.dayIndex = j; break;
+                    default: this.monthIndex = j; break;
                   }
                 }
                 if (this.yearIndex != -1 && this.dayIndex != -1 && this.monthIndex != -1) {
                   this.probeSucceeded = true;
                   // Fill this.alphaMonths with month names.
                   this.alphaMonths = new Array(12);
                   for (var m = 0; m < 12; m++) {
                     probeDate.setMonth(m);
--- a/calendar/resources/content/publish.js
+++ b/calendar/resources/content/publish.js
@@ -10,17 +10,17 @@ Components.utils.import("resource://gre/
 /**
  * publishCalendarData
  * Show publish dialog, ask for URL and publish all selected items.
  */
 function publishCalendarData()
 {
    var args = {};
 
-   args.onOk =  self.publishCalendarDataDialogResponse;
+   args.onOk = self.publishCalendarDataDialogResponse;
 
    openDialog("chrome://calendar/content/publishDialog.xul", "caPublishEvents",
               "chrome,titlebar,modal,resizable", args );
 }
 
 /**
  * publishCalendarDataDialogResponse
  * Callback method for publishCalendarData() that is called when the user
@@ -60,17 +60,17 @@ function publishEntireCalendar(aCalendar
                        "_blank", "chrome,titlebar,modal,resizable", args);
             return;
         }
     }
 
     let args = {};
     let publishObject = {};
 
-    args.onOk =  self.publishEntireCalendarDialogResponse;
+    args.onOk = self.publishEntireCalendarDialogResponse;
 
     publishObject.calendar = aCalendar;
 
     // restore the remote ics path preference from the calendar passed in
     let remotePath = aCalendar.getProperty("remote-ics-path");
     if (remotePath && remotePath.length && remotePath.length > 0) {
         publishObject.remotePath = remotePath;
     }
--- a/calendar/test/mozmill/eventDialog/testEventDialogModificationPrompt.js
+++ b/calendar/test/mozmill/eventDialog/testEventDialogModificationPrompt.js
@@ -7,18 +7,18 @@ var modalDialog = require("../shared-mod
 var prefs = require("../shared-modules/prefs");
 
 var sleep = 500;
 var calendar = "Mozmill";
 var title = "Title";
 var location = "Location";
 var description = "Description\ncontinuing";
 var pass;
-var date1 = new Date(2009, 0, 1,  8, 0);
-var date2 = new Date(2009, 0, 2,  9, 0);
+var date1 = new Date(2009, 0, 1, 8, 0);
+var date2 = new Date(2009, 0, 2, 9, 0);
 var date3 = new Date(2009, 0, 3, 10, 0);
 var data = [{title: "title1", location: "location1", description: "description1", allday: false,
              startdate: date1, starttime: date1, enddate: date2, endtime: date2, repeat: "none",
              reminder: 0, priority: "normal", privacy: "public", status: "confirmed",
              freebusy: "busy", timezone: true, attachment: {add: "http://mozilla.org"}},
             {title: "title2", location: "location2", description: "description2", allday: true,
              startdate: date2, starttime: date2, enddate: date3, endtime: date3, repeat: "daily",
              reminder: 2, priority: "high", privacy: "private", status: "tentative",
--- a/calendar/test/mozmill/recurrence/testLastDayOfMonthRecurrence.js
+++ b/calendar/test/mozmill/recurrence/testLastDayOfMonthRecurrence.js
@@ -32,31 +32,31 @@ var testLastDayOfMonthRecurrence = funct
   event.waitForElement(new elementslib.ID(event.window.document, "item-repeat"));
   event.select(new elementslib.ID(event.window.document, "item-repeat"), undefined, undefined,
     "custom");
 
   event.click(new elementslib.ID(event.window.document, "button-save"));
   controller.waitFor(function() {return mozmill.utils.getWindows("Calendar:EventDialog").length == 0});
 
   //                        date     correct row in month view
-  let checkingData = [[2008,  1, 31, 5],
-                      [2008,  2, 29, 5],
-                      [2008,  3, 31, 6],
-                      [2008,  4, 30, 5],
-                      [2008,  5, 31, 5],
-                      [2008,  6, 30, 5],
-                      [2008,  7, 31, 5],
-                      [2008,  8, 31, 6],
-                      [2008,  9, 30, 5],
+  let checkingData = [[2008, 1, 31, 5],
+                      [2008, 2, 29, 5],
+                      [2008, 3, 31, 6],
+                      [2008, 4, 30, 5],
+                      [2008, 5, 31, 5],
+                      [2008, 6, 30, 5],
+                      [2008, 7, 31, 5],
+                      [2008, 8, 31, 6],
+                      [2008, 9, 30, 5],
                       [2008, 10, 31, 5],
                       [2008, 11, 30, 6],
                       [2008, 12, 31, 5],
-                      [2009,  1, 31, 5],
-                      [2009,  2, 28, 4],
-                      [2009,  3, 31, 5]];
+                      [2009, 1, 31, 5],
+                      [2009, 2, 28, 4],
+                      [2009, 3, 31, 5]];
   let box = "";
 
   // check all dates
   for(let i = 0; i < checkingData.length; i++){
     calUtils.goToDate(controller, checkingData[i][0], checkingData[i][1], checkingData[i][2]);
 
     // day view
     calUtils.switchToView(controller, "day");
--- a/calendar/test/mozmill/recurrenceRotated/testLastDayOfMonthRecurrence.js
+++ b/calendar/test/mozmill/recurrenceRotated/testLastDayOfMonthRecurrence.js
@@ -37,32 +37,33 @@ var testLastDayOfMonthRecurrence = funct
   md.start(setRecurrence);
   event.waitForElement(new elementslib.ID(event.window.document, "item-repeat"));
   event.select(new elementslib.ID(event.window.document, "item-repeat"), undefined, undefined,
     "custom");
 
   event.click(new elementslib.ID(event.window.document, "button-save"));
   controller.waitFor(function() {return mozmill.utils.getWindows("Calendar:EventDialog").length == 0});
 
-  //                        date     correct row in month view
-  let checkingData = [[2008,  1, 31, 5],
-                      [2008,  2, 29, 5],
-                      [2008,  3, 31, 6],
-                      [2008,  4, 30, 5],
-                      [2008,  5, 31, 5],
-                      [2008,  6, 30, 5],
-                      [2008,  7, 31, 5],
-                      [2008,  8, 31, 6],
-                      [2008,  9, 30, 5],
+  //                      date      correct row in month view
+  //                   vvvvvvvvvvv  v
+  let checkingData = [[2008, 1, 31, 5],
+                      [2008, 2, 29, 5],
+                      [2008, 3, 31, 6],
+                      [2008, 4, 30, 5],
+                      [2008, 5, 31, 5],
+                      [2008, 6, 30, 5],
+                      [2008, 7, 31, 5],
+                      [2008, 8, 31, 6],
+                      [2008, 9, 30, 5],
                       [2008, 10, 31, 5],
                       [2008, 11, 30, 6],
                       [2008, 12, 31, 5],
-                      [2009,  1, 31, 5],
-                      [2009,  2, 28, 4],
-                      [2009,  3, 31, 5]];
+                      [2009, 1, 31, 5],
+                      [2009, 2, 28, 4],
+                      [2009, 3, 31, 5]];
   let box = "";
 
   // check all dates
   for(let i = 0; i < checkingData.length; i++){
     calUtils.goToDate(controller, checkingData[i][0], checkingData[i][1], checkingData[i][2]);
 
     // day view
     calUtils.switchToView(controller, "day");
--- a/calendar/test/mozmill/shared-modules/calendar-utils.js
+++ b/calendar/test/mozmill/shared-modules/calendar-utils.js
@@ -1,17 +1,19 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var MODULE_NAME = "calendar-utils";
 var MODULE_REQUIRES = ["window-helpers"];
 
-var os = {};      Components.utils.import('resource://mozmill/stdlib/os.js', os);
-var frame = {};      Components.utils.import('resource://mozmill/modules/frame.js', frame);
+var os = {};
+Components.utils.import('resource://mozmill/stdlib/os.js', os);
+var frame = {};
+Components.utils.import('resource://mozmill/modules/frame.js', frame);
 
 var modalDialog = require("test-window-helpers");
 
 var sleep = 500;
 var EVENT_BOX = 0; // Use when you need an event box
 var CANVAS_BOX = 1; // Use when you need a calendar canvas box
 var ALLDAY = 2; // Use when you need an allday canvas or event box
 
--- a/calendar/test/mozmill/timezoneTests/test10.js
+++ b/calendar/test/mozmill/timezoneTests/test10.js
@@ -3,27 +3,27 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var calUtils = require("../shared-modules/calendar-utils");
 var prefs = require("../shared-modules/prefs");
 var timezoneUtils = require("../shared-modules/timezone-utils");
 
 var sleep = 500;
 var calendar = "Mozmill";
-var dates = [[2009,  1,  1], [2009,  4,  2], [2009,  4, 16], [2009,  4, 30],
-             [2009,  7,  2], [2009, 10, 15], [2009, 10, 29], [2009, 11,  5]];
+var dates = [[2009, 1, 1], [2009, 4, 2], [2009, 4, 16], [2009, 4, 30],
+             [2009, 7, 2], [2009, 10, 15], [2009, 10, 29], [2009, 11, 5]];
 var timezones = ["America/St_Johns", "America/Caracas", "America/Phoenix", "America/Los_Angeles",
                  "America/Argentina/Buenos_Aires", "Europe/Paris", "Asia/Kathmandu", "Australia/Adelaide"];
 /* rows - dates
    columns - correct time for each event */
 var times = [[[18, 30], [19, 30], [20, 30], [21, 30], [22, 30], [23, 30], [0, 30, +1], [1, 30, +1]],
              [[17, 30], [19, 30], [20, 30], [20, 30], [22, 30], [22, 30], [0, 30, +1], [1, 30, +1]],
-             [[16, 30], [18, 30], [19, 30], [19, 30], [21, 30], [21, 30], [23, 30],    [1, 30, +1]],
-             [[16, 30], [18, 30], [19, 30], [19, 30], [21, 30], [21, 30], [23, 30],    [1, 30, +1]],
-             [[16, 30], [18, 30], [19, 30], [19, 30], [21, 30], [21, 30], [23, 30],    [1, 30, +1]],
+             [[16, 30], [18, 30], [19, 30], [19, 30], [21, 30], [21, 30], [23, 30], [1, 30, +1]],
+             [[16, 30], [18, 30], [19, 30], [19, 30], [21, 30], [21, 30], [23, 30], [1, 30, +1]],
+             [[16, 30], [18, 30], [19, 30], [19, 30], [21, 30], [21, 30], [23, 30], [1, 30, +1]],
              [[17, 30], [19, 30], [20, 30], [20, 30], [22, 30], [22, 30], [0, 30, +1], [1, 30, +1]],
              [[17, 30], [19, 30], [20, 30], [20, 30], [22, 30], [23, 30], [0, 30, +1], [1, 30, +1]],
              [[18, 30], [19, 30], [20, 30], [21, 30], [22, 30], [23, 30], [0, 30, +1], [1, 30, +1]]]
 
 var setupModule = function(module) {
   controller = mozmill.getMail3PaneController();
 }
 
--- a/calendar/test/mozmill/timezoneTests/test3.js
+++ b/calendar/test/mozmill/timezoneTests/test3.js
@@ -2,30 +2,30 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var calUtils = require("../shared-modules/calendar-utils");
 var timezoneUtils = require("../shared-modules/timezone-utils");
 
 var sleep = 500;
 var calendar = "Mozmill";
-var dates = [[2009,  1,  1], [2009,  4,  2], [2009,  4, 16], [2009,  4, 30],
-             [2009,  7,  2], [2009, 10, 15], [2009, 10, 29], [2009, 11,  5]];
+var dates = [[2009, 1, 1], [2009, 4, 2], [2009, 4, 16], [2009, 4, 30],
+             [2009, 7, 2], [2009, 10, 15], [2009, 10, 29], [2009, 11, 5]];
 var timezones = ["America/St_Johns", "America/Caracas", "America/Phoenix", "America/Los_Angeles",
                  "America/Argentina/Buenos_Aires", "Europe/Paris", "Asia/Kathmandu", "Australia/Adelaide"];
 /* rows - dates
    columns - correct time for each event */
-var times = [[[4, 30], [5, 30], [6, 30], [7, 30],  [8, 30],  [9, 30], [10, 30], [11, 30]],
-             [[4, 30], [6, 30], [7, 30], [7, 30],  [9, 30],  [9, 30], [11, 30], [12, 30]],
-             [[4, 30], [6, 30], [7, 30], [7, 30],  [9, 30],  [9, 30], [11, 30], [13, 30]],
-             [[4, 30], [6, 30], [7, 30], [7, 30],  [9, 30],  [9, 30], [11, 30], [13, 30]],
-             [[4, 30], [6, 30], [7, 30], [7, 30],  [9, 30],  [9, 30], [11, 30], [13, 30]],
-             [[4, 30], [6, 30], [7, 30], [7, 30],  [9, 30],  [9, 30], [11, 30], [12, 30]],
-             [[4, 30], [6, 30], [7, 30], [7, 30],  [9, 30], [10, 30], [11, 30], [12, 30]],
-             [[4, 30], [5, 30], [6, 30], [7, 30],  [8, 30],  [9, 30], [10, 30], [11, 30]]]
+var times = [[[4, 30], [5, 30], [6, 30], [7, 30], [8, 30], [9, 30], [10, 30], [11, 30]],
+             [[4, 30], [6, 30], [7, 30], [7, 30], [9, 30], [9, 30], [11, 30], [12, 30]],
+             [[4, 30], [6, 30], [7, 30], [7, 30], [9, 30], [9, 30], [11, 30], [13, 30]],
+             [[4, 30], [6, 30], [7, 30], [7, 30], [9, 30], [9, 30], [11, 30], [13, 30]],
+             [[4, 30], [6, 30], [7, 30], [7, 30], [9, 30], [9, 30], [11, 30], [13, 30]],
+             [[4, 30], [6, 30], [7, 30], [7, 30], [9, 30], [9, 30], [11, 30], [12, 30]],
+             [[4, 30], [6, 30], [7, 30], [7, 30], [9, 30], [10, 30], [11, 30], [12, 30]],
+             [[4, 30], [5, 30], [6, 30], [7, 30], [8, 30], [9, 30], [10, 30], [11, 30]]]
 
 var setupModule = function(module) {
   controller = mozmill.getMail3PaneController();
 }
 
 var testTimezones3_checkStJohns = function () {
   let eventPath = '/{"tooltip":"itemTooltip","calendar":"' + calendar.toLowerCase() + '"}';
 
--- a/calendar/test/mozmill/timezoneTests/test4.js
+++ b/calendar/test/mozmill/timezoneTests/test4.js
@@ -2,18 +2,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var calUtils = require("../shared-modules/calendar-utils");
 var timezoneUtils = require("../shared-modules/timezone-utils");
 
 var sleep = 500;
 var calendar = "Mozmill";
-var dates = [[2009,  1,  1], [2009,  4,  2], [2009,  4, 16], [2009,  4, 30],
-             [2009,  7,  2], [2009, 10, 15], [2009, 10, 29], [2009, 11,  5]];
+var dates = [[2009, 1, 1], [2009, 4, 2], [2009, 4, 16], [2009, 4, 30],
+             [2009, 7, 2], [2009, 10, 15], [2009, 10, 29], [2009, 11, 5]];
 var timezones = ["America/St_Johns", "America/Caracas", "America/Phoenix", "America/Los_Angeles",
                  "America/Argentina/Buenos_Aires", "Europe/Paris", "Asia/Kathmandu", "Australia/Adelaide"];
 /* rows - dates
    columns - correct time for each event */
 var times = [[[3, 30], [4, 30], [5, 30], [6, 30], [7, 30], [8, 30], [9, 30], [10, 30]],
              [[2, 30], [4, 30], [5, 30], [5, 30], [7, 30], [7, 30], [9, 30], [10, 30]],
              [[2, 30], [4, 30], [5, 30], [5, 30], [7, 30], [7, 30], [9, 30], [11, 30]],
              [[2, 30], [4, 30], [5, 30], [5, 30], [7, 30], [7, 30], [9, 30], [11, 30]],
--- a/calendar/test/mozmill/timezoneTests/test5.js
+++ b/calendar/test/mozmill/timezoneTests/test5.js
@@ -2,18 +2,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var calUtils = require("../shared-modules/calendar-utils");
 var timezoneUtils = require("../shared-modules/timezone-utils");
 
 var sleep = 500;
 var calendar = "Mozmill";
-var dates = [[2009,  1,  1], [2009,  4,  2], [2009,  4, 16], [2009,  4, 30],
-             [2009,  7,  2], [2009, 10, 15], [2009, 10, 29], [2009, 11,  5]];
+var dates = [[2009, 1, 1], [2009, 4, 2], [2009, 4, 16], [2009, 4, 30],
+             [2009, 7, 2], [2009, 10, 15], [2009, 10, 29], [2009, 11, 5]];
 var timezones = ["America/St_Johns", "America/Caracas", "America/Phoenix", "America/Los_Angeles",
                  "America/Argentina/Buenos_Aires", "Europe/Paris", "Asia/Kathmandu", "Australia/Adelaide"];
 /* rows - dates
    columns - correct time for each event */
 var times = [[[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0]],
              [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [8, 0]],
              [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [9, 0]],
              [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [9, 0]],
--- a/calendar/test/mozmill/timezoneTests/test6.js
+++ b/calendar/test/mozmill/timezoneTests/test6.js
@@ -2,18 +2,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var calUtils = require("../shared-modules/calendar-utils");
 var timezoneUtils = require("../shared-modules/timezone-utils");
 
 var sleep = 500;
 var calendar = "Mozmill";
-var dates = [[2009,  1,  1], [2009,  4,  2], [2009,  4, 16], [2009,  4, 30],
-             [2009,  7,  2], [2009, 10, 15], [2009, 10, 29], [2009, 11,  5]];
+var dates = [[2009, 1, 1], [2009, 4, 2], [2009, 4, 16], [2009, 4, 30],
+             [2009, 7, 2], [2009, 10, 15], [2009, 10, 29], [2009, 11, 5]];
 var timezones = ["America/St_Johns", "America/Caracas", "America/Phoenix", "America/Los_Angeles",
                  "America/Argentina/Buenos_Aires", "Europe/Paris", "Asia/Kathmandu", "Australia/Adelaide"];
 /* rows - dates
    columns - correct time for each event */
 var times = [[[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0]],
              [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [8, 0]],
              [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [9, 0]],
              [[0, 0], [2, 0], [3, 0], [3, 0], [5, 0], [5, 0], [7, 0], [9, 0]],
--- a/calendar/test/mozmill/timezoneTests/test7.js
+++ b/calendar/test/mozmill/timezoneTests/test7.js
@@ -2,28 +2,28 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var calUtils = require("../shared-modules/calendar-utils");
 var timezoneUtils = require("../shared-modules/timezone-utils");
 
 var sleep = 500;
 var calendar = "Mozmill";
-var dates = [[2009,  1,  1], [2009,  4,  2], [2009,  4, 16], [2009,  4, 30],
-             [2009,  7,  2], [2009, 10, 15], [2009, 10, 29], [2009, 11,  5]];
+var dates = [[2009, 1, 1], [2009, 4, 2], [2009, 4, 16], [2009, 4, 30],
+             [2009, 7, 2], [2009, 10, 15], [2009, 10, 29], [2009, 11, 5]];
 var timezones = ["America/St_Johns", "America/Caracas", "America/Phoenix", "America/Los_Angeles",
                  "America/Argentina/Buenos_Aires", "Europe/Paris", "Asia/Kathmandu", "Australia/Adelaide"];
 /* rows - dates
    columns - correct time for each event */
 var times = [[[5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [11, 0], [12, 0]],
-             [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0],  [9, 0], [11, 0], [12, 0]],
-             [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0],  [9, 0], [11, 0], [13, 0]],
-             [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0],  [9, 0], [11, 0], [13, 0]],
-             [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0],  [9, 0], [11, 0], [13, 0]],
-             [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0],  [9, 0], [11, 0], [12, 0]],
+             [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0], [9, 0], [11, 0], [12, 0]],
+             [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0], [9, 0], [11, 0], [13, 0]],
+             [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0], [9, 0], [11, 0], [13, 0]],
+             [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0], [9, 0], [11, 0], [13, 0]],
+             [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0], [9, 0], [11, 0], [12, 0]],
              [[4, 0], [6, 0], [7, 0], [7, 0], [9, 0], [10, 0], [11, 0], [12, 0]],
              [[5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [11, 0], [12, 0]]]
 
 var setupModule = function(module) {
   controller = mozmill.getMail3PaneController();
 }
 
 var testTimezones7_checkBuenosAires = function () {
--- a/calendar/test/mozmill/timezoneTests/test8.js
+++ b/calendar/test/mozmill/timezoneTests/test8.js
@@ -2,18 +2,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var calUtils = require("../shared-modules/calendar-utils");
 var timezoneUtils = require("../shared-modules/timezone-utils");
 
 var sleep = 500;
 var calendar = "Mozmill";
-var dates = [[2009,  1,  1], [2009,  4,  2], [2009,  4, 16], [2009,  4, 30],
-             [2009,  7,  2], [2009, 10, 15], [2009, 10, 29], [2009, 11,  5]];
+var dates = [[2009, 1, 1], [2009, 4, 2], [2009, 4, 16], [2009, 4, 30],
+             [2009, 7, 2], [2009, 10, 15], [2009, 10, 29], [2009, 11, 5]];
 var timezones = ["America/St_Johns", "America/Caracas", "America/Phoenix", "America/Los_Angeles",
                  "America/Argentina/Buenos_Aires", "Europe/Paris", "Asia/Kathmandu", "Australia/Adelaide"];
 /* rows - dates
    columns - correct time for each event */
 var times = [[[9, 0], [10, 0], [11, 0], [12, 0], [13, 0], [14, 0], [15, 0], [16, 0]],
              [[9, 0], [11, 0], [12, 0], [12, 0], [14, 0], [14, 0], [16, 0], [17, 0]],
              [[9, 0], [11, 0], [12, 0], [12, 0], [14, 0], [14, 0], [16, 0], [18, 0]],
              [[9, 0], [11, 0], [12, 0], [12, 0], [14, 0], [14, 0], [16, 0], [18, 0]],
--- a/calendar/test/mozmill/timezoneTests/test9.js
+++ b/calendar/test/mozmill/timezoneTests/test9.js
@@ -2,18 +2,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var calUtils = require("../shared-modules/calendar-utils");
 var timezoneUtils = require("../shared-modules/timezone-utils");
 
 var sleep = 500;
 var calendar = "Mozmill";
-var dates = [[2009,  1,  1], [2009,  4,  2], [2009,  4, 16], [2009,  4, 30],
-             [2009,  7,  2], [2009, 10, 15], [2009, 10, 29], [2009, 11,  5]];
+var dates = [[2009, 1, 1], [2009, 4, 2], [2009, 4, 16], [2009, 4, 30],
+             [2009, 7, 2], [2009, 10, 15], [2009, 10, 29], [2009, 11, 5]];
 var timezones = ["America/St_Johns", "America/Caracas", "America/Phoenix", "America/Los_Angeles",
                  "America/Argentina/Buenos_Aires", "Europe/Paris", "Asia/Kathmandu", "Australia/Adelaide"];
 /* rows - dates
    columns - correct time for each event */
 var times = [[[13, 45], [14, 45], [15, 45], [16, 45], [17, 45], [18, 45], [19, 45], [20, 45]],
              [[12, 45], [14, 45], [15, 45], [15, 45], [17, 45], [17, 45], [19, 45], [20, 45]],
              [[12, 45], [14, 45], [15, 45], [15, 45], [17, 45], [17, 45], [19, 45], [21, 45]],
              [[12, 45], [14, 45], [15, 45], [15, 45], [17, 45], [17, 45], [19, 45], [21, 45]],
--- a/calendar/test/unit/test_attendee.js
+++ b/calendar/test/unit/test_attendee.js
@@ -258,17 +258,17 @@ function test_doubleParameters() {
         }
     };
     let expectedAttendee = {
         attendee1: {
             param:  ["CN", "RSVP", "ROLE", "PARTSTAT", "CUTYPE", "X-RECEIVED-DTSTAMP"],
             values: ["CN_attendee1", "TRUE", "REQ-PARTICIPANT", "NEEDS-ACTION", "INDIVIDUAL", "20130827T124944Z"]
         },
         attendee2: {
-            param:  ["CN", "ROLE",  "PARTSTAT", "CUTYPE"],
+            param:  ["CN", "ROLE", "PARTSTAT", "CUTYPE"],
             values: ["CN_attendee2", "CHAIR", "ACCEPTED", "INDIVIDUAL"]
         },
         attendee3: {
             param:  ["CN", "RSVP", "ROLE", "PARTSTAT", "CUTYPE"],
             values: ["CN_attendee3", "TRUE", "REQ-PARTICIPANT", "NEEDS-ACTION", "RESOURCE"]
         },
         attendee4: {
             param:  ["CN", "PARTSTAT", "X-RECEIVED-DTSTAMP", "X-RECEIVED-SEQUENCE"],
--- a/calendar/test/unit/test_bug1204255.js
+++ b/calendar/test/unit/test_bug1204255.js
@@ -110,16 +110,16 @@ function test_fromICS() {
     let attendees = event.getAttendees({});
 
     // check whether all attendees get returned as expected
     equal(attendees.length, expected.length);
     let count = 0;
     for (let attendee of attendees) {
         for (let exp of expected) {
             if (attendee.id == exp.id) {
-                equal(attendee.participationStatus,  exp.partstat, "partstat matches for " + exp.id);
+                equal(attendee.participationStatus, exp.partstat, "partstat matches for " + exp.id);
                 equal(attendee.commonName, exp.cn, "cn matches for " + exp.id);
                 count++;
             }
         }
     }
     equal(count, expected.length, "all attendees were processed");
 }
--- a/calendar/test/unit/test_bug343792.js
+++ b/calendar/test/unit/test_bug343792.js
@@ -49,17 +49,17 @@ function really_run_test() {
         "PRIORITY:4\n" +
         "CLASS:PUBLIC\n" +
         "DESCRIPTION:Daily standup Mtg and/or status update on FW\n" +
         "END:VEVENT\n" +
         "END:VCALENDAR";
 
     let event = createEventFromIcalString(icalString);
     let start = createDate(2009, 4, 1);
-    let end   = createDate(2009, 4, 30);
+    let end = createDate(2009, 4, 30);
 
     // the following call caused a never ending loop:
     let occurrenceDates = event.recurrenceInfo.getOccurrenceDates(start, end, 0, {});
     equal(occurrenceDates.length, 4);
 
     // the following call caused a never ending loop:
     let occurrences = event.recurrenceInfo.getOccurrences(start, end, 0, {});
     equal(occurrences.length, 4);
--- a/calendar/test/unit/test_bug356207.js
+++ b/calendar/test/unit/test_bug356207.js
@@ -29,18 +29,18 @@ function really_run_test() {
         "SUMMARY:Friendship Circle\n" +
         "PRIORITY:1\n" +
         "DTEND:20040901T141500\n" +
         "RRULE:FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1;BYDAY=WE\n" +
         "END:VEVENT\n" +
         "END:VCALENDAR";
 
     let event = createEventFromIcalString(icalString);
-    let start = createDate(2009,  0,  1);
-    let end   = createDate(2009, 11, 31);
+    let start = createDate(2009, 0, 1);
+    let end = createDate(2009, 11, 31);
 
     // the following call caused a never ending loop:
     let occurrenceDates = event.recurrenceInfo.getOccurrenceDates(start, end, 0, {});
     equal(occurrenceDates.length, 2);
 
     // the following call caused a never ending loop:
     let occurrences = event.recurrenceInfo.getOccurrences(start, end, 0, {});
     equal(occurrences.length, 2);
--- a/calendar/test/unit/test_deleted_items.js
+++ b/calendar/test/unit/test_deleted_items.js
@@ -46,17 +46,17 @@ add_task(function* test_deleted_items() 
 
     // Add the item, it still shouldn't be in the deleted database.
     yield check_delmgr_call(() => memory.addItem(item, null));
     equal(delmgr.getDeletedDate(item.id), null);
     equal(delmgr.getDeletedDate(item.id, memory.id), null);
 
     // We need to stop time so we have something to compare with.
     let referenceDate = cal.createDateTime("20120726T112045"); referenceDate.timezone = cal.calendarDefaultTimezone();
-    let futureDate = cal.createDateTime("20380101T000000");  futureDate.timezone = cal.calendarDefaultTimezone();
+    let futureDate = cal.createDateTime("20380101T000000"); futureDate.timezone = cal.calendarDefaultTimezone();
     let useFutureDate = false;
     let oldNowFunction = cal.now;
     cal.now = function test_specific_now() {
         return (useFutureDate ? futureDate : referenceDate).clone();
     }
 
     // Deleting an item should trigger it being marked for deletion.
     yield check_delmgr_call(() => memory.deleteItem(item, null));
--- a/calendar/test/unit/test_gdata_provider.js
+++ b/calendar/test/unit/test_gdata_provider.js
@@ -161,17 +161,17 @@ GDataServer.prototype = {
             "primary": true,
             "selected": true,
             "accessRole": "owner",
             "defaultReminders": [],
             "notificationSettings": {
                 "notifications": [
                     { "type": "eventCreation", "method": "email" },
                     { "type": "eventChange", "method": "email" },
-                    { "type": "eventCancellation",  "method": "email" }
+                    { "type": "eventCancellation", "method": "email" }
                 ]
             }
         };
     },
 
     waitForLoad: function(aCalendar) {
         return new Promise(function(resolve, reject) {
             let observer = cal.createAdapter(Components.interfaces.calIObserver, {
@@ -408,17 +408,17 @@ GDataServer.prototype = {
         }
         this.nextEtag = null;
         return jsonData;
     },
 
     processModifyEvent: function(jsonData, id) {
         jsonData.kind = "calendar#event";
         jsonData.etag = this.nextEtag || '"' + (new Date()).getTime() + '"';
-        jsonData.updated  = cal.toRFC3339(cal.now());
+        jsonData.updated = cal.toRFC3339(cal.now());
         jsonData.id = id;
         jsonData.iCalUID = (jsonData.recurringEventId || jsonData.id) + "@google.com";
         if (!jsonData.creator) {
             jsonData.creator = this.creator;
         }
         if (!jsonData.organizer) {
             jsonData.organizer = this.creator;
         }
@@ -441,17 +441,17 @@ GDataServer.prototype = {
 
         this.nextEtag = null;
         return jsonData;
     },
 
     processModifyTask: function(jsonData) {
         jsonData.kind = "tasks#task";
         jsonData.etag = this.nextEtag || '"' + (new Date()).getTime() + '"';
-        jsonData.updated  = cal.toRFC3339(cal.now());
+        jsonData.updated = cal.toRFC3339(cal.now());
         if (!jsonData.status) {
             jsonData.status = "needsAction";
         }
         if (!jsonData.updated) {
             jsonData.updated = cal.toRFC3339(cal.now());
         }
 
         this.nextEtag = null;
--- a/calendar/test/unit/test_providers.js
+++ b/calendar/test/unit/test_providers.js
@@ -382,27 +382,27 @@ function testMetaData() {
         aCalendar.setMetaData("item2", "meta2");
         equal(aCalendar.getMetaData("item2"), "meta2");
 
         var count = {};
         var ids = {};
         var values = {};
         aCalendar.getAllMetaData(count, ids, values);
         equal(count.value, 2);
-        ok(ids.value[0] ==  "item1" || ids.value[1] == "item1");
-        ok(ids.value[0] ==  "item2" || ids.value[1] == "item2");
-        ok(values.value[0] ==  "meta1" || values.value[1] == "meta1");
-        ok(values.value[0] ==  "meta2" || values.value[1] == "meta2");
+        ok(ids.value[0] == "item1" || ids.value[1] == "item1");
+        ok(ids.value[0] == "item2" || ids.value[1] == "item2");
+        ok(values.value[0] == "meta1" || values.value[1] == "meta1");
+        ok(values.value[0] == "meta2" || values.value[1] == "meta2");
 
         aCalendar.deleteItem(event1, null);
         equal(aCalendar.getMetaData("item1"), null);
         aCalendar.getAllMetaData(count, ids, values);
         equal(count.value, 1);
-        ok(ids.value[0] ==  "item2");
-        ok(values.value[0] ==  "meta2");
+        ok(ids.value[0] == "item2");
+        ok(values.value[0] == "meta2");
 
         aCalendar.deleteMetaData("item2");
         equal(aCalendar.getMetaData("item2"), null);
         aCalendar.getAllMetaData(count, ids, values);
         equal(count.value, 0);
 
         aCalendar.setMetaData("item2", "meta2");
         equal(aCalendar.getMetaData("item2"), "meta2");
--- a/calendar/test/unit/test_webcal.js
+++ b/calendar/test/unit/test_webcal.js
@@ -15,17 +15,17 @@ function run_test() {
         }
     });
     httpserv.start(-1);
 
     let baseUri = "://localhost:" + httpserv.identity.primaryPort + "/test_webcal";
     add_test(check_webcal_uri.bind(null, "webcal" + baseUri));
     // TODO webcals needs bug 466524 to be fixed
     // add_test(check_webcal_uri.bind(null, "webcals" + baseUri));
-    add_test(() =>  httpserv.stop(run_next_test));
+    add_test(() => httpserv.stop(run_next_test));
 
     // Now lets go...
     run_next_test();
 }
 
 function check_webcal_uri(aUri) {
     let uri = Services.io.newURI(aUri, null, null);