I'm using this extension-function for getting day of week:
private fun WeatherList.getDayOfWeek() =
LocalDateTime.ofEpochSecond(dt.toLong(), 0, ZoneOffset.UTC).toLocalDate().dayOfWeek
dt - date time in my class in Unix
WeatherList is my class:
@Serializable
@Parcelize
data class WeatherList(
val dt: Int,
val main: Main,
val weather: List<Weather>,
val clouds: Clouds,
val wind: Wind,
val visibility: Int,
val pop: Double,
val sys: Sys,
val dt_txt: String,
) : Parcelable
I was thinking that this should use Locale for output day of week but it's always English. So how to use locale language for day of week?