mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
- Fixed bug where dateformat=m/d/Y was not parsing "07/08/2008", which is technically "M/D/Y", but, come on, let's be nice.
- Altered (deprecated) TUTORIAL introductory disclaimer.
This commit is contained in:
parent
fe03f91744
commit
86f5294436
6 changed files with 38 additions and 34 deletions
12
ChangeLog
12
ChangeLog
|
@ -5,14 +5,9 @@ Version numbers are of the form:
|
||||||
where the X represents a major version number, or architecture. The Y
|
where the X represents a major version number, or architecture. The Y
|
||||||
represents a feature release, and the Z represents a patch.
|
represents a feature release, and the Z represents a patch.
|
||||||
|
|
||||||
------ plans -------------------------------------
|
------ current release ---------------------------
|
||||||
|
|
||||||
- Configurable columns in reports
|
1.4.0 (7/10/2008)
|
||||||
- Dependencies
|
|
||||||
- Recurring tasks
|
|
||||||
|
|
||||||
|
|
||||||
1.4.0 ()
|
|
||||||
+ New recurring tasks feature
|
+ New recurring tasks feature
|
||||||
+ "task undelete" can now undelete erroneously deleted tasks, provided no
|
+ "task undelete" can now undelete erroneously deleted tasks, provided no
|
||||||
reports have been run (and therefore TDB::gc run)
|
reports have been run (and therefore TDB::gc run)
|
||||||
|
@ -28,8 +23,9 @@ represents a feature release, and the Z represents a patch.
|
||||||
+ Bug: Fixed where Esc[0m sequences were being emitted for no good reason
|
+ Bug: Fixed where Esc[0m sequences were being emitted for no good reason
|
||||||
+ Bug: Fixed underlined table headers when color is turned off
|
+ Bug: Fixed underlined table headers when color is turned off
|
||||||
+ Bug: Adding a blank priority resulted in an assigned garbage value
|
+ Bug: Adding a blank priority resulted in an assigned garbage value
|
||||||
|
+ Bug: Fixed parsing of date "07/08/2008" when using dateformat "m/d/Y"
|
||||||
|
|
||||||
------ reality -----------------------------------
|
------ old releases ------------------------------
|
||||||
|
|
||||||
1.3.1 (6/21/2008)
|
1.3.1 (6/21/2008)
|
||||||
+ New configuration variable, "defaultwidth" that determines the width
|
+ New configuration variable, "defaultwidth" that determines the width
|
||||||
|
|
9
TUTORIAL
9
TUTORIAL
|
@ -3,14 +3,15 @@ Task program tutorial, for version 1.4.0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||||
|
|
||||||
This TUTORIAL file is deprecated. It will not be included in future releases
|
This TUTORIAL file is deprecated, and does not contain all the new features in
|
||||||
of task, and will be superceded by an online version that can be found at:
|
release 1.4.0. It will not be included in future releases of task, and will be
|
||||||
|
superceded by a richer and more extensive online version that can be found at:
|
||||||
|
|
||||||
http://www.beckingham.net/task.html
|
http://www.beckingham.net/task.html
|
||||||
|
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,7 @@
|
||||||
<li>Fixed bug where Esc[0m sequences were being emitted for no good reason
|
<li>Fixed bug where Esc[0m sequences were being emitted for no good reason
|
||||||
<li>Fixed bug where table headers are underlined when color is turned off
|
<li>Fixed bug where table headers are underlined when color is turned off
|
||||||
<li>Fixed bug where adding a blank priority resulted in an assigned garbage value
|
<li>Fixed bug where adding a blank priority resulted in an assigned garbage value
|
||||||
|
<li>Fixed bug parsing date "07/08/2008" when using dateformat "m/d/Y"
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -82,8 +82,8 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i + 1 < mdy.length () &&
|
if (i + 1 < mdy.length () &&
|
||||||
mdy[i + 0] == '1' &&
|
(mdy[i + 0] == '0' || mdy[i + 0] == '1') &&
|
||||||
(mdy[i + 1] == '0' || mdy[i + 1] == '1' || mdy[i + 1] == '2'))
|
::isdigit (mdy[i + 1]))
|
||||||
{
|
{
|
||||||
month = ::atoi (mdy.substr (i, 2).c_str ());
|
month = ::atoi (mdy.substr (i, 2).c_str ());
|
||||||
i += 2;
|
i += 2;
|
||||||
|
@ -103,7 +103,7 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i + 1 < mdy.length () &&
|
if (i + 1 < mdy.length () &&
|
||||||
(mdy[i + 0] == '1' || mdy[i + 0] == '2' || mdy[i + 0] == '3') &&
|
(mdy[i + 0] == '0' || mdy[i + 0] == '1' || mdy[i + 0] == '2' || mdy[i + 0] == '3') &&
|
||||||
::isdigit (mdy[i + 1]))
|
::isdigit (mdy[i + 1]))
|
||||||
{
|
{
|
||||||
day = ::atoi (mdy.substr (i, 2).c_str ());
|
day = ::atoi (mdy.substr (i, 2).c_str ());
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int main (int argc, char** argv)
|
int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
plan (97);
|
plan (100);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -147,6 +147,11 @@ int main (int argc, char** argv)
|
||||||
is (fromString6.day (), 31, "ctor (std::string) -> d");
|
is (fromString6.day (), 31, "ctor (std::string) -> d");
|
||||||
is (fromString6.year (), 2007, "ctor (std::string) -> y");
|
is (fromString6.year (), 2007, "ctor (std::string) -> y");
|
||||||
|
|
||||||
|
Date fromString7 ("01/01/2008", "m/d/Y");
|
||||||
|
is (fromString7.month (), 1, "ctor (std::string) -> m");
|
||||||
|
is (fromString7.day (), 1, "ctor (std::string) -> d");
|
||||||
|
is (fromString7.year (), 2008, "ctor (std::string) -> y");
|
||||||
|
|
||||||
// Relative dates.
|
// Relative dates.
|
||||||
Date r1 ("today");
|
Date r1 ("today");
|
||||||
ok (r1.sameDay (now), "today = now");
|
ok (r1.sameDay (now), "today = now");
|
||||||
|
|
|
@ -18,24 +18,25 @@ int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
plan (17);
|
plan (17);
|
||||||
|
|
||||||
is (convertDuration ("daily"), 1, "duration daily = 1");
|
std::string d;
|
||||||
is (convertDuration ("day"), 1, "duration day = 1");
|
d = "daily"; is (convertDuration (d), 1, "duration daily = 1");
|
||||||
is (convertDuration ("0d"), 0, "duration 0d = 0");
|
d = "day"; is (convertDuration (d), 1, "duration day = 1");
|
||||||
is (convertDuration ("1d"), 1, "duration 1d = 1");
|
d = "0d"; is (convertDuration (d), 0, "duration 0d = 0");
|
||||||
is (convertDuration ("7d"), 7, "duration 7d = 7");
|
d = "1d"; is (convertDuration (d), 1, "duration 1d = 1");
|
||||||
is (convertDuration ("10d"), 10, "duration 10d = 10");
|
d = "7d"; is (convertDuration (d), 7, "duration 7d = 7");
|
||||||
is (convertDuration ("100d"), 100, "duration 100d = 100");
|
d = "10d"; is (convertDuration (d), 10, "duration 10d = 10");
|
||||||
|
d = "100d"; is (convertDuration (d), 100, "duration 100d = 100");
|
||||||
|
|
||||||
is (convertDuration ("weekly"), 7, "duration weekly = 7");
|
d = "weekly"; is (convertDuration (d), 7, "duration weekly = 7");
|
||||||
is (convertDuration ("sennight"), 7, "duration sennight = 7");
|
d = "sennight"; is (convertDuration (d), 7, "duration sennight = 7");
|
||||||
is (convertDuration ("biweekly"), 14, "duration biweekly = 14");
|
d = "biweekly"; is (convertDuration (d), 14, "duration biweekly = 14");
|
||||||
is (convertDuration ("fortnight"), 14, "duration fortnight = 14");
|
d = "fortnight"; is (convertDuration (d), 14, "duration fortnight = 14");
|
||||||
is (convertDuration ("week"), 7, "duration week = 7");
|
d = "week"; is (convertDuration (d), 7, "duration week = 7");
|
||||||
is (convertDuration ("0w"), 0, "duration 0w = 0");
|
d = "0w"; is (convertDuration (d), 0, "duration 0w = 0");
|
||||||
is (convertDuration ("1w"), 7, "duration 1w = 7");
|
d = "1w"; is (convertDuration (d), 7, "duration 1w = 7");
|
||||||
is (convertDuration ("7w"), 49, "duration 7w = 49");
|
d = "7w"; is (convertDuration (d), 49, "duration 7w = 49");
|
||||||
is (convertDuration ("10w"), 70, "duration 10w = 70");
|
d = "10w"; is (convertDuration (d), 70, "duration 10w = 70");
|
||||||
is (convertDuration ("100w"), 700, "duration 100w = 700");
|
d = "100w"; is (convertDuration (d), 700, "duration 100w = 700");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue