Skip to content

Commit

Permalink
Fix Excel false leapyear cutoff date. (#60)
Browse files Browse the repository at this point in the history
Fix leapday cutoff date from previous commit.

Issue #58
Previous PR #59
  • Loading branch information
jmcnamara authored Jun 29, 2021
1 parent f1ba9c6 commit e5985b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/write_xlsx.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ SEXP C_write_data_frame_list(SEXP df_list, SEXP file, SEXP col_names, SEXP forma
double val = REAL(col)[i];
if(R_FINITE(val))
val = 25568.0 + val / (24*60*60);
if(val > 59.0)
if(val >= 60.0)
val = val + 1.0;
assert_lxw(worksheet_write_number(sheet, cursor, j, val , NULL));
}; continue;
Expand Down

0 comments on commit e5985b6

Please sign in to comment.