diff --git a/src/ISO8601.cpp b/src/ISO8601.cpp index 85813a4d3..797828ab8 100644 --- a/src/ISO8601.cpp +++ b/src/ISO8601.cpp @@ -1243,6 +1243,20 @@ void ISO8601d::operator++ () _date = tomorrow._date; } +//////////////////////////////////////////////////////////////////////////////// +// Postfix increment by one day. +void ISO8601d::operator++ (int) +{ + ISO8601d tomorrow = (startOfDay () + 90001).startOfDay (); + tomorrow = ISO8601d (tomorrow.month (), + tomorrow.day (), + tomorrow.year (), + hour (), + minute (), + second ()); + _date = tomorrow._date; +} + //////////////////////////////////////////////////////////////////////////////// void ISO8601p::clear () { diff --git a/src/ISO8601.h b/src/ISO8601.h index 0694a149c..f5fbc1e9c 100644 --- a/src/ISO8601.h +++ b/src/ISO8601.h @@ -88,6 +88,7 @@ public: void operator-- (); // Prefix void operator-- (int); // Postfix void operator++ (); // Prefix + void operator++ (int); // Postfix private: void clear ();