mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-05 21:54:27 +02:00
Updated Boost datetime Examples Translated (markdown)
@@ -111,7 +111,8 @@ look if ported to this library.
|
||||
if (!d.ok())
|
||||
throw std::exception{};
|
||||
auto birthday = day_point(d);
|
||||
auto today = floor<days>(current_zone()->to_local(system_clock::now()).first);
|
||||
auto today = floor<days>(current_zone()
|
||||
->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