mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Consider intervals with trivial end dates
This commit is contained in:
parent
9e4162ecd4
commit
981ef3126d
1 changed files with 4 additions and 2 deletions
|
@ -93,8 +93,9 @@ void Datafile::setExclusions (const std::vector <std::string>& exclusions)
|
|||
bool Datafile::addInterval (const Interval& interval)
|
||||
{
|
||||
// Return false if the interval does not belong in this file.
|
||||
// Note: end date might be zero.
|
||||
if (interval.start () > _dayN ||
|
||||
interval.end () < _day1)
|
||||
(interval.end ().toEpoch () && interval.end () < _day1))
|
||||
return false;
|
||||
|
||||
if (! _lines_loaded)
|
||||
|
@ -116,8 +117,9 @@ bool Datafile::addInterval (const Interval& interval)
|
|||
bool Datafile::deleteInterval (const Interval& interval)
|
||||
{
|
||||
// Return false if the interval does not belong in this file.
|
||||
// Note: end date might be zero.
|
||||
if (interval.start () > _dayN ||
|
||||
interval.end () < _day1)
|
||||
(interval.end ().toEpoch () && interval.end () < _day1))
|
||||
return false;
|
||||
|
||||
if (! _lines_loaded)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue