Range: Added ::open

This commit is contained in:
Paul Beckingham 2016-05-10 20:33:50 -04:00
parent a24be8c4cc
commit f101962008
2 changed files with 8 additions and 0 deletions

View file

@ -47,6 +47,13 @@ bool Range::operator== (const Range& other) const
end == other.end; end == other.end;
} }
////////////////////////////////////////////////////////////////////////////////
bool Range::open () const
{
return start.toEpoch () > 0 &&
end.toEpoch () == 0;
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
bool Range::started () const bool Range::started () const
{ {

View file

@ -37,6 +37,7 @@ public:
Range (const Datetime&, const Datetime&); Range (const Datetime&, const Datetime&);
bool operator== (const Range&) const; bool operator== (const Range&) const;
bool open () const;
bool started () const; bool started () const;
bool ended () const; bool ended () const;
bool overlap (const Range&) const; bool overlap (const Range&) const;