feat/use-international-hour-format: Format hours in the Weather app as "7:00" instead of "7 h" for better international understanding
- Commit
d65f1b26c477371fda9507b224a80ce87eb8fbb3- Author
- Marin <[email protected]>
- When
- 2026-11-08 15:46 UTC (28 days ago)
- Parents
34d3e1c
Diff
weather/src/main/java/com/vayunmathur/weather/domain/DateTimeFormat.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/domain/DateTimeFormat.kt b/weather/src/main/java/com/vayunmathur/weather/domain/DateTimeFormat.ktindex 2d9720ba31..7268b4bc89 100644--- a/weather/src/main/java/com/vayunmathur/weather/domain/DateTimeFormat.kt+++ b/weather/src/main/java/com/vayunmathur/weather/domain/DateTimeFormat.kt@@ -82,7 +82,7 @@ fun formatHourAxisLabel(epochSec: Long, use24Hour: Boolean, utcOffsetSeconds: In /** Hourly-strip label "3 PM" / "9" for an epoch second in the location's zone. */ fun formatStripHour(epochSec: Long, use24Hour: Boolean, utcOffsetSeconds: Int? = null): String =- localTimeAt(epochSec, utcOffsetSeconds).format(if (use24Hour) HourOfDayBare else HourAmPm)+ localTimeAt(epochSec, utcOffsetSeconds).format(if (use24Hour) HourOfDayWithZero else HourAmPm) /** Clock time "3:05 PM" / "15:00" for an epoch second in the location's zone. */ fun formatClockTime(epochSec: Long, use24Hour: Boolean, utcOffsetSeconds: Int? = null): String =