NSNumberFormatter: maximumFractionDigits behaves contrary to documentation

Originator:daniel
Number:rdar://13252449 Date Originated:20-Feb-2013 02:40 PM
Status:Closed Resolved:09-Aug-2013
Product:Documentation Product Version:6.0
Classification:Other Bug Reproducible:Always
 
Summary:
Contrary to what the docs state, "maximumFractionDigits" does not affect the handling of an input string, when calling -numberFromString:.
Instead, it affects the formatting of the string retrieved from -stringFromNumber:.

The actual behavior is well and good, but the documentation left me searching for a way to define the number of digits that are displayed without explicitly defining the positive/negative format string.

Steps to Reproduce:
not applicable.

Expected Results:
Documentation for -setMaximumFractionDigits: and -maximumFractionDigits: states that this setting defines the number of digits after the decimal separator when calling -stringFromNumber:.

Actual Results:
Documentation implies that this setting defines how many characters after the decimal separator are used when interpreting the input value.

Regression:

Notes:

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!