1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2025-12-06 15:02:16 +00:00

stringrule bug fix

SCCS-file: zic.c
SCCS-SID: 8.23
This commit is contained in:
Arthur David Olson
2010-09-29 08:44:51 -04:00
committed by Paul Eggert
parent 05a07b9aaf
commit 8f229febb7

8
zic.c
View File

@ -1881,16 +1881,16 @@ const long gmtoff;
register int week;
if (rp->r_dycode == DC_DOWGEQ) {
week = 1 + rp->r_dayofmonth / DAYSPERWEEK;
if ((week - 1) * DAYSPERWEEK + 1 != rp->r_dayofmonth)
if ((rp->r_dayofmonth % DAYSPERWEEK) != 1)
return -1;
week = 1 + rp->r_dayofmonth / DAYSPERWEEK;
} else if (rp->r_dycode == DC_DOWLEQ) {
if (rp->r_dayofmonth == len_months[1][rp->r_month])
week = 5;
else {
week = 1 + rp->r_dayofmonth / DAYSPERWEEK;
if (week * DAYSPERWEEK - 1 != rp->r_dayofmonth)
if ((rp->r_dayofmonth % DAYSPERWEEK) != 0)
return -1;
week = rp->r_dayofmonth / DAYSPERWEEK;
}
} else return -1; /* "cannot happen" */
(void) sprintf(result, "M%d.%d.%d",