Fixes #2942.
This commit is contained in:
parent
d3a480750b
commit
f953294210
6
xlsx.js
generated
6
xlsx.js
generated
@ -3269,10 +3269,12 @@ function evert_arr(obj) {
|
||||
return o;
|
||||
}
|
||||
|
||||
var basedate = new Date(1899, 11, 30, 0, 0, 0); // 2209161600000
|
||||
var basedate = new Date(1899, 11, 31, 0, 0, 0); // 2209075200000
|
||||
var base1904 = new Date(1900, 2, 1, 0, 0, 0);
|
||||
function datenum(v, date1904) {
|
||||
var epoch = v.getTime();
|
||||
if(date1904) epoch -= 1462*24*60*60*1000;
|
||||
if(date1904) epoch -= 1461*24*60*60*1000;
|
||||
else if(v >= base1904) epoch += 24*60*60*1000;
|
||||
var dnthresh = basedate.getTime() + (v.getTimezoneOffset() - basedate.getTimezoneOffset()) * 60000;
|
||||
return (epoch - dnthresh) / (24 * 60 * 60 * 1000);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user