diff --git a/AUTHORS b/AUTHORS index 9af124852..ea8963a15 100644 --- a/AUTHORS +++ b/AUTHORS @@ -239,3 +239,4 @@ suggestions: Nick Person Arnoud K Ozgur Akgun + David Costa diff --git a/ChangeLog b/ChangeLog index 26ecf6023..4dc8969c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -230,6 +230,8 @@ - TW-1469 Case-insensitive searching broken on Cygwin (thanks to Richard Boß). - TW-1471 task calc uses output it doesn't understand (thanks to Jens Erat). +- TW-1477 Incompatibility with recurring tasks created with 2.3.0 (thanks to + David Costa). - Added new holidays.xy-XY.rc definition files - Removed deprecated 'echo.command' setting, in favor of the 'header' and 'affected' verbosity tokens. diff --git a/src/Duration.cpp b/src/Duration.cpp index 1e0dc1f3b..18018f5fa 100644 --- a/src/Duration.cpp +++ b/src/Duration.cpp @@ -56,36 +56,36 @@ static struct {"biyearly", 730 * DAY, true}, {"daily", 1 * DAY, true}, {"days", 1 * DAY, false}, - {"day", 1 * DAY, false}, + {"day", 1 * DAY, true}, {"d", 1 * DAY, false}, {"fortnight", 14 * DAY, true}, {"hours", 1 * HOUR, false}, - {"hour", 1 * HOUR, false}, + {"hour", 1 * HOUR, true}, {"h", 1 * HOUR, false}, {"minutes", 1 * MINUTE, false}, {"minute", 1 * MINUTE, false}, {"min", 1 * MINUTE, false}, {"monthly", 30 * DAY, true}, {"months", 30 * DAY, false}, - {"month", 30 * DAY, false}, + {"month", 30 * DAY, true}, {"mo", 30 * DAY, false}, {"quarterly", 91 * DAY, true}, {"quarters", 91 * DAY, false}, - {"quarter", 91 * DAY, false}, + {"quarter", 91 * DAY, true}, {"q", 91 * DAY, false}, {"semiannual", 183 * DAY, true}, {"sennight", 14 * DAY, false}, {"seconds", 1 * SECOND, false}, - {"second", 1 * SECOND, false}, + {"second", 1 * SECOND, true}, {"s", 1 * SECOND, false}, {"weekdays", 1 * DAY, true}, {"weekly", 7 * DAY, true}, {"weeks", 7 * DAY, false}, - {"week", 7 * DAY, false}, + {"week", 7 * DAY, true}, {"w", 7 * DAY, false}, {"yearly", 365 * DAY, true}, {"years", 365 * DAY, false}, - {"year", 365 * DAY, false}, + {"year", 365 * DAY, true}, {"y", 365 * DAY, false}, }; @@ -284,6 +284,7 @@ bool Duration::parse (const std::string& input, std::string::size_type& start) std::string::size_type original_start = start; Nibbler n (input.substr (start)); + // TODO This can be made static, and so preserved between calls. std::vector units; for (int i = 0; i < NUM_DURATIONS; i++) units.push_back (durations[i].unit); @@ -327,8 +328,7 @@ bool Duration::parse (const std::string& input, std::string::size_type& start) double seconds = 1; for (int i = 0; i < NUM_DURATIONS; i++) { - if (durations[i].unit == unit && - durations[i].standalone == false) + if (durations[i].unit == unit) { seconds = durations[i].seconds; _secs = static_cast (quantity * static_cast (seconds));