Bug 1328551 - Week Counts in Thunderbird Calendar: Missing week 37 and duplicated week 38 in 2017. r=aryx a=philipp
authorDecathlon <bv1578@gmail.com>
Fri, 06 Jan 2017 16:52:33 +0100
changeset 26903 45484df83e183fea9971eb911f18619467ae181e
parent 26902 567ce3fd3edbc8fb1b887981a7e8221d271a7d18
child 26904 0afece51de5b1726c7544144699b143826c26754
push id1834
push userclokep@gmail.com
push dateMon, 23 Jan 2017 21:48:40 +0000
treeherdercomm-beta@293cffe83e59 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaryx, philipp
bugs1328551
Bug 1328551 - Week Counts in Thunderbird Calendar: Missing week 37 and duplicated week 38 in 2017. r=aryx a=philipp
calendar/base/content/widgets/minimonth.xml
--- a/calendar/base/content/widgets/minimonth.xml
+++ b/calendar/base/content/widgets/minimonth.xml
@@ -848,24 +848,26 @@
           // Update the calendar
           let calbox = document.getAnonymousElementByAttribute(this, "anonid", "minimonth-calendar");
           let date = this._getStartDate(aDate);
 
           // get today's date
           let today = new Date();
 
           this.mDayMap = {};
+          let defaultTz = cal.calendarDefaultTimezone();
           for (let k = 1; k < calbox.childNodes.length; k++) {
               let row = calbox.childNodes[k];
 
               // Set the week number.
               let firstElement = row.childNodes[0];
               setBooleanAttribute(firstElement, "hidden", !this.mShowWeekNumber);
               if (this.mShowWeekNumber) {
-                  let weekNumber = cal.getWeekInfoService().getWeekTitle(cal.jsDateToDateTime(date));
+                  let weekNumber = cal.getWeekInfoService()
+                                      .getWeekTitle(cal.jsDateToDateTime(date, defaultTz));
                   firstElement.setAttribute("value", weekNumber);
               }
 
               for (let i = 1; i < 8; i++) {
                   let day = row.childNodes[i];
                   let ymd = date.getFullYear() + "-" +
                             date.getMonth() + "-" +
                             date.getDate();