NSDateComponentsFormatter outputs "mn" for minutes instead of "min"

Number:rdar://35906830 Date Originated:07-déc.-2017 01:16 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:11.2
Classification:Other Bug Reproducible:Always
Please read entirely before closing as dupe, thank you :)

This is a duplicate of 25221084, which is a duplicate of 21332711. BUT, I am convinced that this is a real bug, and it should be addressed.

If the user's locale is set to French (fr_FR) when using the NSDateComponentsFormatter with the unitsStyle set to NSDateComponentsFormatterUnitsStyleShort, the output for minutes is "mn" instead of the legal "min".

Steps to Reproduce:
1. Instanciate a NSDateComponentsFormatter
2. Set the NSDateComponentsFormatter unitsStyle to NSDateComponentsFormatterUnitsStyleShort
3. Either set your locale to French, or set the NSDateComponentsFormatter's calendar to one with its locale set to French "fr_FR"
4. Instanciate a NSDateComponent
5. Set the NSDateComponent minutes to something not null (e.g. 45)
6. Format the NSDateComponent using the NSDateComponentsFormatter created at 1. (using stringFromDateComponents:)

Expected Results:
The output of the NSDateComponentsFormatter is "45 min"

Actual Results:
The output of the NSDateComponentsFormatter is "45 mn"

(Notice the missing "i" in the minutes abbreviation)


This is not only super obvious for a native French speaker ("min" is used everywhere, I've never seen "mn" anywhere), but it's also the only legal abbreviation (save "m" for some special case) as written in the Journal Officiel of 1975 :


Attached is a Swift Playground reproducing the issue.



By guillaume.algis at Dec. 7, 2017, 12:21 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!