]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix calculation of the recurring weekdays
authorOleksandr Tymoshenko <gonzo@FreeBSD.org>
Fri, 3 Apr 2020 01:17:43 +0000 (01:17 +0000)
committerOleksandr Tymoshenko <gonzo@FreeBSD.org>
Fri, 3 Apr 2020 01:17:43 +0000 (01:17 +0000)
commitc01c8cccf5658825382bcf3e3e54834c0fc17062
tree108a07b2caca78c60376458c2231f5a2f264a3cd
parent2b99119f6dba40f23fc41c95e2425b8a0c06b988
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