recur
- Converted from OldDuration to Duration.
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
#include <Context.h>
|
#include <Context.h>
|
||||||
#include <Date.h>
|
#include <Date.h>
|
||||||
#include <OldDuration.h>
|
#include <Duration.h>
|
||||||
#include <text.h>
|
#include <text.h>
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
#include <i18n.h>
|
#include <i18n.h>
|
||||||
@@ -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 the period is an 'easy' one, add it to current, and we're done.
|
||||||
// If it throws an error, the duration was not recognized.
|
// If it throws an error, the duration was not recognized.
|
||||||
int secs = 0;
|
std::string::size_type idx = 0;
|
||||||
OldDuration du (period);
|
Duration du;
|
||||||
secs = du;
|
du.parse (period, idx);
|
||||||
|
int secs = du;
|
||||||
|
|
||||||
return current + secs;
|
return current + secs;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user