Fix compilation error. toEpochDays() now returns a Long.
This commit is contained in:
parent
0a2a6361b6
commit
1abe101b06
1 changed files with 2 additions and 2 deletions
|
|
@ -33,8 +33,8 @@ class DefaultDateFormatterDay @Inject constructor(
|
|||
return if (useRelative) {
|
||||
val dayDiff = today.date.toEpochDays() - dateToFormat.date.toEpochDays()
|
||||
when (dayDiff) {
|
||||
0 -> dateFormatters.getRelativeDay(timestamp, "Today")
|
||||
1 -> dateFormatters.getRelativeDay(timestamp, "Yesterday")
|
||||
0L -> dateFormatters.getRelativeDay(timestamp, "Today")
|
||||
1L -> dateFormatters.getRelativeDay(timestamp, "Yesterday")
|
||||
else -> if (dayDiff < 7) {
|
||||
dateFormatters.formatDateWithDay(dateToFormat)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue