Skip to content

Commit

Permalink
config/cal.widget: correct month convention in DOW calc
Browse files Browse the repository at this point in the history
  • Loading branch information
LBCrion committed Feb 21, 2025
1 parent 1ff417a commit 84d2ed9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/cal.widget
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Function XCalFDOW ( month, year ) {
Var moff_table, moff, is_leap;

moff_table = [0,3,3,6,1,4,6,2,5,0,3,5];
moff = moff_table[month-1];
if (month>2 & XCalIsLeapYear(year)) {
moff = moff_table[month];
if (month>=2 & XCalIsLeapYear(year)) {
moff = (moff + 1)%7;}

return (moff+5*((year-1)%4)+4*((year-1)%100)+6*((year-1)%400))%7;
Expand Down

0 comments on commit 84d2ed9

Please sign in to comment.