From 980dff30487e421c86d4e3b48c2011ff943b8f49 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 16 Oct 2015 11:35:39 -0400 Subject: [PATCH] ISO8601d: Improved ::dump output --- src/ISO8601.cpp | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/ISO8601.cpp b/src/ISO8601.cpp index ae78d5a61..aa77e805f 100644 --- a/src/ISO8601.cpp +++ b/src/ISO8601.cpp @@ -1620,16 +1620,17 @@ std::string ISO8601d::dump () const { std::stringstream s; s << "ISO8601d" - << " _year=" << _year - << " _month=" << _month - << " _week=" << _week - << " _weekday=" << _weekday - << " _julian=" << _julian - << " _day=" << _day - << " _seconds=" << _seconds - << " _offset=" << _offset - << " _utc=" << _utc - << " _date=" << _date; + << " y" << _year + << " m" << _month + << " w" << _week + << " wd" << _weekday + << " j" << _julian + << " d" << _day + << " s" << _seconds + << " off" << _offset + << " utc" << _utc + << " =" << _date + << " " << (_date ? toISO () : ""); return s.str (); } @@ -1988,13 +1989,14 @@ std::string ISO8601p::dump () const { std::stringstream s; s << "ISO8601p" - << " _year=" << _year - << " _month=" << _month - << " _day=" << _day - << " _hours=" << _hours - << " _minutes=" << _minutes - << " _seconds=" << _seconds - << " _period=" << _period; + << " y" << _year + << " mo" << _month + << " d" << _day + << " h" << _hours + << " mi" << _minutes + << " s" << _seconds + << " =" << _period + << " " << (_period ? format () : ""); return s.str (); }