mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Datafile: Fixed range rejection
This commit is contained in:
parent
b250e37b73
commit
3764c60f90
1 changed files with 5 additions and 4 deletions
|
@ -90,11 +90,12 @@ void Datafile::setExclusions (const std::vector <std::string>& exclusions)
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Accepted intervals; day1 <= interval.start < dayN
|
||||||
bool Datafile::addInterval (const Interval& interval)
|
bool Datafile::addInterval (const Interval& interval)
|
||||||
{
|
{
|
||||||
// Return false if the interval does not belong in this file.
|
// Return false if the interval does not belong in this file.
|
||||||
// Note: end date might be zero.
|
// Note: end date might be zero.
|
||||||
if (interval.start () > _dayN ||
|
if (interval.start () >= _dayN ||
|
||||||
(interval.end ().toEpoch () && interval.end () < _day1))
|
(interval.end ().toEpoch () && interval.end () < _day1))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -118,7 +119,7 @@ bool Datafile::deleteInterval (const Interval& interval)
|
||||||
{
|
{
|
||||||
// Return false if the interval does not belong in this file.
|
// Return false if the interval does not belong in this file.
|
||||||
// Note: end date might be zero.
|
// Note: end date might be zero.
|
||||||
if (interval.start () > _dayN ||
|
if (interval.start () >= _dayN ||
|
||||||
(interval.end ().toEpoch () && interval.end () < _day1))
|
(interval.end ().toEpoch () && interval.end () < _day1))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue