show the age only if it contains a year
This commit is contained in:
parent
169f81b78a
commit
2e11262b38
1 changed files with 1 additions and 1 deletions
|
@ -256,7 +256,7 @@ fun String.getDateTimeFromDateString(showYearsSince: Boolean, viewToUpdate: Text
|
|||
}
|
||||
|
||||
var formattedString = date.toString(localPattern)
|
||||
if (showYearsSince) {
|
||||
if (showYearsSince && hasYear) {
|
||||
formattedString += " (${Years.yearsBetween(date, DateTime.now()).years})"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue