minor code update
This commit is contained in:
parent
683821f8a8
commit
3263b60dee
|
@ -420,7 +420,6 @@ class WeekFragment : Fragment(), WeeklyCalendar {
|
|||
return
|
||||
}
|
||||
|
||||
//Check if End time for event is start time for another day
|
||||
val isStartTimeDay = Formatter.getDateTimeFromTS(maxTS) == Formatter.getDateTimeFromTS(maxTS).withTimeAtStartOfDay()
|
||||
val numDays = Days.daysBetween(Formatter.getDateTimeFromTS(minTS).toLocalDate(), Formatter.getDateTimeFromTS(maxTS).toLocalDate()).days
|
||||
val daysCnt = if (numDays == 1 && isStartTimeDay) 0 else numDays
|
||||
|
|
|
@ -337,6 +337,7 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
|
|||
if (diff < 0) {
|
||||
eventStartDateTime = screenStartDateTime
|
||||
}
|
||||
|
||||
val isMidnight = Formatter.getDateTimeFromTS(endDateTime.seconds()) == Formatter.getDateTimeFromTS(endDateTime.seconds()).withTimeAtStartOfDay()
|
||||
val numDays = Days.daysBetween(eventStartDateTime, eventEndDateTime).days
|
||||
val daysCnt = if (numDays == 1 && isMidnight) 0 else numDays
|
||||
|
|
Loading…
Reference in New Issue