ISO8601d: Added ::operator-

This commit is contained in:
Paul Beckingham 2015-09-26 15:43:07 -04:00
parent 16818c0b93
commit 860a1de034
2 changed files with 7 additions and 1 deletions

View file

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

View file

@ -77,11 +77,11 @@ public:
bool sameWeek (const ISO8601d&) const;
bool sameMonth (const ISO8601d&) const;
bool sameYear (const ISO8601d&) const;
ISO8601d operator+ (const int);
ISO8601d operator- (const int);
ISO8601d& operator+= (const int);
ISO8601d& operator-= (const int);
time_t operator- (const ISO8601d&);
private:
void clear ();