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;
}
////////////////////////////////////////////////////////////////////////////////
// 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 ()
{