Skip to content

fix: read 1904 date system XLSX dates correctly in the web engine - #1092

Merged
yakew7 merged 1 commit into
yakew7:mainfrom
minutechreview:fix/xlsx-1904-dates-1076
Oct 20, 2026
Merged

yakew7 merged 1 commit into
yakew7:mainfrom
minutechreview:fix/xlsx-1904-dates-1076

Conversation

@minutechreview

Copy link
Copy Markdown
Contributor

Summary

A workbook saved with the 1904 date system now gets the same date labels in the web engine as in pandas, instead of dates four years and a day early.

Type

  • Audit
  • Explainer
  • Bug fix
  • Other

Details

  • parseXLSX reads workbook.Workbook.WBProps.date1904 after XLSX.read and passes it through stringifyXlsxDateCells to formatXlsxDateCell, which calls XLSX.SSF.parse_date_code(serial, { date1904 }).
  • test_xlsx_date_cells_get_the_same_labels_in_both_engines is now parametrized over both date systems (with the existing three time zones), using openpyxl's CALENDAR_MAC_1904 epoch for the 1904 workbook.

Checks: tests/test_xlsx_edge_cases.py 14 passed; the three new 1904 cases fail without the JS change. ruff check, check_em_dash.py and check_generated_files_current.py pass. The full suite (without tests/browser) has the same 10 failures before and after this change, all in test_cli.py and two JS parity tests, which look like a local environment issue rather than this change.

Linked issue

Fixes #1076

Signed-off-by: minutechreview <141821420+minutechreview@users.noreply.github.com>
@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

@minutechreview is attempting to deploy a commit to the yashkewlani2020-gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

@yakew7 @ahmdkaml - new PR touching a path you own, please review.

@yakew7
yakew7 merged commit c87a8a6 into yakew7:main Oct 20, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

XLSX workbooks that use the 1904 date system get dates four years and a day early in the web engine

2 participants