diff --git a/Boost-datetime-Examples-Translated.md b/Boost-datetime-Examples-Translated.md index 9b6af65..290017b 100644 --- a/Boost-datetime-Examples-Translated.md +++ b/Boost-datetime-Examples-Translated.md @@ -139,14 +139,13 @@ look if ported to this library. { using namespace std::chrono; using namespace date; - auto today = floor(current_zone()-> - to_local(system_clock::now()).first); + auto today = floor(current_zone()->to_local(system_clock::now())); auto current_year = year_month_day{today}.year(); - auto days_since_year_start = today - sys_days(current_year/jan/1); + auto days_since_year_start = today - local_days(current_year/jan/1); std::cout << "Days since Jan 1: " << days_since_year_start.count() << '\n'; auto days_until_year_start = - sys_days((current_year + years{1})/jan/1) - today; + local_days((current_year + years{1})/jan/1) - today; std::cout << "Days until next Jan 1: " << days_until_year_start.count() << '\n'; }