mastodon / mastodon-android

Official Android app for Mastodon
https://app.joinmastodon.org/android
GNU General Public License v3.0
1.72k stars 264 forks source link

Date format of post should be localized #224

Open Xabellee opened 2 years ago

Xabellee commented 2 years ago

For example, in Japanese the month precedes the day, but the app does not. Screenshot_20220722-222939~3 the date of this post should be displayed as 5月4日 which means 4 May.

grishka commented 2 years ago

I think I added a string with placeholders for date format for this exact reason, but I'll check

Xabellee commented 2 years ago

I think I added a string with placeholders for date format for this exact reason, but I'll check

It seems that the date format is hardcoded in mastodon/src/main/java/org/joinmastodon/android/ui/utils/UiUtils.java

private static final DateTimeFormatter DATE_FORMATTER_SHORT_WITH_YEAR=DateTimeFormatter.ofPattern("d MMM uuuu"), DATE_FORMATTER_SHORT=DateTimeFormatter.ofPattern("d MMM");