mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +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
|
@ -107,8 +107,8 @@ void handleRecurrence ()
|
|||
|
||||
if (t->has ("wait"))
|
||||
{
|
||||
Date old_wait (atoi (t->get ("wait").c_str ()));
|
||||
Date old_due (atoi (t->get ("due").c_str ()));
|
||||
Date old_wait (t->get_date ("wait"));
|
||||
Date old_due (t->get_date ("due"));
|
||||
Date due (*d);
|
||||
sprintf (dueDate, "%u", (unsigned int) (due + (old_wait - old_due)).toEpoch ());
|
||||
rec.set ("wait", dueDate);
|
||||
|
@ -160,14 +160,14 @@ void handleRecurrence ()
|
|||
bool generateDueDates (Task& parent, std::vector <Date>& allDue)
|
||||
{
|
||||
// Determine due date, recur period and until date.
|
||||
Date due (atoi (parent.get ("due").c_str ()));
|
||||
Date due (parent.get_date ("due"));
|
||||
std::string recur = parent.get ("recur");
|
||||
|
||||
bool specificEnd = false;
|
||||
Date until;
|
||||
if (parent.get ("until") != "")
|
||||
{
|
||||
until = Date (atoi (parent.get ("until").c_str ()));
|
||||
until = Date (parent.get ("until"));
|
||||
specificEnd = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue