Skip to content

Commit

Permalink
Change comment date format
Browse files Browse the repository at this point in the history
  • Loading branch information
bubelov committed Oct 24, 2024
1 parent 7b92a35 commit 998af69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/androidMain/kotlin/element/CommentsAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class CommentsAdapter :
fun bind(item: ElementComment) {
binding.apply {
message.text = item.comment
val dateFormat = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.SHORT)
date.text = dateFormat.format(OffsetDateTime.parse(item.createdAt))
val dateFormat = DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM)
date.text = OffsetDateTime.parse(item.createdAt).toLocalDate().format(dateFormat)
}
}
}
Expand Down

0 comments on commit 998af69

Please sign in to comment.