Fix problem with multi month display spanning a year.
This commit is contained in:
parent
d30ac8d64b
commit
fea48eb229
2
cal.c
2
cal.c
|
@ -59,7 +59,7 @@ drawcal(int year, int month, int day, int ncols, int nmons, int fday)
|
||||||
yoff = year + moff / 12;
|
yoff = year + moff / 12;
|
||||||
|
|
||||||
ndays = mdays[cur] + ((cur == 1) && isleap(yoff));
|
ndays = mdays[cur] + ((cur == 1) && isleap(yoff));
|
||||||
day1 = dayofweek(year, cur, 1, fday);
|
day1 = dayofweek(yoff, cur, 1, fday);
|
||||||
|
|
||||||
for (d = 0; d < 7; d++) {
|
for (d = 0; d < 7; d++) {
|
||||||
if ((r || d >= day1) && count[i] <= ndays)
|
if ((r || d >= day1) && count[i] <= ndays)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user