mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
data: merge error skips one range
This commit is contained in:
parent
10fcc07aa5
commit
61647e0f26
2 changed files with 3 additions and 2 deletions
|
@ -120,7 +120,7 @@ std::vector <Range> Exclusion::ranges (const Range& range) const
|
|||
else if ((dayOfWeek = Datetime::dayOfWeek (_tokens[1])) != -1)
|
||||
{
|
||||
Datetime start (range.start.year (), range.start.month (), range.start.day (), 0, 0, 0);
|
||||
while (start < range.end)
|
||||
while (start <= range.end)
|
||||
{
|
||||
if (start.dayOfWeek () == dayOfWeek)
|
||||
{
|
||||
|
|
|
@ -295,7 +295,7 @@ std::vector <Range> getAllExclusions (
|
|||
results = subtractRanges (results, daysOn);
|
||||
|
||||
// Expand all exclusions that are not 'exc day ...' into excluded ranges that
|
||||
// overlage with range.
|
||||
// overlap with range.
|
||||
std::vector <Range> exclusionRanges;
|
||||
for (auto& exclusion : exclusions)
|
||||
if (exclusion.tokens ()[1] != "day")
|
||||
|
@ -459,6 +459,7 @@ std::vector <Range> merge (
|
|||
}
|
||||
else
|
||||
{
|
||||
sorted[cursor] = sorted[i];
|
||||
++cursor;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue