Minor tweaks.

This commit is contained in:
Howard Hinnant 2017-04-01 21:53:29 -04:00
parent c4c2550b29
commit 3daf8c1ffe

4
date.h
View File

@ -4417,7 +4417,7 @@ to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
os.fill('0');
os.flags(std::ios::dec | std::ios::right);
os.width(2);
os << static_cast<int>(y) % 100;
os << std::abs(static_cast<int>(y)) % 100;
}
}
else
@ -5088,7 +5088,7 @@ to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
{
using Duration = std::chrono::duration<Rep, Period>;
using CT = typename std::common_type<Duration, std::chrono::seconds>::type;
fields<Duration> fds{year_month_day{}, time_of_day<CT>{d}};
fields<Duration> fds{time_of_day<CT>{d}};
to_stream(os, fmt, fds);
}