mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
- Fixed bug whereby "1 wks" was being improperly pluralized
This commit is contained in:
parent
9bca303113
commit
4572c97c9d
3 changed files with 17 additions and 14 deletions
|
@ -9,16 +9,18 @@ represents a feature release, and the z represents a patch.
|
|||
|
||||
Configurable columns in reports
|
||||
|
||||
------ reality -----------------------------------
|
||||
|
||||
1.3.0 (?)
|
||||
+ "task calendar" now displays multiple months per line, adjustable by the
|
||||
"monthsperline" configuration variable. Feature added by Damian Glenny
|
||||
+ "task export" can now filter tasks like the reports.
|
||||
+ Factored out code to filter tasks.
|
||||
+ Bug: Segmentation fault when no "dateformat" configuration variable
|
||||
specified
|
||||
+ Bug: Fixed bug whereby if you have more than one task with a due date, 7
|
||||
days gets added to the entry date of task 2..n
|
||||
|
||||
------ reality -----------------------------------
|
||||
+ Bug: Fixed bug whereby "1 wks" was being improperly pluralized
|
||||
|
||||
1.2.0 (6/13/2008)
|
||||
+ Bug: "dateformat" configuration variable used to display dates, but
|
||||
|
|
24
src/util.cpp
24
src/util.cpp
|
@ -80,19 +80,19 @@ void formatTimeDeltaDays (std::string& output, time_t delta)
|
|||
if (days > 365)
|
||||
sprintf (formatted, "%.1f yrs", (days / 365.2422));
|
||||
else if (days > 84)
|
||||
sprintf (formatted, "%1d mths", (int) (days / 30.6));
|
||||
sprintf (formatted, "%1d mth%s", (int) (days / 30.6), ((int) (days / 30.6) == 1 ? "" : "s"));
|
||||
else if (days > 13)
|
||||
sprintf (formatted, "%d wks", (int) (days / 7.0));
|
||||
sprintf (formatted, "%d wk%s", (int) (days / 7.0), ((int) (days / 7.0) == 1 ? "" : "s"));
|
||||
else if (days > 5.0)
|
||||
sprintf (formatted, "%d days", (int) days);
|
||||
sprintf (formatted, "%d day%s", (int) days, ((int) days == 1 ? "" : "s"));
|
||||
else if (days > 1.0)
|
||||
sprintf (formatted, "%.1f days", days);
|
||||
else if (days * 24 > 1.0)
|
||||
sprintf (formatted, "%d hrs", (int) (days * 24.0));
|
||||
sprintf (formatted, "%d hr%s", (int) (days * 24.0), ((int) (days * 24.0) == 1 ? "" : "s"));
|
||||
else if (days * 24 * 60 > 1)
|
||||
sprintf (formatted, "%d mins", (int) (days * 24 * 60));
|
||||
sprintf (formatted, "%d min%s", (int) (days * 24 * 60), ((int) (days * 24 * 60) == 1 ? "" : "s"));
|
||||
else if (days * 24 * 60 * 60 > 1)
|
||||
sprintf (formatted, "%d secs", (int) (days * 24 * 60 * 60));
|
||||
sprintf (formatted, "%d sec%s", (int) (days * 24 * 60 * 60), ((int) (days * 24 * 60 * 60) == 1 ? "" : "s"));
|
||||
else
|
||||
strcpy (formatted, "-");
|
||||
|
||||
|
@ -108,19 +108,19 @@ std::string formatSeconds (time_t delta)
|
|||
if (days > 365)
|
||||
sprintf (formatted, "%.1f yrs", (days / 365.2422));
|
||||
else if (days > 84)
|
||||
sprintf (formatted, "%1d mths", (int) (days / 30.6));
|
||||
sprintf (formatted, "%1d mth%s", (int) (days / 30.6), ((int) (days / 30.6) == 1 ? "" : "s"));
|
||||
else if (days > 13)
|
||||
sprintf (formatted, "%d wks", (int) (days / 7.0));
|
||||
sprintf (formatted, "%d wk%s", (int) (days / 7.0), ((int) (days / 7.0) == 1 ? "" : "s"));
|
||||
else if (days > 5.0)
|
||||
sprintf (formatted, "%d days", (int) days);
|
||||
sprintf (formatted, "%d day%s", (int) days, ((int) days == 1 ? "" : "s"));
|
||||
else if (days > 1.0)
|
||||
sprintf (formatted, "%.1f days", days);
|
||||
else if (days * 24 > 1.0)
|
||||
sprintf (formatted, "%d hrs", (int) (days * 24.0));
|
||||
sprintf (formatted, "%d hr%s", (int) (days * 24.0), ((int) (days * 24) == 1 ? "" : "s"));
|
||||
else if (days * 24 * 60 > 1)
|
||||
sprintf (formatted, "%d mins", (int) (days * 24 * 60));
|
||||
sprintf (formatted, "%d min%s", (int) (days * 24 * 60), ((int) (days * 24 * 60) == 1 ? "" : "s"));
|
||||
else if (days * 24 * 60 * 60 > 1)
|
||||
sprintf (formatted, "%d secs", (int) (days * 24 * 60 * 60));
|
||||
sprintf (formatted, "%d sec%s", (int) (days * 24 * 60 * 60), ((int) (days * 24 * 60 * 60) == 1 ? "" : "s"));
|
||||
else
|
||||
strcpy (formatted, "-");
|
||||
|
||||
|
|
|
@ -183,6 +183,7 @@ a img { border: none; padding: 0; margin: 0; }
|
|||
commands, when no "dateformat" configuration variable was present
|
||||
<li>Fixed bug whereby if you have more than one task with a due date,
|
||||
7 days gets added to the entry date of task 2..n
|
||||
<li>Fixed bug whereby "1 wks" was being improperly pluralized
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue