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:59:11 +0100
changeset 27706 1754852ed9e5c3e160c5e46ba95ca48e8b562c19
parent 27703 40e571d396c9f81fdbc293e0485fd21476122436
child 27707 d65b546eb30809d21b828999f170a3a0b608b275
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [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();