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