mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-28 01:04:54 +08:00
Minor tweaks.
This commit is contained in:
parent
c4c2550b29
commit
3daf8c1ffe
4
date.h
4
date.h
@ -4417,7 +4417,7 @@ to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
|
|||||||
os.fill('0');
|
os.fill('0');
|
||||||
os.flags(std::ios::dec | std::ios::right);
|
os.flags(std::ios::dec | std::ios::right);
|
||||||
os.width(2);
|
os.width(2);
|
||||||
os << static_cast<int>(y) % 100;
|
os << std::abs(static_cast<int>(y)) % 100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -5088,7 +5088,7 @@ to_stream(std::basic_ostream<CharT, Traits>& os, const CharT* fmt,
|
|||||||
{
|
{
|
||||||
using Duration = std::chrono::duration<Rep, Period>;
|
using Duration = std::chrono::duration<Rep, Period>;
|
||||||
using CT = typename std::common_type<Duration, std::chrono::seconds>::type;
|
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);
|
to_stream(os, fmt, fds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user