UNPKG

read-excel-file

Version:

Read `.xlsx` files in a web browser or in Node.js

19 lines (18 loc) 897 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = parseExcelDate; var _parseExcelTimestamp = _interopRequireDefault(require("./parseExcelTimestamp.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } // Parses an Excel Date (represented by a "serial" floating-point number) // into a javascript `Date` in UTC+0 timezone (with time is set to 00:00). // // https://www.pcworld.com/article/3063622/software/mastering-excel-date-time-serial-numbers-networkdays-datevalue-and-more.html // "If you need to calculate dates in your spreadsheets, // Excel uses its own unique system, which it calls Serial Numbers". // function parseExcelDate(excelSerialDate, epoch1904) { return new Date((0, _parseExcelTimestamp["default"])(excelSerialDate, epoch1904)); } //# sourceMappingURL=parseExcelDate.js.map