What am I doing wrong with allowsFractionalUnits on NSDateComponentsFormatter?

According to Open Radar #32024200:

After doing some digging (disassembling Foundation), it looks like every call to -[_unitFormatter stringFromNumber:] in -[NSDateComponentsFormatter _stringFromDateComponents:] is passed an +[NSNumber numberWithInteger:] which drops floating point data.

You’re not doing anything wrong. The flag is simply broken.

Leave a Comment

tech