Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-shell
99c97707ac
The original code was assuming that getDay() on a Sunday would return 7 rather than 0. This broke the "Next Week" logic in several places. This commit introduces a dayInWeek variable which takes the following values on the according days: weekstart = 1: Mo: 0 Tu: 1 We: 2 Th: 3 Fr: 4 Sa: 5 Su: 6 weekstart = 0: Su: 0 Mo: 1 Tu: 2 We: 3 Th: 4 Fr: 5 Sa: 6 Using this we can simplify and fix the conditional that decides whether to show "This week" or "Next week" which was broken on Sundays. This commit also fixes the period that gets shown for "Next week" on Sundays. Due to the bug it was 13 + 1 - 0 or 13 + 0 - 0 on Sundays: weekStart = 1: saturday: saturday + 13 - day_in_week = saturday + 8 = sunday next week sunday: sunday + 13 - day_in_week = sunday + 7 = sunday next week weekStart = 0: friday: friday + 13 - day_in_week = friday + 8 = saturday next week saturday: saturday + 13 - day_in_week = friday + 7 = saturday next week https://bugzilla.gnome.org/show_bug.cgi?id=682198 |
||
---|---|---|
.settings | ||
browser-plugin | ||
data | ||
docs | ||
js | ||
man | ||
po | ||
src | ||
tests | ||
tools | ||
.gitignore | ||
.project | ||
AUTHORS | ||
autogen.sh | ||
configure.ac | ||
COPYING | ||
gnome-shell.doap | ||
MAINTAINERS | ||
Makefile.am | ||
NEWS | ||
README |
GNOME Shell provides core user interface functions for the GNOME 3 desktop, like switching to windows and launching applications. GNOME Shell takes advantage of the capabilities of modern graphics hardware and introduces innovative user interface concepts to provide a visually attractive and easy to use experience. For more information about GNOME Shell, including instructions on how to build GNOME Shell from source and how to get involved with the project, see: http://live.gnome.org/GnomeShell Bugs should be reported at http://bugzilla.gnome.org against the 'gnome-shell' product. License ======= GNOME Shell is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for details.