mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 13:33:42 +00:00
Back to previous date format
This commit is contained in:
parent
8631389b8f
commit
b7f0ec4bfb
@ -217,15 +217,7 @@ struct Video: Identifiable, Equatable, Hashable {
|
||||
}
|
||||
|
||||
var publishedDate: String? {
|
||||
guard let publishedAt else {
|
||||
return (published.isEmpty || published == "0 seconds ago") ? nil : published
|
||||
}
|
||||
|
||||
let dateFormatter = DateFormatter()
|
||||
dateFormatter.dateStyle = .short
|
||||
dateFormatter.timeStyle = .none
|
||||
|
||||
return dateFormatter.string(from: publishedAt)
|
||||
(published.isEmpty || published == "0 seconds ago") ? publishedAt?.timeIntervalSince1970.formattedAsRelativeTime() : published
|
||||
}
|
||||
|
||||
var viewsCount: String? {
|
||||
|
Loading…
Reference in New Issue
Block a user