mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-05 13:44:26 +02:00
Updated Boost datetime Examples Translated (markdown)
@@ -112,7 +112,7 @@ look if ported to this library.
|
||||
throw std::exception{};
|
||||
auto birthday = day_point(d);
|
||||
auto today = floor<days>(current_zone()
|
||||
->to_local(system_clock::now()).first);
|
||||
->to_local(system_clock::now()).first);
|
||||
auto days_alive = today - birthday;
|
||||
if (days_alive == days{1})
|
||||
std::cout << "Born yesterday, very funny\n";
|
||||
|
Reference in New Issue
Block a user