mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Holidays and dates
- improved dateformat handling now defaulting to YMD set via dateformat.holiday variable - fixed missing sorting in holiday table output when running calendar.holidays=full - renamed reportdateformat to dateformat.report - added config file checking for calendar.holidays and calendar.details - added 2 holiday files for SE and US (watertown, MA)
This commit is contained in:
parent
545013e839
commit
401f1b6496
10 changed files with 114 additions and 23 deletions
|
@ -654,10 +654,10 @@ int handleConfig (std::string &outs)
|
|||
"color.pri.M color.pri.none color.recurring color.tagged color.footnote color.header "
|
||||
"color.debug color.alternate color.calendar.today color.calendar.due color.calendar.overdue "
|
||||
"color.calendar.weekend color.calendar.holiday color.calendar.weeknumber confirmation "
|
||||
"curses data.location dateformat reportdateformat debug default.command default.priority "
|
||||
"default.project defaultwidth due locale displayweeknumber echo.command fontunderline "
|
||||
"locking monthsperline nag next project shadow.command shadow.file shadow.notify weekstart "
|
||||
"editor import.synonym.id import.synonym.uuid complete.all.projects complete.all.tags "
|
||||
"curses data.location dateformat dateformat.holiday dateformat.report debug default.command "
|
||||
"default.priority default.project defaultwidth due locale displayweeknumber echo.command "
|
||||
"fontunderline locking monthsperline nag next project shadow.command shadow.file shadow.notify "
|
||||
"weekstart editor import.synonym.id import.synonym.uuid complete.all.projects complete.all.tags "
|
||||
#ifdef FEATURE_SHELL
|
||||
"shell.prompt "
|
||||
#endif
|
||||
|
@ -718,6 +718,26 @@ int handleConfig (std::string &outs)
|
|||
<< "'."
|
||||
<< std::endl;
|
||||
|
||||
// Check for bad values in rc.calendar.details.
|
||||
std::string calendardetails = context.config.get ("calendar.details");
|
||||
if (calendardetails != "full" &&
|
||||
calendardetails != "sparse" &&
|
||||
calendardetails != "none")
|
||||
out << "Configuration error: calendar.details contains an unrecognized value '"
|
||||
<< calendardetails
|
||||
<< "'."
|
||||
<< std::endl;
|
||||
|
||||
// Check for bad values in rc.calendar.holidays.
|
||||
std::string calendarholidays = context.config.get ("calendar.holidays");
|
||||
if (calendarholidays != "full" &&
|
||||
calendarholidays != "sparse" &&
|
||||
calendarholidays != "none")
|
||||
out << "Configuration error: calendar.holidays contains an unrecognized value '"
|
||||
<< calendarholidays
|
||||
<< "'."
|
||||
<< std::endl;
|
||||
|
||||
// Check for bad values in rc.default.priority.
|
||||
std::string defaultPriority = context.config.get ("default.priority");
|
||||
if (defaultPriority != "H" &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue