mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Patch - Configurable week start day.
- Added ChangeLog entry. - Modified timesheet report error message on incorrect weekstart value to match that of calendar.
This commit is contained in:
parent
d09630a3a0
commit
020604334e
3 changed files with 10 additions and 5 deletions
|
@ -6,6 +6,8 @@
|
|||
+ Fixed bug that cause the _forcecolor configuration variable to be
|
||||
considered obsolete (thank to Bruce Dillahunty).
|
||||
+ Fixed documentation errors (thanks to Thomas@BIC).
|
||||
+ The 'weekstart' configuration variable now controls the 'calendar'
|
||||
command (thanks to Federico Hernandez).
|
||||
|
||||
------ old releases ------------------------------
|
||||
|
||||
|
|
|
@ -136,6 +136,8 @@
|
|||
<li>Fixed bug that cause the _forcecolor configuration variable to be
|
||||
considered obsolete (thank to Bruce Dillahunty).
|
||||
<li>Fixed documentation errors (thanks to Thomas@BIC).
|
||||
<li>The 'weekstart' configuration variable now controls the 'calendar'
|
||||
command (thanks to Federico Hernandez).
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -1347,10 +1347,10 @@ std::string handleReportTimesheet (TDB& tdb, T& task, Config& conf)
|
|||
filter (tasks, task);
|
||||
|
||||
// What day of the week does the user consider the first?
|
||||
int weekStart = Date::dayOfWeek (conf.get ("weekstart", "Monday"));
|
||||
if (weekStart == -1)
|
||||
throw std::string ("The 'weekstart' configuration variable does "
|
||||
"not contain a day name, such as 'Monday'.");
|
||||
int weekStart = Date::dayOfWeek (conf.get ("weekstart", "Sunday"));
|
||||
if (weekStart != 0 && weekStart != 1)
|
||||
throw std::string ("The 'weekstart' configuration variable may "
|
||||
"only contain 'Sunday' or 'Monday'.");
|
||||
|
||||
// Determine the date of the first day of the most recent report.
|
||||
Date today;
|
||||
|
@ -1540,8 +1540,9 @@ std::string renderMonths (
|
|||
Table table;
|
||||
table.setDateFormat (conf.get ("dateformat", "m/d/Y"));
|
||||
|
||||
// What day of the week does the user consider the first?
|
||||
int weekStart = Date::dayOfWeek (conf.get ("weekstart", "Sunday"));
|
||||
if ((weekStart != 0) && (weekStart != 1))
|
||||
if (weekStart != 0 && weekStart != 1)
|
||||
throw std::string ("The 'weekstart' configuration variable may "
|
||||
"only contain 'Sunday' or 'Monday'.");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue