-
Notifications
You must be signed in to change notification settings - Fork 207
Open
Labels
enhancementNew feature or requestNew feature or request
Description
We recently switched over to using FormatStyles instead of Dateformatters.
I noticed some odd behavior with the relative date format style.
import Foundation
let date = Calendar.autoupdatingCurrent.date(byAdding: .second, value: 90, to: .now)!
let date2 = Calendar.autoupdatingCurrent.date(byAdding: .second, value: 89, to: .now)!
date.formatted(.relative(presentation: .numeric, unitsStyle: .wide)) // in 2 minutes
date2.formatted(.relative(presentation: .numeric, unitsStyle: .wide)) // in 1 minuteIs this the intended behaviour?
Using legacy RelativeDateFormatters, it says "in 1 minute" until you actually reach the 2 min mark
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request