mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
fix second sutarday and sunday are not highlighted in weekly view
This commit is contained in:
@@ -164,9 +164,5 @@ const val REMINDER_EMAIL = 1
|
|||||||
fun getNowSeconds() = System.currentTimeMillis() / 1000L
|
fun getNowSeconds() = System.currentTimeMillis() / 1000L
|
||||||
|
|
||||||
fun isWeekend(i: Int, isSundayFirst: Boolean): Boolean {
|
fun isWeekend(i: Int, isSundayFirst: Boolean): Boolean {
|
||||||
return if (isSundayFirst) {
|
return (i + if (isSundayFirst) 6 else 0) % 7 > 4
|
||||||
i == 0 || i == 6
|
|
||||||
} else {
|
|
||||||
i == 5 || i == 6
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user