Bug 1328551 - Week Counts in Thunderbird Calendar: Missing week 37 and duplicated week 38 in 2017. r=aryx
authorDecathlon <bv1578@gmail.com>
Fri, 06 Jan 2017 16:42:11 +0100
changeset 20971 c4d7763403e9b7996f0d467526a360aa2ca3b683
parent 20970 f59d2d762b09b1f82370db5e35700da4e3c7f548
child 20972 2231f130a183eae79746df4da367062d0ad04a9d
push id12719
push userbv1578@gmail.com
push dateFri, 06 Jan 2017 15:45:47 +0000
treeherdercomm-central@c4d7763403e9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaryx
bugs1328551
Bug 1328551 - Week Counts in Thunderbird Calendar: Missing week 37 and duplicated week 38 in 2017. r=aryx
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();