Fix flakey TimeAgo test by anchoring locale to en_US

Closes: #210
This commit is contained in:
tyiu authored and William Casarin committed 2023-01-02 08:22:17 -08:00
1 parent aec61906ae
commit badbd8a92e
2 files changed
+21 -19

No files matched your search

+1 -2
View File
@@ -7,9 +7,8 @@
import Foundation
public func time_ago_since(_ date: Date) -> String {
public func time_ago_since(_ date: Date, _ calendar: Calendar = Calendar.current) -> String {
let calendar = Calendar.current
let now = Date()
let unitFlags: NSCalendar.Unit = [.second, .minute, .hour, .day, .weekOfMonth, .month, .year]