4 ms·
Looking at all the special casing in your code, just for dates, I can imagine the sweat and tears that have gone into producing this. For anyone else looking f
by davidbanham 13y ago
Looking at all the special casing in your code, just for dates, I can imagine the sweat and tears that have gone into producing this.
For anyone else looking for the code as I was, it's here:
https://github.com/SheetJS https://github.com/SheetJS
https://github.com/SheetJS/js-xlsx https://github.com/SheetJS/js-xlsx
https://github.com/SheetJS/js-xls https://github.com/SheetJS/js-xls
- sheetjs 13y agoThe date processing is one of the worst-documented features, and there are conflicts in the documentation between MS-XLS (XLS files), ECMA-376 (the office open xml standard), and MS-XLSX (describing how excel deviated from ECMA-376 -- yes, this exists and is pretty substantial). To give an example, in some versions of excel `e` refers to the "era", which is the year for US versions. However, the documentation and individual implementations disagree as to what they actually mean: Some versions treat "e" as the 4-digit year and "ee" as the 2 digit year. Other versions treat "e" and "ee" as the 4-digit year. Others treat "e" and "ee" as the 2-digit year But the worst offender is format code 14, which actually depends on the client calendar type, so you get different results in different versions of excel