mirror of
https://github.com/PranshulGG/WeatherMaster.git
synced 2026-10-22 02:52:37 -05:00
date format based on the app locale #744
This commit is contained in:
1 parent
d5a2b30ce2
commit
b35e1eb202
1 file changed
+8
-1
+8
-1
@@ -1,5 +1,6 @@
|
||||
package com.pranshulgg.weather_master_app.feature.daily.ui
|
||||
|
||||
import android.text.format.DateFormat.getBestDateTimePattern
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.padding
|
||||
@@ -20,6 +21,7 @@ import com.pranshulgg.weather_master_app.core.model.weather.toLabel
|
||||
import com.pranshulgg.weather_master_app.core.ui.components.Gap
|
||||
import com.pranshulgg.weather_master_app.core.ui.components.WeatherIconBox
|
||||
import com.pranshulgg.weather_master_app.core.utils.formatters.toDateString
|
||||
import com.pranshulgg.weather_master_app.core.utils.locale.getCurrentAppLocale
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
|
||||
@@ -30,7 +32,12 @@ fun DailyForecastHeroHeader(
|
||||
units: WeatherUnits
|
||||
) {
|
||||
|
||||
val date = toDateString(daily.time, location.timezone)
|
||||
val date = toDateString(
|
||||
daily.time, location.timezone, getBestDateTimePattern(
|
||||
getCurrentAppLocale(),
|
||||
"MMMMdd"
|
||||
)
|
||||
)
|
||||
val context = LocalContext.current
|
||||
|
||||
val maxTemp =
|
||||
|
||||
Reference in new issue
Block a user