[libc++][format] Fixes year formatter on Windows.
authorMark de Wever <koraq@xs4all.nl>
Sat, 27 May 2023 14:52:37 +0000 (16:52 +0200)
committerMark de Wever <koraq@xs4all.nl>
Tue, 30 May 2023 16:57:55 +0000 (18:57 +0200)
commit0ee73debf7445a9a34dcdf0215a99a2919d00112
treeac89008cb2246658477e9a6026b8450c19fc041c
parent66c7388c83bb0320f2223da3e3f31363f44bb3aa
[libc++][format] Fixes year formatter on Windows.

Windows' libc, like some other libc implementations do not work as
specified for %Y and %y. This uses the fixes used for other libc
implementations.

The work was part of D150593.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D151612
libcxx/include/__chrono/formatter.h
libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.nonmembers/ostream.pass.cpp
libcxx/test/std/time/time.syn/formatter.year.pass.cpp