Incorrect NSDateComponentsFormatter output in Russian locale

Originator:gleb.arkhipov
Number:rdar://22738300 Date Originated:17 Sep 2015
Status:Open Resolved:
Product:iOS SDK Product Version:Xcode 7.0 (7A220) playground
Classification:Other Bug Reproducible:Always
 
Summary:
When formatting date components using NSDateComponentsFormatter with SpellOut style, the number forms are spelled incorrectly for minutes and seconds in some cases.

Steps to Reproduce:
let calendar = NSCalendar(calendarIdentifier: NSCalendarIdentifierGregorian)!
calendar.locale = NSLocale(localeIdentifier: "ru_RU")

let formatter = NSDateComponentsFormatter()
formatter.unitsStyle = .SpellOut
formatter.calendar = calendar

let out = formatter.stringFromTimeInterval(77501)!

// Then examine the value of `out` variable

Expected Results:
"двадцать один час, тридцать одна минута и сорок одна секунда"

Actual Results:
"двадцать один час, тридцать один минута и сорок один секунда"

Version:
Xcode 7.0 (7A220), OS X 10.10.5

Notes:
The output is incorrect for minute and second values equal to 1, 21, 31, 41 and 51.

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!