This commit is contained in:
abluchet
2014-07-18 17:19:37 +02:00
parent 1c8d6c6db5
commit 5a5a5a894f
+1 -1
View File
@@ -526,7 +526,7 @@ module.exports = (function() {
if(value instanceof Date) {
//In Excel date is a number of days since 01/01/1900
// timestamp in ms to days + number of days from 1900 to 1970
return Number(value.getTime()/(1000*60*60*24))+25569 + 1); //+ 1 day because:
return Number( (value.getTime()/(1000*60*60*24)) + 25569 + 1); //+ 1 day because:
// Excel incorrectly regards 1900 as a leap year and allows February 29 to be entered as a date in this year.
// This is for compatibility with Lotus 1-2-3 which also had this bug
} else if(typeof(value) === "number" || typeof(value) === "boolean") {