summaryrefslogtreecommitdiff
path: root/ext/date/lib/dow.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/lib/dow.c')
-rw-r--r--ext/date/lib/dow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/date/lib/dow.c b/ext/date/lib/dow.c
index e04b018185..4b51cf5daf 100644
--- a/ext/date/lib/dow.c
+++ b/ext/date/lib/dow.c
@@ -91,7 +91,7 @@ void timelib_isoweek_from_date(timelib_sll y, timelib_sll m, timelib_sll d, time
int i;
i = y_leap ? 366 : 365;
- if ((i - doy) < (4 - weekday)) {
+ if ((i - (doy - y_leap)) < (4 - weekday)) {
*iy = y + 1;
*iw = 1;
return;