Bug 333372 Week number for multiweek view is off when Sunday is not the start of the week. patch by mschroeder@mozilla.x-home.org, r=jminta

This commit is contained in:
jminta%gmail.com 2006-05-17 17:59:25 +00:00
Родитель 951d5dab6d
Коммит a3cd02ed88
1 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -188,16 +188,17 @@
// of previous weeks we're supposed to display.
var d1 = aDate.startOfWeek.clone();
d1.day -= 7*calBranch.getIntPref("previousweeks.inview");
// The variable firstWeekDate is a definitely showed date
// in the first week of the view (needed for setNavLabels).
var firstWeekDate = d1.clone();
firstWeekDate.normalize();
if (aDate.weekday < viewElement.weekStartOffset) {
d1.day -= 7;
}
d1.normalize();
// The variable firstWeekDate is a definitely showed date
// in the first week of the view (needed for setNavLabels).
var firstWeekDate = aDate.clone();
firstWeekDate.day -= 7*calBranch.getIntPref("previousweeks.inview");
firstWeekDate.normalize();
// The last day we're supposed to show
var d2 = d1.endOfWeek.clone();
d2.day += 7*(this.mWeeksInView-1);