Skip to content

Properly determine start of week when weeks start on Sundays

snow flurry requested to merge flurry/merkuro:firstdayofweek-locale into master

Qt::Sunday is equal to 7, which causes too many days to be added when determining the start of the week. Having it represent 0 means the correct date is chosen in locales where weeks start on Sunday.

This commit also changes DateTimeState::firstDayOfWeek to use QLocale::firstDayOfWeek() in its calculation. This is so SwipeableCalendarHourlyView passes a date exactly 7 days away to InfiniteCalendarViewModel::moveToDate regardless of locale.

BUG: 482482

Merge request reports

Loading