diff --git a/ChangeLog b/ChangeLog index b723a57fb..9b3a739f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/src/util.cpp b/src/util.cpp index c4ec34e24..a908d3aa2 100644 --- a/src/util.cpp +++ b/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, "-"); diff --git a/task.html b/task.html index 16c830240..13c4179da 100644 --- a/task.html +++ b/task.html @@ -183,6 +183,7 @@ a img { border: none; padding: 0; margin: 0; } commands, when no "dateformat" configuration variable was present
  • 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 +
  • Fixed bug whereby "1 wks" was being improperly pluralized