Commit Graph

6 Commits

Author SHA1 Message Date
Mark de Wever 566868cd82 [libc++][chrono] Implements formatter weekday.
Partially implements:
- P1361 Integration of chrono with text formatting
- P2372 Fixing locale handling in chrono formatters

Depends on D134742

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D136037
2022-10-18 20:40:06 +02:00
Mark de Wever 719c3dc6f2 [libc++][chrono] Implements formatter duration.
Partially implements:
- P1361 Integration of chrono with text formatting
- P2372 Fixing locale handling in chrono formatters
- LWG3270 Parsing and formatting %j with durations

Completes:
- P1650R0 std::chrono::days with 'd' suffix
- LWG3262 Formatting of negative durations is not specified
- LWG3314 Is stream insertion behavior locale dependent when Period::type is micro?

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D134742
2022-10-18 20:39:39 +02:00
Mark de Wever 1522f190eb [libc++][chrono] Implements formatter month.
Partially implements:
- P1361 Integration of chrono with text formatting

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D134138
2022-10-05 18:35:50 +02:00
Mark de Wever 3eb4f16b44 [libc++][chrono] Implements formatter year.
Partially implements:
- P1361 Integration of chrono with text formatting

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D133663
2022-10-05 17:01:19 +02:00
Mark de Wever f2a263512c [libc++][chrono] Removes format include.
Switch to the new granular format_functions header. Since the chrono's
format dependency in C++20 hasn't been in a release it's save to remove
it.

Depends on D133665

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D133796
2022-09-20 18:58:13 +02:00
Mark de Wever e5d2d3eafb [libc++][chrono] Implements formatter day.
This implements the enabled specializaton
template<class charT> struct formatter<chrono::day, charT>;

and
template<class charT, class traits>
    basic_ostream<charT, traits>&
      operator<<(basic_ostream<charT, traits>& os, const day& d);

Implements:
- LWG 3241 chrono-spec grammar ambiguity in §[time.format]

Partially implements:
- P1361 Integration of chrono with text formatting

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D128577
2022-09-07 18:44:04 +02:00