Daterange: Added ::operator==

This commit is contained in:
Paul Beckingham 2016-04-16 09:52:53 -04:00
parent 3e404b7f57
commit 5906f9314a
2 changed files with 8 additions and 0 deletions

View file

@ -34,6 +34,13 @@ Daterange::Daterange (const Datetime& start, const Datetime& end)
_end = end;
}
////////////////////////////////////////////////////////////////////////////////
bool Daterange::operator== (const Daterange& other)
{
return _start == other._start &&
_end == other._end;
}
////////////////////////////////////////////////////////////////////////////////
Datetime Daterange::start () const
{

View file

@ -34,6 +34,7 @@ class Daterange
public:
Daterange () = default;
Daterange (const Datetime&, const Datetime&);
bool operator== (const Daterange&);
Datetime start () const;
void start (const Datetime&);