mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-05 21:54:27 +02:00
Updated Boost datetime Examples Translated (markdown)
@@ -341,7 +341,8 @@ look if ported to this library.
|
||||
using namespace std::chrono;
|
||||
using namespace date;
|
||||
auto zone = current_zone();
|
||||
auto d = year_month_day{floor<days>(zone->to_local(system_clock::now()).first)};
|
||||
auto d = year_month_day{floor<days>(
|
||||
zone->to_local(system_clock::now()).first)};
|
||||
auto d2 = d + months{1};
|
||||
if (!d2.ok())
|
||||
d2 = d2.year()/d2.month()/last; // boost snaps to last
|
||||
|
Reference in New Issue
Block a user