OpenTracks icon indicating copy to clipboard operation
OpenTracks copied to clipboard

Start of the week - selectable

Open natrius opened this issue 1 year ago • 8 comments

Is your feature request related to a problem? Please describe. For almost half of the worlds population the start of the week is Monday and not Sunday. https://www.timeanddate.com/calendar/days/first-day-of-the-week.html Also https://en.wikipedia.org/wiki/Week

Its incredible annoying when filtering when this setting is missed.

Describe the solution you'd like Settings - User Interface - "Start of the week" Let us choose between Saturday, Sunday and Monday

Describe alternatives you've considered None

EDIT for clarification:

  • Device: Xiaomi Mi 9
  • OS: Android 10

Regional Settings: Tried UK, Austria, Germany

Every time it starts with sunday.

natrius avatar Aug 28 '23 08:08 natrius

Actually, OpenTracks behaves region specific. With English (US) it is Sunday. With German (Germany) as well as Spanish (Spain) it is Monday. So, works as expected :D

Android 14 will support configuring certain settings per Language/Region. https://developer.android.com/about/versions/14/features#regional-preferences

dennisguse avatar Aug 28 '23 18:08 dennisguse

I had region UK and it was sunday. Changed the region now to austria and its still sunday. Changed the regional settings to germany, its still sunday.

Every calendar app has included a setting for this, please open this issue again and it would be greatly appreciated if this would be a setting.

And for clarification about what i'm talking: image

natrius avatar Aug 31 '23 08:08 natrius

Interesting I have an android system setting for the weekstart date and it is set to monday, but OpenTracks shows Sunday.

pstorch avatar Aug 31 '23 12:08 pstorch

Android 12 looks like this (aka working).

Screenshot_20230831-163045.png

dennisguse avatar Aug 31 '23 14:08 dennisguse

Screenshot_20230831_131045_Calendar Screenshot_20230831_131106_OpenTracks (Nightly)

pstorch avatar Aug 31 '23 19:08 pstorch

Tested again. The system setting which I showed above applies only to the stock calendar app, no other app respect that setting. But when I change the language from english/us to english/uk, I get the starting date of monday.

pstorch avatar Sep 02 '23 19:09 pstorch

Here is the code that is determining the start of the week: https://github.com/OpenTracksApp/OpenTracks/commit/b4ce99440a364485c5f2e08e238efefe7c9c3e14

        LocalDateTime firstDayThisWeek = LocalDate.now().with(WeekFields.of(Locale.getDefault()).getFirstDayOfWeek()).atStartOfDay();

It is not Android 14 ready :)

dennisguse avatar Sep 23 '23 20:09 dennisguse

We may also think about migrating to MaterialDesign's DateRangePicker

dennisguse avatar Oct 12 '23 21:10 dennisguse