NSDateComponentsFormatter has an incorrect formatting style for French (France)

Originator:clement.padovani
Number:rdar://28692962 Date Originated:10/10/2016
Status:Open Resolved:No
Product:iOS SDK Product Version:iOS 10.0 GM up until iOS 10.1 beta 2 (14B67)
Classification:Other Bug Reproducible:Always
 
Summary:
When setting `NSDateComponentsFormatter`’s units’ style (-[NSDateComponentsFormatter setUnitsStyle:]`) when dealing with the French (France) locale (fr-FR) it incorrectly uses the following units:

- “s” instead of “sec”

- “m” instead of “min”

etc.

I have tested this with the American English locale (en-US) and the issue doesn’t appear (i.e. it returns “sec”, etc.)

As a native French speaker, the returned strings are the abbreviations and not the “short” style.

Steps to Reproduce:
- Use the French (France) locale (either via the schemes menu or directly on the device itself, it doesn’t really matter)

- Create an NSDateComponentsFormatter, set its units’ style to NSDateComponentsFormatterUnitsStyleShort

- Request a formatted string

Expected Results:
For the formatter to return a “short” style of the units

Actual Results:
The formatter returns an abbreviated version of the units

Version:
iOS 10.0 GM up until iOS 10.1 beta 2 (14B67)

Notes:
I did notice that the abbreviated version doesn’t have a space in between the number and the unit and that the “short” version does have a space.

Configuration:
iOS Simulator & iPhone 6s +

Attachments:

Comments


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!