Skip to content

This closes #2512, number format keeps milliseconds for date and time values - #2519

Open
ruziba3vich wants to merge 1 commit into
qax-os:masterfrom
ruziba3vich:numfmt-millisecond-date
Open

ruziba3vich wants to merge 1 commit into
qax-os:masterfrom
ruziba3vich:numfmt-millisecond-date

Conversation

@ruziba3vich

Copy link
Copy Markdown
Contributor

PR Details

Description

This change updates dateTimeHandler to preserve the fractional part of the day and round it to the nearest millisecond when formatting date-and-time values.

Related Issue

Closes #2512

Motivation and Context

See #2512.

How Has This Been Tested

This fixes cases where milliseconds were lost due to rounding to whole seconds, such as 44197.5000058 with hh:mm:ss.000 producing 12:00:01.000 instead of 12:00:00.501, and adds a regression test to TestNumFmt.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.72%. Comparing base (1615ceb) to head (1474db7).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2519   +/-   ##
=======================================
  Coverage   99.72%   99.72%           
=======================================
  Files          32       32           
  Lines       33212    33234   +22     
=======================================
+ Hits        33122    33144   +22     
  Misses         88       88           
  Partials        2        2           
Flag Coverage Δ
unittests 99.72% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@xuri xuri added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 21, 2026
@ruziba3vich
ruziba3vich force-pushed the numfmt-millisecond-date branch from 6b9fca7 to 1474db7 Compare November 23, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Number format with milliseconds always shows .000 for date and time values

2 participants