Skip to content

Commit

Permalink
Cleaner version of @fmsf's fix for weekStart losing the first week.
Browse files Browse the repository at this point in the history
  • Loading branch information
Twipped committed Mar 10, 2012
1 parent e89a379 commit 9548005
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,9 @@ Kalendae.prototype = {

do {
day = moment(month).date(1).day(this.settings.weekStart);
if(day.date()>1 && day.date() < 7){
day = moment(month).date(1).day(this.settings.weekStart-7);
}
if (day.date()<8) { // if weekStart has shifted us into the second row, shift back.
day.subtract('days',7);
}
cal = this.calendars[i];
cal.caption.innerHTML = month.format(this.settings.titleFormat);
j = 0;
Expand Down

0 comments on commit 9548005

Please sign in to comment.