diff --git a/Meshtastic/Extensions/Date.swift b/Meshtastic/Extensions/Date.swift index f9acd014..d8cdd30f 100644 --- a/Meshtastic/Extensions/Date.swift +++ b/Meshtastic/Extensions/Date.swift @@ -10,7 +10,7 @@ import Foundation extension Date { var lastHeard: String { - if self.timeIntervalSince1970 > 0 && self < Calendar.current.date(byAdding: .day, value: 1, to: Date())! { + if self.timeIntervalSince1970 > 0 && self < Calendar.current.date(byAdding: .year, value: 1, to: Date())! { formatted() } else { "unknown.age".localized @@ -20,7 +20,7 @@ extension Date { func formattedDate(format: String) -> String { let dateformat = DateFormatter() dateformat.dateFormat = format - if self.timeIntervalSince1970 > 0 && self < Calendar.current.date(byAdding: .year, value: 5, to: Date())! { + if self.timeIntervalSince1970 > 0 && self < Calendar.current.date(byAdding: .year, value: 1, to: Date())! { return dateformat.string(from: self) } else { return "unknown.age".localized