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 the user to change the Date and Time Format #138

Open
Don42 opened this issue Jan 1, 2016 · 8 comments
Open

Allow the user to change the Date and Time Format #138

Don42 opened this issue Jan 1, 2016 · 8 comments

Comments

@Don42
Copy link

Don42 commented Jan 1, 2016

I would prefer to use ISO 8601 dates and times instead of the GER/EU time format.
My Android device is set to English, but with the data/time preferences set to ISO8601.

Relevant views are the detail talk view and favorites list view.

@cbeyls
Copy link

cbeyls commented Feb 3, 2017

Date and time format should follow the device settings. To achieve that you need to use android.text.format.DateFormat.getTimeFormat() to format dates.

@johnjohndoe
Copy link
Contributor

Which screen in particular are you referring to? I would appreciate if you could please add screenshots and highlight the dates.

@Don42
Copy link
Author

Don42 commented Feb 3, 2017

I hope this works. I'm referring to the talk detail view.
https://seafile.0xbeef.org/f/717a184391/

@johnjohndoe
Copy link
Contributor

LectureDetails_20170203-235101

@johnjohndoe
Copy link
Contributor

johnjohndoe commented Feb 5, 2017

What date formatting exactly would you like? I just checked the formatting when I run the device with German resp. English locale. Based on your example screenshot the output would be:

  • English: 12/28/16
  • German: 28.12.16

The formatting is based on SimpleDateFormat.getDateTimeInstance(SimpleDateFormat.SHORT, SimpleDateFormat.SHORT), see here.

@Don42
Copy link
Author

Don42 commented Feb 5, 2017

I prefer ISO8601 format. Unfortunately there is no way to set this in the android locale.

@johnjohndoe
Copy link
Contributor

Understood. - But as pointed out by @cbeyls Android apps follow the device locale settings. The only option that I see to let you customize the date format is by introducing an option in the application settings.
Though, I personally do not like this idea since it will make things more complicated and error prone. Any other thoughts, please?!

@Don42
Copy link
Author

Don42 commented Feb 5, 2017

Haven't written any Java/Android for several years, so take everything with a grain of salt.
I should be possible to use a wrapper function that just calls the method as it does right now,
unless an option is set in the config to use another format.
According to the Android documentation, the correct format string would probably be "yyyy-MM-dd'T'HH:mmZ". Although the timezone is probably irrelevant here.

zoff99 pushed a commit to zoff99/CampFahrplan that referenced this issue Aug 3, 2019
+ New: Using ConnectivityManager#registerDefaultNetworkCallback for
  Android Nougat and newer.
+ NetworkInfo#isConnectedOrConnecting and ConnectivityManager#CONNECTIVITY_ACTION
  have been deprecated in API level 28.
+ Related commit: 49a2bbf.
+ Relates to issue tuxmobil#138.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants