mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Interval: Added ::empty
This commit is contained in:
parent
0619309054
commit
1c14e1ae62
2 changed files with 9 additions and 0 deletions
|
@ -81,6 +81,14 @@ void Interval::initialize (const std::string& line)
|
|||
throw format ("Unrecognizable line '{1}'.", line);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Interval::empty () const
|
||||
{
|
||||
return _start.toEpoch () == 0 &&
|
||||
_end.toEpoch () == 0 &&
|
||||
_tags.size () == 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Datetime Interval::start () const
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@ class Interval
|
|||
public:
|
||||
Interval () = default;
|
||||
void initialize (const std::string&);
|
||||
bool empty () const;
|
||||
|
||||
Datetime start () const;
|
||||
void start (Datetime);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue