Clean up object graph updates

This commit is contained in:
Garth Vander Houwen 2023-09-04 20:17:09 -07:00
parent 0d5f36d9cb
commit 1c19ae11e6
10 changed files with 43 additions and 39 deletions

View file

@ -15,6 +15,10 @@ extension Date {
func formattedDate(format: String) -> String {
let dateformat = DateFormatter()
dateformat.dateFormat = format
return dateformat.string(from: self)
if self > Calendar.current.date(byAdding: .year, value: -5, to: Date())! {
return dateformat.string(from: self)
} else {
return "unknown.age".localized
}
}
}