mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Use Range::is_started ()
/Range::is_ended ()
instead of accessing range.start
/range.end
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
bffce7ef28
commit
f00c4b9464
4 changed files with 5 additions and 5 deletions
|
@ -98,7 +98,7 @@ int CmdContinue (
|
||||||
Datetime start_time;
|
Datetime start_time;
|
||||||
Datetime end_time;
|
Datetime end_time;
|
||||||
|
|
||||||
if (filter.start.toEpoch () != 0)
|
if (filter.is_started ())
|
||||||
{
|
{
|
||||||
start_time = filter.start;
|
start_time = filter.start;
|
||||||
end_time = filter.end;
|
end_time = filter.end;
|
||||||
|
|
|
@ -83,7 +83,7 @@ int CmdModify (
|
||||||
}
|
}
|
||||||
|
|
||||||
assert (intervals.size () == 1);
|
assert (intervals.size () == 1);
|
||||||
if (filter.start.toEpoch () == 0)
|
if (! filter.is_started ())
|
||||||
{
|
{
|
||||||
throw std::string ("No updated time specified. See 'timew help modify'.");
|
throw std::string ("No updated time specified. See 'timew help modify'.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,8 +93,8 @@ int CmdReport (
|
||||||
auto filter = cli.getFilter ();
|
auto filter = cli.getFilter ();
|
||||||
auto tracked = getTracked (database, rules, filter);
|
auto tracked = getTracked (database, rules, filter);
|
||||||
|
|
||||||
rules.set ("temp.report.start", filter.start.toEpoch () > 0 ? filter.start.toISO () : "");
|
rules.set ("temp.report.start", filter.is_started () ? filter.start.toISO () : "");
|
||||||
rules.set ("temp.report.end", filter.end.toEpoch () > 0 ? filter.end.toISO () : "");
|
rules.set ("temp.report.end", filter.is_ended () ? filter.end.toISO () : "");
|
||||||
rules.set ("temp.report.tags", joinQuotedIfNeeded (",", filter.tags ()));
|
rules.set ("temp.report.tags", joinQuotedIfNeeded (",", filter.tags ()));
|
||||||
rules.set ("temp.version", VERSION);
|
rules.set ("temp.version", VERSION);
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ int CmdStop (
|
||||||
|
|
||||||
// If a stop date is specified (and occupies filter.start) then use
|
// If a stop date is specified (and occupies filter.start) then use
|
||||||
// that instead of the current time.
|
// that instead of the current time.
|
||||||
if (filter.start.toEpoch () != 0)
|
if (filter.is_started ())
|
||||||
{
|
{
|
||||||
if (modified.start >= filter.start)
|
if (modified.start >= filter.start)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue