Menu

#101 Week in statistics always starts on Sunday.

v1.0_(example)
closed-fixed
nobody
None
5
2017-10-09
2017-02-05
sliwowitz
No

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.

Discussion

  • sliwowitz

    sliwowitz - 2017-03-06

    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.

     
  • sliwowitz

    sliwowitz - 2017-09-19

    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
  • Wolfgang ch

    Wolfgang ch - 2017-09-19

    Good catch, I could verify this problem with my own data and will fix it soon

     
  • Wolfgang ch

    Wolfgang ch - 2017-09-19

    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

     
  • Wolfgang ch

    Wolfgang ch - 2017-10-09

    fixed in 17.9.1

     
  • Wolfgang ch

    Wolfgang ch - 2017-10-09
    • status: open --> closed-fixed