mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
check if given day is today nicer
This commit is contained in:
@@ -125,11 +125,10 @@ class MonthlyCalendarImpl(val mCallback: MonthlyCalendar, val mContext: Context)
|
||||
}
|
||||
|
||||
private fun isToday(targetDate: DateTime, curDayInMonth: Int): Boolean {
|
||||
try {
|
||||
return targetDate.withDayOfMonth(curDayInMonth).toString(Formatter.DAYCODE_PATTERN) == mToday
|
||||
} catch(ignored: Exception) {
|
||||
return false
|
||||
}
|
||||
return if (curDayInMonth > targetDate.dayOfMonth().maximumValue)
|
||||
false
|
||||
else
|
||||
targetDate.withDayOfMonth(curDayInMonth).toString(Formatter.DAYCODE_PATTERN) == mToday
|
||||
}
|
||||
|
||||
private val monthName: String
|
||||
|
Reference in New Issue
Block a user