ISO8601d: Added ::operator+=

This commit is contained in:
Paul Beckingham 2015-09-26 15:39:03 -04:00
parent ed2cf991f3
commit 984b12c0d2
2 changed files with 8 additions and 0 deletions

View file

@ -1141,6 +1141,13 @@ ISO8601d ISO8601d::operator- (const int delta)
return ISO8601d (_date - delta); return ISO8601d (_date - delta);
} }
////////////////////////////////////////////////////////////////////////////////
ISO8601d& ISO8601d::operator+= (const int delta)
{
_date += (time_t) delta;
return *this;
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void ISO8601p::clear () void ISO8601p::clear ()
{ {

View file

@ -80,6 +80,7 @@ public:
ISO8601d operator+ (const int); ISO8601d operator+ (const int);
ISO8601d operator- (const int); ISO8601d operator- (const int);
ISO8601d& operator+= (const int);
private: private:
void clear (); void clear ();