mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-06 14:14:27 +02:00
Updated Boost datetime Examples Translated (markdown)
@@ -363,7 +363,7 @@ If your OS supports the `std::locale("de_DE")` the above can be simplified to:
|
|||||||
using namespace date;
|
using namespace date;
|
||||||
auto zone = current_zone();
|
auto zone = current_zone();
|
||||||
auto d = year_month_day{floor<days>(
|
auto d = year_month_day{floor<days>(
|
||||||
zone->to_local(system_clock::now()).first)};
|
zone->to_local(system_clock::now()))};
|
||||||
auto d2 = d + months{1};
|
auto d2 = d + months{1};
|
||||||
if (!d2.ok())
|
if (!d2.ok())
|
||||||
d2 = d2.year()/d2.month()/last; // boost snaps to last
|
d2 = d2.year()/d2.month()/last; // boost snaps to last
|
||||||
|
Reference in New Issue
Block a user