mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
ISO8601d: Added ::operator-
This commit is contained in:
parent
16818c0b93
commit
860a1de034
2 changed files with 7 additions and 1 deletions
|
@ -1155,6 +1155,12 @@ ISO8601d& ISO8601d::operator-= (const int delta)
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
time_t ISO8601d::operator- (const ISO8601d& rhs)
|
||||||
|
{
|
||||||
|
return _date - rhs._date;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void ISO8601p::clear ()
|
void ISO8601p::clear ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,11 +77,11 @@ public:
|
||||||
bool sameWeek (const ISO8601d&) const;
|
bool sameWeek (const ISO8601d&) const;
|
||||||
bool sameMonth (const ISO8601d&) const;
|
bool sameMonth (const ISO8601d&) const;
|
||||||
bool sameYear (const ISO8601d&) const;
|
bool sameYear (const ISO8601d&) const;
|
||||||
|
|
||||||
ISO8601d operator+ (const int);
|
ISO8601d operator+ (const int);
|
||||||
ISO8601d operator- (const int);
|
ISO8601d operator- (const int);
|
||||||
ISO8601d& operator+= (const int);
|
ISO8601d& operator+= (const int);
|
||||||
ISO8601d& operator-= (const int);
|
ISO8601d& operator-= (const int);
|
||||||
|
time_t operator- (const ISO8601d&);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void clear ();
|
void clear ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue