traggo / server

self-hosted tag-based time tracking
https://traggo.net
GNU General Public License v3.0
1.21k stars 58 forks source link

Allow users on the english locales to choose between `MM/DD/YYYY` and `DD/MM/YYYY` datetime formating #135

Closed AbundantSalmon closed 1 year ago

AbundantSalmon commented 1 year ago

Is your feature request related to a problem? Please describe. Currently all datetimes for users of either of the english locales are displayed in the US date format where the leading value is the month, this is annoying and potentially confusing for all other english users where the standard has the leading value as the day. i.e 03/01 can be read as the 3rd of January or the 1st of March.

Describe the solution you'd like Add a user setting similar to the date locale, to allow english users to set their preferred display date format.

Describe alternatives you've considered Datetime formats could be not user selectable and be purely inferred from the user's language/locale and use javascript's built in toLocaleString() functionality. The issue is that this removes choice from the user and also would require a large variety of changes in multiple places in the codebase, whereas the above solution allows user choice and utilises the moment library's statefulness and minimises places in the codebase that need to be modified.

Additional context

Examples:

Screenshot 2023-01-14 at 09 14 44

vs

Screenshot 2023-01-14 at 09 15 01 Screenshot 2023-01-14 at 09 16 42

vs

Screenshot 2023-01-14 at 09 16 22