mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
FF4 - util.cpp:convertDuration -> Duration
- Replaced util.cpp convertDuration function with Duration object.
This commit is contained in:
parent
5ba1fd6aeb
commit
2e39929d71
7 changed files with 57 additions and 108 deletions
|
@ -38,6 +38,7 @@
|
|||
|
||||
#include "Config.h"
|
||||
#include "Date.h"
|
||||
#include "Duration.h"
|
||||
#include "Table.h"
|
||||
#include "TDB.h"
|
||||
#include "T.h"
|
||||
|
@ -717,7 +718,10 @@ Date getNextRecurrence (Date& current, std::string& period)
|
|||
}
|
||||
|
||||
// If the period is an 'easy' one, add it to current, and we're done.
|
||||
int days = convertDuration (period);
|
||||
int days = 0;
|
||||
try { Duration du (period); days = du; }
|
||||
catch (...) { days = 0; }
|
||||
|
||||
return current + (days * 86400);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue