Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixed locale is handled incorrectly #49

Open
Cyberbeni opened this issue Oct 8, 2024 · 2 comments
Open

Mixed locale is handled incorrectly #49

Cyberbeni opened this issue Oct 8, 2024 · 2 comments

Comments

@Cyberbeni
Copy link

Mixed locale (like "en_HU") used to work correctly in iOS 16, got broken in iOS 17 and was fixed in iOS 18 but it is still working incorrectly with the swift:6.0.1 docker container.

Given the following example with "hu" Locale:

let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .long
dateFormatter.timeStyle = .long
dateFormatter.locale = Locale(identifier: "hu")
print(dateFormatter.string(from: now))
// 2024. október 8. 9:22:33 GMT

And then the same with "en_HU" Locale:

let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .long
dateFormatter.timeStyle = .long
dateFormatter.locale = Locale(identifier: "en_HU")
print(dateFormatter.string(from: now))
// 8 October 2024 9:22:33 GMT

I would expect the output to be 2024. October 8. 9:22:33 GMT, so YMD ordering, 24 hour time, English month name.
Feedback Assistant ticket for the original issue on iOS: FB13227120
Also had a WWDC lab regarding this issue, don't know if it has a reference number (or if it is already attached internally to the Feedback Assistant issue).

@itingliu itingliu transferred this issue from swiftlang/swift-foundation Oct 11, 2024
@itingliu
Copy link

This is in fact an ICU issue. I'm transferring this to swift-foundation-icu to track the fix here.

@itingliu
Copy link

I believe this will be fixed while we upstream the latest ICU update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants