-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Open
Labels
formatC++20 std::format or std::print, and anything related to themC++20 std::format or std::print, and anything related to themlibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Description
N4964 [tab:time.format.spec]:
Specifier Replacement %CThe year divided by 100 using floored division. If the result is a single decimal digit, it is prefixed with 0.
llvm-project/libcxx/test/std/time/time.syn/formatter.year.pass.cpp
Lines 271 to 272 in f1200ca
| check(SV("%C='-1'\t%y='99'\t%Y='-0099'\t\n"), fmt, std::chrono::year{-99}); | |
| check(SV("%C='-1'\t%y='09'\t%Y='-0009'\t\n"), fmt, std::chrono::year{-9}); |
For year{-99} and year{-9}, this test expects %C='-1', but MSVC's STL emits %C='-01'. This Standardese isn't exactly a paragon of crystal clarity, but I think this might be a bug in libc++. (Otherwise, it's a bug in MSVC's STL that we'll need to fix.)
Metadata
Metadata
Assignees
Labels
formatC++20 std::format or std::print, and anything related to themC++20 std::format or std::print, and anything related to themlibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.