ISO8601d: Added ::oprator++ (postfix)

This commit is contained in:
Paul Beckingham 2015-09-26 16:09:56 -04:00
parent 98dbfb01b4
commit a6331747d2
2 changed files with 15 additions and 0 deletions

View file

@ -1243,6 +1243,20 @@ void ISO8601d::operator++ ()
_date = tomorrow._date; _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 () void ISO8601p::clear ()
{ {

View file

@ -88,6 +88,7 @@ public:
void operator-- (); // Prefix void operator-- (); // Prefix
void operator-- (int); // Postfix void operator-- (int); // Postfix
void operator++ (); // Prefix void operator++ (); // Prefix
void operator++ (int); // Postfix
private: private:
void clear (); void clear ();