mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Add support for Piped accounts and subscriptions
This commit is contained in:
@@ -14,4 +14,13 @@ extension Double {
|
||||
|
||||
return formatter.string(from: self)
|
||||
}
|
||||
|
||||
func formattedAsRelativeTime() -> String? {
|
||||
let date = Date(timeIntervalSince1970: self)
|
||||
|
||||
let formatter = RelativeDateTimeFormatter()
|
||||
formatter.unitsStyle = .full
|
||||
|
||||
return formatter.localizedString(for: date, relativeTo: Date())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user