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); }