The following code return in english format however I want arabic
currentDate.format(DateFormatter)
currentTime.format(TimeFormatter)
example:
expected: ١٢:٠٠
actual: 12:00
...
var dateString: String = ""
var timeString: String = ""
...
val DateFormatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL).withLocale(Locale( "ar"))
val TimeFormatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT).withLocale(Locale( "ar"))
val currentDate = LocalDate.now()
val currentTime = LocalTime.now()
dateString = currentDate.format(DateFormatter)
timeString = currentTime.format(TimeFormatter)
...