fix second sutarday and sunday are not highlighted in weekly view

This commit is contained in:
Kazuhiro Ito 2021-03-10 21:24:57 +09:00
parent 75dfe35bff
commit 5819760b55

View File

@ -164,9 +164,5 @@ const val REMINDER_EMAIL = 1
fun getNowSeconds() = System.currentTimeMillis() / 1000L
fun isWeekend(i: Int, isSundayFirst: Boolean): Boolean {
return if (isSundayFirst) {
i == 0 || i == 6
} else {
i == 5 || i == 6
}
return (i + if (isSundayFirst) 6 else 0) % 7 > 4
}