We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e72b19 commit 0ed177dCopy full SHA for 0ed177d
app/src/main/java/org/wikipedia/util/DateUtil.kt
@@ -182,7 +182,7 @@ object DateUtil {
182
fun formatRelativeTime(instant: Instant): CharSequence {
183
val localDate = LocalDateTime.ofInstant(instant, ZoneId.systemDefault()).toLocalDate()
184
val weeks = localDate.until(LocalDate.now(), ChronoUnit.WEEKS)
185
- val flags = if (weeks in 1..10) DateUtils.WEEK_IN_MILLIS else 0L
186
- return DateUtils.getRelativeTimeSpanString(instant.toEpochMilli(), System.currentTimeMillis(), flags)
+ val minResolution = if (weeks in 1..10) DateUtils.WEEK_IN_MILLIS else 0L
+ return DateUtils.getRelativeTimeSpanString(instant.toEpochMilli(), System.currentTimeMillis(), minResolution)
187
}
188
0 commit comments