Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
js-excel-date-convert
Advanced tools
This script takes into consideration the Leap-Year bug and the date difference between 1900 and 1904 Excel Date Systems.
// You can verify these results with the example at:
// https://docs.microsoft.com/en-us/office/troubleshoot/excel/1900-and-1904-date-system
const toExcelDate = require('js-excel-date-convert').toExcelDate;
const fromExcelDate = require('js-excel-date-convert').fromExcelDate;
const jul = new Date('jul 5 1998');
toExcelDate(jul); // 35981 (1900 date system)
toExcelDate(jul, true); // 34519 (1904 date system)
fromExcelDate(35981); // "Sun, 05 Jul 1998 00:00:00 GMT"
fromExcelDate(34519, true); // "Sun, 05 Jul 1998 00:00:00 GMT"
Date
Param | Type | Required | Description |
---|---|---|---|
excelDate | number | yes | An integer number representing a date in Excel. |
date1904 | boolean | no | Set this to true if the date is encoded in 1904 Date System. This is the default format for Excel in MacOS.If you're using SheetJS you can check which system the file is using by calling wb.Workbook.WBProps.date1904 |
number
Param | Type | Required | Description |
---|---|---|---|
date | Date | yes | Date to encode into Excel format. |
date1904 | boolean | no | If true , the date will be encoded to 1904 Date System. This is the default format for Excel in MacOS.If you're using SheetJS you can check which system the file is using by calling wb.Workbook.WBProps.date1904 |
Raschid JF. Rafaelly
FAQs
Convert dates between JS and Excel formats
We found that js-excel-date-convert demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.