Back to previous date format

This commit is contained in:
Arkadiusz Fal 2022-12-19 12:13:27 +01:00
parent 8631389b8f
commit b7f0ec4bfb

View File

@ -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? {