trale icon indicating copy to clipboard operation
trale copied to clipboard

Request: add option to choose date and calendar format

Open nach0 opened this issue 2 years ago • 2 comments

Currently when selecting English as app language, the date format is automatically set to MM/DD/YYYY, and in the calendar view Sunday is the first day of the week.

Many people choose English as interface language but don't live in the US nor use the US date format. It would be nice to give the users the option to choose the date format and the first day of the week in the calendar view.

nach0 avatar Feb 18 '24 17:02 nach0

Hi, I would like to contribute to this project by trying to solve this issue. Is this issue still relevant?

olker159 avatar Oct 07 '24 17:10 olker159

Hi @olker159 this issue is still open. And I would be very happy to assist you with this task :) Right now there is a major rewrite to include some more statistics to keep the user motivated, see #31. There we change the measurement list, so changing it as well will cause merge conflicts. We (or better @gwosd ) will try to finish it the next days.

Because the source code is a mess, here is brief list of steps on how I would tackle it.

  • [ ] add two Enums which stands for the firstDay of the week and different date printing formats. Both time including the system default as one option. You can check, e.g. the units class in lib/core/units.dart. using extensions to allow a nice parsing makes the next steps much easier.
  • [ ] include both of them into the preferences and traleNotifier.
  • [ ] add two drop down ListTile in the setting pages, similar to the language selection
  • [ ] to allow changing the first day of the week in the calendar view, we should switch to calendar_date_picker2 in both dialogs.
  • [ ] and to change the displayed weight, one need to add a new printing function. But this will cause merging issue, due to the open PR #31.

braniii avatar Oct 08 '24 05:10 braniii