N4964 [tab:time.format.spec]:
| Specifier |
Replacement |
%C |
The year divided by 100 using floored division. If the result is a single decimal digit, it is prefixed with 0. |
|
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.)
N4964 [tab:time.format.spec]:
llvm-project/libcxx/test/std/time/time.syn/formatter.year.pass.cpp
Lines 271 to 272 in f1200ca
For
year{-99}andyear{-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.)