Skip to content

Remove useless check - #477

Closed
pascalr0410 wants to merge 1 commit into
JuliaData:masterfrom
pascalr0410:master
Closed

pascalr0410 wants to merge 1 commit into
JuliaData:masterfrom
pascalr0410:master

Conversation

@pascalr0410

Copy link
Copy Markdown
Contributor

Hello,

This merge request aims to remove an unnecessary check for negative dates. In reality, Julia accepts negative dates, and while this may seem inconsistent, there's no reason why it should cause a crash when they're found in a file.

Regards,

Pascal

@codecov-commenter

codecov-commenter commented Oct 19, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.82%. Comparing base (b8f8a74) to head (e909f1e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #477      +/-   ##
==========================================
+ Coverage   97.81%   97.82%   +0.01%     
==========================================
  Files          34       34              
  Lines       12368    12485     +117     
==========================================
+ Hits        12098    12214     +116     
- Misses        270      271       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TimG1964

TimG1964 commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Hi Pascal,

Thanks for this. I agree: a negative number in a date-formatted cell is valid in a file and shouldn't stop the whole sheet from loading.

However, simply removing the check on its own as you propose causes two problems:

  • A negative decimal still throws. Values below 1.0 are treated as times, so a value like -3.25 would load and then throw when the cell is read ("A value must be in [0, 1) to be converted to time").
  • A negative whole number becomes a date Excel never shows. -1 would be read as 1899-12-29, but Excel displays #### for that cell.

I've already made a fix for this in my fork. A negative value in a date-formatted cell is now read as the plain number it holds, a Float64 or an Int. I'll open a PR from my fork to this repo soon, and it will include this fix. I suggest we close this PR in favour of that one.

Thanks again for reporting it!

Tim

@TimG1964

TimG1964 commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

My fix is now on Master.

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.

3 participants