Fix and test format %y

This commit is contained in:
Howard Hinnant committed 2016-11-27 15:30:01 -05:00
1 parent a5450e9d02
commit 8a3aeb566b
3 files changed
+122 -9

No files matched your search

+1 -1
View File
@@ -4676,7 +4676,7 @@ to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
}
else if (modified == CharT{})
{
y %= 100;
y = std::abs(y) % 100;
if (y < 10)
os << CharT{'0'};
os << y;