|
|
|
@ -493,12 +493,12 @@ struct EventInfo {
|
|
|
|
|
if timeIntervalSinceNowForMeeting < 0, timeIntervalSinceNowForMeeting > -300 { |
|
|
|
|
return "started \(event.startDate.shortTimeAgoSinceNow) ago." |
|
|
|
|
} else if event.startDate.isToday { |
|
|
|
|
let timeSince = Date().timeAgo(since: event.startDate) |
|
|
|
|
let timeSince = Date().timeAgo(since: event.startDate).lowercased() |
|
|
|
|
let withoutAn = timeSince.replacingOccurrences(of: "an", with: CLEmptyString) |
|
|
|
|
let withoutAgo = withoutAn.replacingOccurrences(of: "ago", with: CLEmptyString) |
|
|
|
|
// If the user has not turned on seconds granularity for one of the timezones, |
|
|
|
|
// we return "in 12 seconds" which looks weird. |
|
|
|
|
return withoutAgo.contains("seconds") ? "starts soon" : "in \(withoutAgo.lowercased())" |
|
|
|
|
return withoutAgo.contains("seconds") ? "started" : "in \(withoutAgo.lowercased())" |
|
|
|
|
} else if event.startDate.isTomorrow { |
|
|
|
|
let hoursUntil = event.startDate.hoursUntil |
|
|
|
|
return "in \(hoursUntil)h" |
|
|
|
|