]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix calculation of the recurring weekdays
authorgonzo <gonzo@FreeBSD.org>
Fri, 3 Apr 2020 01:17:43 +0000 (01:17 +0000)
committergonzo <gonzo@FreeBSD.org>
Fri, 3 Apr 2020 01:17:43 +0000 (01:17 +0000)
commita5bee545b3db7a74fb8b0dd69332e5bd62b365cd
tree108a07b2caca78c60376458c2231f5a2f264a3cd
parent471c4e6b0bc9133d66b6b29d7856a34e229ac736
Fix calculation of the recurring weekdays

Both the result of the first_dayofweek_of_year and the target
weekday are zero-based (0 fo sunday) while the target month-day
or year-day is 1-based. Adjust logic accordingly.

Also add testcase for this PR to the kyua test suite

PR: 201062
Submitted by: Richard Narron <comet.berkeley@gmail.com>
MFC after: 1 week
usr.bin/calendar/parsedata.c
usr.bin/calendar/tests/calendar.calibrate
usr.bin/calendar/tests/regress.s5.out [new file with mode: 0644]
usr.bin/calendar/tests/regress.sh