Skip to content

Commit b9a8d27

Browse files
committed
feat: Switch to 12-hour time format in routines
- Update `rememberTimePickerState` to use 12-hour mode in `CreateRoutineScreen`. - Update `formatTime` utility to use "hh:mm a" pattern in both `CreateRoutineScreen` and `RoutinesScreen`.
1 parent 1c4bbd1 commit b9a8d27

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Reef/src/main/java/dev/pranav/reef/screens/CreateRoutineScreen.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ private fun TimePickerDialog(
11691169
val timePickerState = rememberTimePickerState(
11701170
initialHour = initialTime.hour,
11711171
initialMinute = initialTime.minute,
1172-
is24Hour = true
1172+
is24Hour = false
11731173
)
11741174

11751175
AlertDialog(
@@ -1445,7 +1445,7 @@ private fun loadAccessibleApps(context: android.content.Context): List<Pair<Stri
14451445
}
14461446

14471447
private fun formatTime(time: LocalTime): String {
1448-
val formatter = DateTimeFormatter.ofPattern("HH:mm")
1448+
val formatter = DateTimeFormatter.ofPattern("hh:mm a")
14491449
return time.format(formatter)
14501450
}
14511451

Reef/src/main/java/dev/pranav/reef/screens/RoutinesScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,6 @@ private fun formatSchedule(schedule: RoutineSchedule?, context: android.content.
316316
}
317317

318318
private fun formatTime(time: LocalTime): String {
319-
val formatter = DateTimeFormatter.ofPattern("HH:mm")
319+
val formatter = DateTimeFormatter.ofPattern("hh:mm a")
320320
return time.format(formatter)
321321
}

0 commit comments

Comments
 (0)