diff options
author | sebres <sebres@users.sourceforge.net> | 2024-07-16 21:14:40 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2024-07-16 21:14:40 (GMT) |
commit | ffe4640cc14ada5fd731927896d2ed56571b2866 (patch) | |
tree | 8d57d78046e2f473a3c34b557f828a5ee443b5ba /generic/tclClock.c | |
parent | 71a57bb6946d8f92078c1b230c1890a5dc64afdc (diff) | |
download | tcl-ffe4640cc14ada5fd731927896d2ed56571b2866.zip tcl-ffe4640cc14ada5fd731927896d2ed56571b2866.tar.gz tcl-ffe4640cc14ada5fd731927896d2ed56571b2866.tar.bz2 |
clock: better fix for validation check for scanned day of week in input (normalized input value after scan, Sun is always 7 now);
more tests for valid days of weeks covering also format scan with different weekday formats (%a, %u, %w)
Diffstat (limited to 'generic/tclClock.c')
-rw-r--r-- | generic/tclClock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c index adf9774..20da59f 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -3937,7 +3937,7 @@ ClockValidDate( tempCpyFlg = 1; } GetYearWeekDay(&temp, GREGORIAN_CHANGE_DATE); - if ((temp.dayOfWeek % 7) != (yyDayOfWeek % 7)) { + if (temp.dayOfWeek != yyDayOfWeek) { errMsg = "invalid day of week"; errCode = "day of week"; goto error; |