Date, Number formatters on iOS11 does not deliver promised date/currency formats according to user defined Regional settings in Settings.app

Originator:jkirsakmens
Number:rdar://35992346 Date Originated:2017-12-12
Status:Closed Resolved:2018-02-20
Product:iOS SDK Product Version:11.2
Classification:Bug:UI/UX Reproducible:Always
 
Area:
Foundation

Summary: 
Incorrect/inconsistent NSDateFormatter/DateFormatter behaviour on iOS11 - formatters with current user locale does not provide date/currency formatting  according to user defined Regional settings in Settings.app.
On iOS 10 current user locale was user preffered language+region, on iOS11 it is app language+region. 
Even apps that are not localized for the user preffered language (most of apps and even Apple itself does dot localize for small languages like Latvian) should respect user selected region settings for date/currency formatting promised in the Settings.app

Steps to Reproduce:
1) Launch Simulator or device with iOS11, launch Settings.app and n the General-Langaue&Region section set Preffered language - Latviešu (Latvian) and Region - Latvia (see promised date, currency formatting in the attached screenshot)
2) Run attached project tests on simulator/device
For comparision run project on iOS10 with the same language/region settings.

Expected Results:
Date and Number formatters with currentLocale should respect promised Regional settings set by user in the Settings.app (even is app itself is not localized for Latvian language - this is case with all small languages that does not get localizations from most apps).

Actual Results:
Date formatter uses American date seperator "/" instead or Latvian date seperator ".", returns English date strings.
Currency formatting style does not respect correct position for currency sign.

Version/Build:
iOS11 SDK, IOS 11.2 (15C114)

Configuration:
Xcode 9.2 (9C40b)


attached
bug-regional-formatters.zip, 37 KB
screenshot-regional-settings.jpeg, 243.1 KB

Comments

Closed, intended behaviour on iOS11

"In iOS 11 and macOS High Sierra, the notion of “current locale” has changed such that, instead of always returning a locale that corresponds to the first language in Locale.preferredLanguages, it will instead match the language corresponding to Bundle.main.preferred. This is to ensure that dates, times, numbers, and other localized content that is driven by the locale is shown in a language consistent with the localization that the app is launched in. This new behavior currently only takes effect if Locale.preferredLanguages contains more than 1 language."

By jkirsakmens at Feb. 21, 2018, 5:05 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!