Skip to content

<chrono>: Updates two-digit year I/O for negative years per LWG-3831#6227

Merged
StephanTLavavej merged 2 commits intomicrosoft:mainfrom
MattStephanson:lwg-3831-neg-year-io
Apr 17, 2026
Merged

<chrono>: Updates two-digit year I/O for negative years per LWG-3831#6227
StephanTLavavej merged 2 commits intomicrosoft:mainfrom
MattStephanson:lwg-3831-neg-year-io

Conversation

@MattStephanson
Copy link
Copy Markdown
Contributor

Fixes #3166. Fixes #4248. Fixes #6205.

Updates expected_results.txt comment to reflect that only the libc++ bug is blocking this test (padding in %C field).

@MattStephanson MattStephanson requested a review from a team as a code owner April 5, 2026 21:21
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Apr 5, 2026
@StephanTLavavej StephanTLavavej added LWG Library Working Group issue format C++20/23 format chrono C++20 chrono labels Apr 6, 2026
@StephanTLavavej StephanTLavavej self-assigned this Apr 6, 2026
Comment thread stl/inc/chrono
int _Two_d_year = _Year % 100;
if (_Two_d_year < 0) {
_Two_d_year += 100;
// LWG-3831: the two-digit year is taken without regard to the sign of the whole year number.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No change requested: We don't usually cite resolved LWG issues, but this is clear enough.

@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Apr 10, 2026
@StephanTLavavej StephanTLavavej removed their assignment Apr 10, 2026
@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Apr 15, 2026
@StephanTLavavej
Copy link
Copy Markdown
Member

I'm mirroring this to the MSVC-internal repo. Please notify me if any further changes are pushed, otherwise no action is required.

@StephanTLavavej StephanTLavavej merged commit 11d40f6 into microsoft:main Apr 17, 2026
49 checks passed
@github-project-automation github-project-automation bot moved this from Merging to Done in STL Code Reviews Apr 17, 2026
@StephanTLavavej
Copy link
Copy Markdown
Member

Thanks for getting this fixed in the Standard, I really appreciate it! 😻 💯 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chrono C++20 chrono format C++20/23 format LWG Library Working Group issue

Projects

Archived in project

2 participants