Skip to content

Commit cd5a69b

Browse files
committed
edit comment a little
1 parent e0d4807 commit cd5a69b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Date.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,10 @@ struct tzhead {
13151315
if (increment_overflow(&y, 1))
13161316
return NULL;
13171317
}
1318-
tmp->tm_year = y + TM_YEAR_BASE; // FIXME: Unclear why we need to add this here
1318+
// Previously we returned 'year + base', so keep behaviour
1319+
// It seems like R now returns just 'year - 1900' (as libc does)
1320+
// But better for continuity to do as before
1321+
tmp->tm_year = y + TM_YEAR_BASE;
13191322
if (increment_overflow(&tmp->tm_year, -TM_YEAR_BASE))
13201323
return NULL;
13211324
tmp->tm_yday = idays;

0 commit comments

Comments
 (0)