mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-23 06:08:52 +01:00
use lowercase check for am and pm because different os can use different case
This commit is contained in:
@@ -174,9 +174,9 @@ class SpeakManager() {
|
|||||||
|
|
||||||
val timeWithSplitAmPmForSpeech = getFormatter("h:mm a").format(date).let {
|
val timeWithSplitAmPmForSpeech = getFormatter("h:mm a").format(date).let {
|
||||||
if (it.length < 2) it
|
if (it.length < 2) it
|
||||||
else when (it.substring((it.length - 2))) {
|
else when (it.substring((it.length - 2)).lowercase()) {
|
||||||
"AM" -> "${it.substring(0, (it.length - 2))}A M"
|
"am" -> "${it.substring(0, (it.length - 2))}A M"
|
||||||
"PM" -> "${it.substring(0, (it.length - 2))}P M"
|
"pm" -> "${it.substring(0, (it.length - 2))}P M"
|
||||||
else -> it // locales that don't use am/pm
|
else -> it // locales that don't use am/pm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user