mirror of
https://github.com/metabolist/metatext.git
synced 2024-06-02 13:40:13 +00:00
spelling: relative
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
parent
e0ca0ac06e
commit
9160ec32d3
|
@ -37,7 +37,7 @@ extension Date {
|
||||||
if
|
if
|
||||||
let oneWeekAgo = calendar.date(byAdding: DateComponents(weekOfMonth: -1), to: now),
|
let oneWeekAgo = calendar.date(byAdding: DateComponents(weekOfMonth: -1), to: now),
|
||||||
oneWeekAgo < self {
|
oneWeekAgo < self {
|
||||||
return Self.realtiveTimeFormatter.localizedString(for: self, relativeTo: Date())
|
return Self.relativeTimeFormatter.localizedString(for: self, relativeTo: Date())
|
||||||
}
|
}
|
||||||
|
|
||||||
return Self.accessibilityFullDateComponentsFormatter.string(from: self)
|
return Self.accessibilityFullDateComponentsFormatter.string(from: self)
|
||||||
|
@ -92,7 +92,7 @@ private extension Date {
|
||||||
return dateFormatter
|
return dateFormatter
|
||||||
}()
|
}()
|
||||||
|
|
||||||
private static let realtiveTimeFormatter: RelativeDateTimeFormatter = {
|
private static let relativeTimeFormatter: RelativeDateTimeFormatter = {
|
||||||
let dateFormatter = RelativeDateTimeFormatter()
|
let dateFormatter = RelativeDateTimeFormatter()
|
||||||
|
|
||||||
dateFormatter.unitsStyle = .full
|
dateFormatter.unitsStyle = .full
|
||||||
|
|
Loading…
Reference in a new issue