ISO8601d: ::operator++ (prefix)

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

View file

@ -1229,6 +1229,20 @@ void ISO8601d::operator-- (int)
_date = yesterday._date;
}
////////////////////////////////////////////////////////////////////////////////
// Prefix increment by one day.
void ISO8601d::operator++ ()
{
ISO8601d tomorrow = (startOfDay () + 90001).startOfDay ();
tomorrow = ISO8601d (tomorrow.month (),
tomorrow.day (),
tomorrow.year (),
hour (),
minute (),
second ());
_date = tomorrow._date;
}
////////////////////////////////////////////////////////////////////////////////
void ISO8601p::clear ()
{

View file

@ -87,6 +87,7 @@ public:
time_t operator- (const ISO8601d&);
void operator-- (); // Prefix
void operator-- (int); // Postfix
void operator++ (); // Prefix
private:
void clear ();