Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to select date time formats #298

Open
Blend3rman opened this issue Oct 19, 2024 · 1 comment
Open

Allow users to select date time formats #298

Blend3rman opened this issue Oct 19, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Blend3rman
Copy link

Blend3rman commented Oct 19, 2024

Is your feature request related to a problem? Please describe.
I'd like to be able to select my preferred date and time formats that reminders get displayed in, on the Overview page.

Describe the solution you'd like
I've taken a peek at the codebase, and the current implementation reads the locale user config. Which makes sense usually, but in my personal use case I've set my device locale to the US for use in other apps. However, I'd prefer my dates in DD/MM/YY format.

I'd appreciate guidance on how to add a new shared preference that shows up in the Settings menu, and any localization to-dos I need to be aware of. Also let me know if this feature doesn't make sense to pursue.

@Blend3rman Blend3rman added the enhancement New feature or request label Oct 19, 2024
@Futsch1
Copy link
Owner

Futsch1 commented Oct 20, 2024

What would be much easier is not to change the overall date format, but just use the medium length date representation instead of the short one as a configuration option (so use https://developer.android.com/reference/android/text/format/DateFormat#getMediumDateFormat(android.content.Context) instead of the default short length representation.

This would imply changes only in TimeHelper.java and in the preferences. Care needs to be taken that it is not only about formatting dates, but that parsing dates is also affected (e.g. when setting cyclic reminder start dates and editing events).

The settings menu is controlled via res/xml/root_preferences.xml. Localization needs to be added for all languages.

@Futsch1 Futsch1 added the good first issue Good for newcomers label Oct 20, 2024
@Futsch1 Futsch1 removed their assignment Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants