mirror of
https://github.com/opnsense/src.git
synced 2026-06-14 19:20:18 -04:00
Don't go past the end of the month with a repetitive entry of the
style "every Monday": mon * Do Foo. Previously, at the end of the month, this could cause a printout of the following nature when invoked with -A 7: 36 May* Do Foo MFC after: 2 weeks
This commit is contained in:
parent
26e3bd3e37
commit
29ef275b38
1 changed files with 3 additions and 0 deletions
|
|
@ -376,6 +376,9 @@ isnow(endp, monthp, dayp, varp)
|
|||
#ifdef DEBUG
|
||||
fprintf(stderr, "day2: day %d(%d-%d) yday %d\n", *dayp, day, cumdays[month], tp->tm_yday);
|
||||
#endif
|
||||
if (day > cumdays [month + 1]) /* off end of month */
|
||||
return (0);
|
||||
|
||||
/* if today or today + offset days */
|
||||
if (day >= tp->tm_yday - f_dayBefore &&
|
||||
day <= tp->tm_yday + offset + f_dayAfter)
|
||||
|
|
|
|||
Loading…
Reference in a new issue