mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-05 21:54: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;
|
||||
auto zone = current_zone();
|
||||
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};
|
||||
if (!d2.ok())
|
||||
d2 = d2.year()/d2.month()/last; // boost snaps to last
|
||||
|
Reference in New Issue
Block a user