mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-06 17:37:21 +02:00
Enhancement
- Implemented Record::get_date to eliminated the need to obtain a date as a string, then convert to time_t, then instantiate a Date.
This commit is contained in:
parent
7d5f4fdfc7
commit
63f91c2f88
12 changed files with 54 additions and 42 deletions
|
@ -117,7 +117,7 @@ int CmdTimesheet::execute (std::string& output)
|
|||
// If task completed within range.
|
||||
if (task->getStatus () == Task::completed)
|
||||
{
|
||||
Date compDate (strtol (task->get ("end").c_str (), NULL, 10));
|
||||
Date compDate (task->get_date ("end"));
|
||||
if (compDate >= start && compDate < end)
|
||||
{
|
||||
Color c (task->get ("fg") + " " + task->get ("bg"));
|
||||
|
@ -155,7 +155,7 @@ int CmdTimesheet::execute (std::string& output)
|
|||
if (task->getStatus () == Task::pending &&
|
||||
task->has ("start"))
|
||||
{
|
||||
Date startDate (strtol (task->get ("start").c_str (), NULL, 10));
|
||||
Date startDate (task->get_date ("start"));
|
||||
if (startDate >= start && startDate < end)
|
||||
{
|
||||
Color c (task->get ("fg") + " " + task->get ("bg"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue