mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 11:38:51 +01:00
Properly remove AM/PM indicator
I observed that the space before the AM/PM indicator was really an NBSP which caused the original pattern to not match. This pattern, which uses `\s` instead, should match any type of spacing.
This commit is contained in:
@@ -42,7 +42,7 @@ class DateFormatter @Inject constructor(val context: Context) {
|
||||
formattedPattern = formattedPattern
|
||||
.replace("h", "HH")
|
||||
.replace("K", "HH")
|
||||
.replace(" a".toRegex(), "")
|
||||
.replace("\\s+a".toRegex(), "")
|
||||
}
|
||||
|
||||
return SimpleDateFormat(formattedPattern, Locale.getDefault())
|
||||
|
||||
Reference in New Issue
Block a user