Skip to content

Fix toString for Date/DateTime - #362

Merged
cmoesel merged 2 commits into
masterfrom
fix-dt-tostring
May 11, 2026
Merged

Fix toString for Date/DateTime#362
cmoesel merged 2 commits into
masterfrom
fix-dt-tostring

Conversation

@cmoesel

@cmoesel cmoesel commented May 8, 2026

Copy link
Copy Markdown
Member

The minimum Date was incorrectly toStringing to 1-01-01 instead of 0001-01-01. This fixes the string formatting for this use case and applies more consistent padding to date-based toString operations across the board.

Pull requests into cql-execution require the following.
Submitter and reviewer should ✔ when done.
For items that are not-applicable, mark "N/A" and ✔.

Submitter:

  • This pull request describes why these changes were made
  • Code diff has been done and been reviewed (it does not contain: additional white space, not applicable code changes, debug statements, etc.)
  • Tests are included and test edge cases
  • Tests have been run locally and pass
  • Code coverage has not gone down and all code touched or added is covered.
  • Code passes lint and prettier (hint: use npm run test:plus to run tests, lint, and prettier)
  • All dependent libraries are appropriately updated or have a corresponding PR related to this change
  • cql4browsers.js built with npm run build:browserify if source changed.

Reviewer:

Name: Elsa Perelli

  • Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
  • The tests appropriately test the new code, including edge cases
  • You have tried to break the code

Min date was incorrectly toStringing to `1-01-01` instead of `0001-01-01`. Fix and apply consistent padding to date-based toString operations.
@codecov-commenter

codecov-commenter commented May 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.58%. Comparing base (041ed96) to head (c9b0f52).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #362      +/-   ##
==========================================
- Coverage   87.58%   87.58%   -0.01%     
==========================================
  Files          52       52              
  Lines        4607     4606       -1     
  Branches     1297     1297              
==========================================
- Hits         4035     4034       -1     
  Misses        359      359              
  Partials      213      213              

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@elsaperelli
elsaperelli self-requested a review May 11, 2026 14:24
@elsaperelli elsaperelli self-assigned this May 11, 2026

@elsaperelli elsaperelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@cmoesel
cmoesel merged commit d1b1b14 into master May 11, 2026
10 of 12 checks passed
@cmoesel
cmoesel deleted the fix-dt-tostring branch May 11, 2026 18:38
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