mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-16 14:07:28 +01:00
Fix off by 1 dates (fixes #6791)
This commit is contained in:
@@ -112,8 +112,8 @@ fun Date.toRelativeString(
|
||||
val days = difference.floorDiv(MILLISECONDS_IN_DAY).toInt()
|
||||
return when {
|
||||
difference < 0 -> context.getString(R.string.recently)
|
||||
difference < MILLISECONDS_IN_DAY -> context.getString(R.string.relative_time_today)
|
||||
difference < MILLISECONDS_IN_DAY.times(range) -> context.resources.getQuantityString(
|
||||
difference <= MILLISECONDS_IN_DAY -> context.getString(R.string.relative_time_today)
|
||||
difference <= MILLISECONDS_IN_DAY.times(range) -> context.resources.getQuantityString(
|
||||
R.plurals.relative_time,
|
||||
days,
|
||||
days
|
||||
|
||||
Reference in New Issue
Block a user