With iOS16, we have a new setting in the Language&Region settings menu that we can change the short format of the date.
I have a text and to format it, when I use the old DateFormatter API with short dateStyle, after I change the date format in the settings menu, my text gets updated.
However when I use the new iOS15 API with numerical DateStyle, it does not get updated.
Here's the code. This one is the one working:(Old API):
let formatter = DateFormatter()
formatter.dateStyle = .short
formatter.timeStyle = .none
let myText = formatter.string(from: Date.now)
This is the new API and it does not get updated when I change the date format in Languge&Region settings menu:
let myText = Date.now.formatted(date: .numeric, time: .omitted)