From d50970b32ae34defa849cc01856fa5ee28cd60a7 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Tue, 12 Jun 2018 18:13:24 -0400 Subject: [PATCH] Some backwards compatibility fixes for VS-2013 --- include/date/date.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/date/date.h b/include/date/date.h index e610315..a69e905 100644 --- a/include/date/date.h +++ b/include/date/date.h @@ -4453,7 +4453,7 @@ extract_weekday(std::basic_ostream& os, const fields& f weekday wd; if (fds.ymd.ok()) { - wd = weekday{fds.ymd}; + wd = weekday{sys_days(fds.ymd)}; if (fds.wd.ok() && wd != fds.wd) { // fds.ymd and fds.wd are inconsistent @@ -7332,8 +7332,8 @@ from_stream(std::basic_istream& is, const CharT* fmt, if (ymd.ok()) { if (wd == not_a_weekday) - wd = static_cast((weekday(ymd) - Sunday).count()); - else if (wd != static_cast((weekday(ymd) - Sunday).count())) + wd = static_cast((weekday(sys_days(ymd)) - Sunday).count()); + else if (wd != static_cast((weekday(sys_days(ymd)) - Sunday).count())) goto broken; if (!computed) {