mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
data: Distinguished closed intevals from open intervals using hte same separator
This commit is contained in:
parent
9681719a3f
commit
276b53f2fc
1 changed files with 5 additions and 1 deletions
|
@ -656,7 +656,11 @@ Interval getLatestInterval (Database& database)
|
|||
Interval i;
|
||||
for (auto& line : database.allLines ())
|
||||
{
|
||||
if (line.find (" - ") == std::string::npos)
|
||||
// inc YYYYMMDDTHHMMSSZ - YYYYMMDDTHHMMSSZ # ...
|
||||
// ^ 20
|
||||
auto separator = line.find (" - ");
|
||||
if (separator != std::string::npos &&
|
||||
separator != 20)
|
||||
{
|
||||
i.initialize (line);
|
||||
return i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue