Skip to content

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

Merged
Stephan T. Lavavej (StephanTLavavej) merged 2 commits into
microsoft: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
Stephan T. Lavavej (StephanTLavavej) merged 2 commits into
microsoft: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).

@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added LWG Library Working Group issue format C++20/23 format chrono C++20 chrono labels 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 Stephan T. Lavavej (StephanTLavavej) moved this from Initial Review to Ready To Merge in STL Code Reviews Apr 10, 2026
@StephanTLavavej Stephan T. Lavavej (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
Stephan T. Lavavej (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

2 participants