Week in statistics always starts on Sunday.
Brought to you by:
wolfgang-ch
When I open the Statistics window and group tours by week (e.g. Distance - Week), the week always starts on Sunday, even if I set it on Monday in preferences. The calendar shows the week correctly - just the Statistics graphs count Sundays to the next week.
It's OK again. I "solved it" by going to Preferences, changing the week start to Sunday, letting Mytourbook recalculate all tours, then setting it back to Monday, recalculating again. Now it works and I can't reproduce the problem anymore.
Sorry, not OK again. This looks like some kind of off-by-one error. The statistics window always start the week one day before the day it's set in the preferences.
The first picture shows week start on Monday. Notice the Sunday race in dark blue which should go into the week of Sep 11-17 together with a bunch of other activities, but in the statistics window, it's grouped with the red activity from the following week.
In the second picture, week is supposed to start on Tuesday. Now the statistics group the Sunday race with the week of Sep 11-17, and the Monday red activity sits alone in the following week (which is the state it was supposed to be in the first case).
Last edit: sliwowitz 2017-09-19
Good catch, I could verify this problem with my own data and will fix it soon
This problem may be introduced when switching to Java 8 and using the new TimeZone class.
In the old used java class,
java.util.Calendar.MONDAY = 2
with the new Java 8 time class
java.time.DayOfWeek.MONDAY = 1
fixed in 17.9.1