Updated on 2026-08-14
This commit is contained in:
parent
9275e7d178
commit
00974e5d3d
3 changed files with 166 additions and 7 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue