Updated on 2026-08-14

This commit is contained in:
Tangem 2026-02-16 09:28:22 +01:00
parent 9275e7d178
commit 00974e5d3d
3 changed files with 166 additions and 7 deletions

View file

@ -10,10 +10,13 @@ import com.tangem.utils.StringsSigns
import org.joda.time.DateTime
internal fun mapFormattedDate(createdAt: String): TextReference {
val formattedDate = getFormattedDate(
createdAt = createdAt,
now = DateTime.now(),
)
val formattedDate = runCatching {
getFormattedDate(
createdAt = createdAt,
now = DateTime.now(),
)
}.getOrElse { FormattedDate.FullDate("") }
return when (formattedDate) {
is FormattedDate.FullDate -> TextReference.Str(value = formattedDate.date)
is FormattedDate.HoursAgo -> TextReference.PluralRes(