From 3b4e6b37bccdf51d6dd8d8265ad5cd4d11b040a9 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Sat, 21 May 2016 12:51:08 -0400 Subject: [PATCH] Updated Boost datetime Examples Translated (markdown) --- Boost-datetime-Examples-Translated.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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'; }