mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-06-05 22:19:17 +02:00
adding more dayless alarm improvements
This commit is contained in:
@ -80,19 +80,18 @@ fun formatTime(showSeconds: Boolean, use24HourFormat: Boolean, hours: Int, minut
|
||||
}
|
||||
}
|
||||
|
||||
fun getTodayBit(): Int {
|
||||
val calendar = Calendar.getInstance()
|
||||
val dayOfWeek = (calendar.get(Calendar.DAY_OF_WEEK) + 5) % 7
|
||||
return 2.0.pow(dayOfWeek).toInt()
|
||||
}
|
||||
|
||||
fun getNextDayBit(): Int {
|
||||
fun getTomorrowBit(): Int {
|
||||
val calendar = Calendar.getInstance()
|
||||
calendar.add(Calendar.DAY_OF_WEEK, 1)
|
||||
val dayOfWeek = (calendar.get(Calendar.DAY_OF_WEEK) + 5) % 7
|
||||
return 2.0.pow(dayOfWeek).toInt()
|
||||
}
|
||||
|
||||
fun getCurrentDayMinutes(): Int {
|
||||
val calendar = Calendar.getInstance()
|
||||
return calendar.get(Calendar.HOUR_OF_DAY) * 60 + calendar.get(Calendar.MINUTE)
|
||||
}
|
||||
|
||||
fun getAllTimeZones() = arrayListOf(
|
||||
MyTimeZone(1, "GMT-11:00 Midway", "Pacific/Midway"),
|
||||
MyTimeZone(2, "GMT-10:00 Honolulu", "Pacific/Honolulu"),
|
||||
|
Reference in New Issue
Block a user