diff --git a/src/recur.cpp b/src/recur.cpp index b5e69523c..4728d1010 100644 --- a/src/recur.cpp +++ b/src/recur.cpp @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include @@ -336,9 +336,10 @@ Date getNextRecurrence (Date& current, std::string& period) // If the period is an 'easy' one, add it to current, and we're done. // If it throws an error, the duration was not recognized. - int secs = 0; - OldDuration du (period); - secs = du; + std::string::size_type idx = 0; + Duration du; + du.parse (period, idx); + int secs = du; return current + secs; }