Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 04/03/2012
Components: Documentation
Versions: 9.0
Failure Type:
Found In Build/Fixed In Build: 9.0 /
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Win XP All
Vote Count: 0
G'day
Consider this code:
[code]
<cfoutput>
<cfset number = 111.1>
<cfset mask = "9.99">
Number: #number#; Mask: #mask#; Expected: 111.1; Actual: #numberformat(number, mask)# (111.10)<br />
<cfset mask = "9999.99">
Number: #number#; Mask: #mask#; Expected: 111.1; Actual: #numberformat(number, mask)# (111.10)<br />
</cfoutput>
[/code]
As the "9" char in the mask is an [i]optional[/i] digit placeholder, the output should be 111.1 in both of these examples. It seems the handling of the "9" is incorrect on the RHS of the decimal point: it behaves like a "0" mask character (which zero-pad the string if necessary).
I don't think I am missing anything here?
Now... Rupesh maintains that this actually working as designed (!!!), so all we can expect by way of fix is for the docs to be updated to indicate that Adobe have implement three different ways of expressing a required zero, but not that reflect an optional one.
So: pls update the docs accordingly.
--
Adam
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3156025
External Customer Info:
External Company:
External Customer Name: Adam Cameron.
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: