From 64965bdc969deca4746022e6b9d0dcfc0037fa66 Mon Sep 17 00:00:00 2001 From: Stepan Ponomaryov <51433792+SappyJoy@users.noreply.github.com> Date: Thu, 20 Oct 2022 20:22:03 +0300 Subject: [PATCH] Add locale getter in tm_writer (#3147) * Add locale getter in tm_writer * Apply clang-format Co-authored-by: Stepan Ponomarev --- include/fmt/chrono.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 8cecb162..c9a8ed8b 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1264,6 +1264,8 @@ class tm_writer { OutputIt out() const { return out_; } + const std::locale& locale() const { return loc_; } + FMT_CONSTEXPR void on_text(const Char* begin, const Char* end) { out_ = copy_str(begin, end, out_); }