diff --git a/Examples-and-Recipes.md b/Examples-and-Recipes.md index 38a5913..74bf4e5 100644 --- a/Examples-and-Recipes.md +++ b/Examples-and-Recipes.md @@ -675,8 +675,8 @@ The first recipe below is based on an example from [Howard Hinnant](https://gith using namespace date; auto time = std::chrono::system_clock::now(); auto daypoint = floor(time); -auto ymd = year_month_day(daypoint); // calendar date -auto tod = make_time(time - daypoint); // Yields time_of_day type +year_month_day ymd = daypoint; // calendar date +hh_mm_ss tod{time - daypoint}; // Yields time_of_day type // Obtain individual components as integers auto y = int(ymd.year()); @@ -697,7 +697,7 @@ std::tm to_calendar_time(std::chrono::time_point tp) auto date = floor(tp); auto ymd = year_month_day(date); auto weekday = year_month_weekday(date).weekday_indexed().weekday(); - auto tod = make_time(tp - date); + hh_mm_ss tod{tp - date}; days daysSinceJan1 = date - sys_days(ymd.year()/1/1); std::tm result{}; @@ -1032,7 +1032,7 @@ And recall that `sys_days` is just a type alias for a `std::chrono::time_point(now); iso_week::year_weeknum_weekday iso_date = dp; -auto time = date::make_time(now-dp); +date::hh_mm_ss time{now-dp}; std::cout << iso_date << ' ' << time << '\n'; ```