We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86b07de commit 2e4b720Copy full SHA for 2e4b720
fastexcel-reader/src/main/java/org/dhatim/fastexcel/reader/Cell.java
@@ -99,6 +99,11 @@ public LocalDateTime asDate() {
99
private LocalDateTime convertToDate(double value) {
100
int wholeDays = (int) Math.floor(value);
101
long millisecondsInDay = (long) (((value - wholeDays) * DAY_MILLISECONDS) + 0.5D);
102
+ // sometimes the rounding for .9999999 returns the whole number of ms a day
103
+ if(millisecondsInDay == DAY_MILLISECONDS) {
104
+ wholeDays +=1;
105
+ millisecondsInDay= 0;
106
+ }
107
108
int startYear = 1900;
109
int dayAdjust = -1; // Excel thinks 2/29/1900 is a valid date, which it isn't
0 commit comments