From b35e1eb202b29247a3bd2b8434ea1305d0d6e73d Mon Sep 17 00:00:00 2001 From: PranshulGG Date: Sun, 16 Aug 2026 12:55:49 +0530 Subject: [PATCH] date format based on the app locale #744 --- .../feature/daily/ui/DailyForecastHeroHeader.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/feature/daily/ui/DailyForecastHeroHeader.kt b/app/src/main/java/com/pranshulgg/weather_master_app/feature/daily/ui/DailyForecastHeroHeader.kt index e136f6a00..f63f0dcc3 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/feature/daily/ui/DailyForecastHeroHeader.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/feature/daily/ui/DailyForecastHeroHeader.kt @@ -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 =