Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e77d99f authored by Moez Bhatti's avatar Moez Bhatti
Browse files

Fix 24h timestamps when language is Japanese

Closes #1547
parent 11e733bf
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -39,7 +39,10 @@ class DateFormatter @Inject constructor(val context: Context) {
        var formattedPattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), pattern)

        if (DateFormat.is24HourFormat(context)) {
            formattedPattern = formattedPattern.replace("h", "HH").replace(" a".toRegex(), "")
            formattedPattern = formattedPattern
                    .replace("h", "HH")
                    .replace("K", "HH")
                    .replace(" a".toRegex(), "")
        }

        return SimpleDateFormat(formattedPattern, Locale.getDefault())