From 3daf8c1ffedfc97b0874c416564e74d74448630b Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Sat, 1 Apr 2017 21:53:29 -0400 Subject: [PATCH] Minor tweaks. --- date.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/date.h b/date.h index 9bfa5f0..9a1bdaf 100644 --- a/date.h +++ b/date.h @@ -4417,7 +4417,7 @@ to_stream(std::basic_ostream& os, const CharT* fmt, os.fill('0'); os.flags(std::ios::dec | std::ios::right); os.width(2); - os << static_cast(y) % 100; + os << std::abs(static_cast(y)) % 100; } } else @@ -5088,7 +5088,7 @@ to_stream(std::basic_ostream& os, const CharT* fmt, { using Duration = std::chrono::duration; using CT = typename std::common_type::type; - fields fds{year_month_day{}, time_of_day{d}}; + fields fds{time_of_day{d}}; to_stream(os, fmt, fds); }