Skip to content

Commit

Permalink
Fix variable name.
Browse files Browse the repository at this point in the history
  • Loading branch information
Isira-Seneviratne committed Sep 14, 2023
1 parent 5e72b19 commit 0ed177d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/org/wikipedia/util/DateUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ object DateUtil {
fun formatRelativeTime(instant: Instant): CharSequence {
val localDate = LocalDateTime.ofInstant(instant, ZoneId.systemDefault()).toLocalDate()
val weeks = localDate.until(LocalDate.now(), ChronoUnit.WEEKS)
val flags = if (weeks in 1..10) DateUtils.WEEK_IN_MILLIS else 0L
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)
}
}

0 comments on commit 0ed177d

Please sign in to comment.