First day of week can now be any day
Previously only Sunday and Monday were allowed as the first day of the week, and this was internally treated as a binary variable. This patch allows for users to change the first day of the week to any day. Addresses GitHub feature request #321. Signed-off-by: Morgan Seltzer <MorganSeltzer000@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
committed by
Lukas Fleischer
parent
e3fc73e0c7
commit
ee8ebebf92
@@ -159,7 +159,9 @@ void ui_calendar_set_first_day_of_week(enum wday first_day)
|
||||
/* Swap first day of week in calendar. */
|
||||
void ui_calendar_change_first_day_of_week(void)
|
||||
{
|
||||
wday_start = !wday_start;
|
||||
wday_start++;
|
||||
if(wday_start >= WEEKINDAYS)
|
||||
wday_start = 0;
|
||||
}
|
||||
|
||||
/* Return 1 if week begins on monday, 0 otherwise. */
|
||||
|
||||
Reference in New Issue
Block a user