mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Range: Added ::open
This commit is contained in:
parent
a24be8c4cc
commit
f101962008
2 changed files with 8 additions and 0 deletions
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue