mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Feature #638
- added worded dates "later" and "someday" to enable the hiding of a task until doomsday.
This commit is contained in:
parent
be0357da4a
commit
0cac03ad4a
5 changed files with 27 additions and 2 deletions
|
@ -33,7 +33,8 @@
|
||||||
+ Added feature #608, and now completing a task, with journal.time turned on
|
+ Added feature #608, and now completing a task, with journal.time turned on
|
||||||
will stop the task first (thanks to Andy Kriger).
|
will stop the task first (thanks to Andy Kriger).
|
||||||
+ Added feature #629, a new holiday configuration file for New Zealand
|
+ Added feature #629, a new holiday configuration file for New Zealand
|
||||||
(thanks to Stephen Haywood)
|
(thanks to Stephen Haywood).
|
||||||
|
+ Added feature #638, a wait:later possibility (thanks to Clément Bœsch).
|
||||||
+ Added new holiday configuration file for Italy (thanks to Nicola Busanello).
|
+ Added new holiday configuration file for Italy (thanks to Nicola Busanello).
|
||||||
+ Added new holiday configuration file for Austria (thanks to Andreas Poisel).
|
+ Added new holiday configuration file for Austria (thanks to Andreas Poisel).
|
||||||
+ Eliminated dependency on ncurses.
|
+ Eliminated dependency on ncurses.
|
||||||
|
|
2
NEWS
2
NEWS
|
@ -15,6 +15,8 @@ New Features in taskwarrior 1.9.4
|
||||||
any other report, but returns unformatted JSON.
|
any other report, but returns unformatted JSON.
|
||||||
- Import can now read from files and URLs.
|
- Import can now read from files and URLs.
|
||||||
- Assorted bug fixes.
|
- Assorted bug fixes.
|
||||||
|
- new worded date "later" and "someday" to be used with the wait attribute to
|
||||||
|
hide a task until somepoint in time (this sets the wait date to 1/18/2038).
|
||||||
|
|
||||||
Please refer to the ChangeLog file for full details. There are too many to
|
Please refer to the ChangeLog file for full details. There are too many to
|
||||||
list here.
|
list here.
|
||||||
|
|
|
@ -590,6 +590,15 @@ task ... due:eom
|
||||||
.br
|
.br
|
||||||
task ... due:eoy
|
task ... due:eoy
|
||||||
|
|
||||||
|
.TP
|
||||||
|
At some point or later
|
||||||
|
.br
|
||||||
|
task ... wait:later
|
||||||
|
.br
|
||||||
|
task ... wait:someday
|
||||||
|
|
||||||
|
This sets the wait date to 1/18/2038.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
Next occurring weekday
|
Next occurring weekday
|
||||||
task ... due:fri
|
task ... due:fri
|
||||||
|
|
|
@ -985,6 +985,8 @@ bool Date::isRelativeDate (const std::string& input)
|
||||||
supported.push_back ("midsommar");
|
supported.push_back ("midsommar");
|
||||||
supported.push_back ("midsommarafton");
|
supported.push_back ("midsommarafton");
|
||||||
supported.push_back ("now");
|
supported.push_back ("now");
|
||||||
|
supported.push_back ("later");
|
||||||
|
supported.push_back ("someday");
|
||||||
|
|
||||||
std::vector <std::string> matches;
|
std::vector <std::string> matches;
|
||||||
if (autoComplete (in, supported, matches) == 1)
|
if (autoComplete (in, supported, matches) == 1)
|
||||||
|
@ -1141,6 +1143,12 @@ bool Date::isRelativeDate (const std::string& input)
|
||||||
mT = time (NULL);
|
mT = time (NULL);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (found == "later" || found == "someday")
|
||||||
|
{
|
||||||
|
Date then (1, 18, 2038);
|
||||||
|
mT = then.mT;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support "21st" to indicate the next date that is the 21st day.
|
// Support "21st" to indicate the next date that is the 21st day.
|
||||||
|
|
|
@ -34,7 +34,7 @@ Context context;
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int main (int argc, char** argv)
|
int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
UnitTest t (162);
|
UnitTest t (165);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -336,6 +336,11 @@ int main (int argc, char** argv)
|
||||||
Date r16 ("soy");
|
Date r16 ("soy");
|
||||||
t.notok (r16.sameYear (now), "soy not in same year as now");
|
t.notok (r16.sameYear (now), "soy not in same year as now");
|
||||||
|
|
||||||
|
Date later ("later");
|
||||||
|
t.is (later.month (), 1, "later -> m = 1");
|
||||||
|
t.is (later.day (), 18, "later -> d = 18");
|
||||||
|
t.is (later.year (), 2038, "later -> y = 2038");
|
||||||
|
|
||||||
// Date::sameHour
|
// Date::sameHour
|
||||||
Date r17 ("6/7/2010 01:00:00", "m/d/Y H:N:S");
|
Date r17 ("6/7/2010 01:00:00", "m/d/Y H:N:S");
|
||||||
Date r18 ("6/7/2010 01:59:59", "m/d/Y H:N:S");
|
Date r18 ("6/7/2010 01:59:59", "m/d/Y H:N:S");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue