diff --git a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt index 623dae5b..f6339f6a 100644 --- a/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt +++ b/app/src/main/kotlin/org/fossify/clock/helpers/Constants.kt @@ -241,7 +241,7 @@ fun getTimeOfNextAlarm(alarmTimeInMinutes: Int, days: Int): Calendar { } else { val now = Calendar.getInstance() for (i in 0..8) { - val currentDay = (nextAlarmTime.get(Calendar.DAY_OF_WEEK) + 5) % 7 + val currentDay = getBitForCalendarDay(Calendar.DAY_OF_WEEK) if (isAlarmEnabledForDay(currentDay, days) && now < nextAlarmTime) { break } else {