mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
recur: Converted from ISO8601p to Duration
This commit is contained in:
parent
2d9c28f47e
commit
8a3af0c4a6
1 changed files with 3 additions and 4 deletions
|
@ -40,6 +40,7 @@
|
|||
#include <Context.h>
|
||||
#include <Lexer.h>
|
||||
#include <ISO8601.h>
|
||||
#include <Duration.h>
|
||||
#include <format.h>
|
||||
#include <util.h>
|
||||
#include <i18n.h>
|
||||
|
@ -364,14 +365,12 @@ ISO8601d getNextRecurrence (ISO8601d& current, std::string& period)
|
|||
}
|
||||
|
||||
// Add the period to current, and we're done.
|
||||
int secs = 0;
|
||||
std::string::size_type idx = 0;
|
||||
ISO8601p p;
|
||||
Duration p;
|
||||
if (! p.parse (period, idx))
|
||||
throw std::string (format (STRING_TASK_VALID_RECUR, period));
|
||||
|
||||
secs = (time_t) p;
|
||||
return current + secs;
|
||||
return current + p.toTime_t ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue