mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-12-06 18:06:00 +00:00
stringrule bug fix
SCCS-file: zic.c SCCS-SID: 8.23
This commit is contained in:
committed by
Paul Eggert
parent
05a07b9aaf
commit
8f229febb7
8
zic.c
8
zic.c
@ -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",
|
||||
|
||||
Reference in New Issue
Block a user