Status/Resolution/Reason: Needs Review//Investigate
Reporter/Name(from Bugbase): Aaron Neff / ()
Created: 04/07/2018
Components: Language, Member Functions
Versions: 2016
Failure Type: Others
Found In Build/Fixed In Build: /
Priority/Frequency: Normal /
Locale/System: /
Vote Count: 0
Note: The language should be predictable. If someDataTypeBIF(myVariable) works, then myVariable.someDataTypeBIF() should also work.
This ER is for simpleValue.numberFormat(), for simple values that can be treated as numeric.
Repro:
{code:java}
<cfscript>
simpleValues = [2000,2*1000,2000.0,"2000",createDate(2018,1,1)+1,true];
simpleValues.each(function(element) {
try {
writeOutput(numberFormat(element) & ' | ' & element.numberFormat() & '<br>');
}
catch(any e) {
writeOutput(numberFormat(element) & ' | .numberFormat() doesn''t exist<br>');
}
});
</cfscript>
{code}
Actual result:
2,000 | .numberFormat() doesn't exist
2,000 | .numberFormat() doesn't exist
2,000 | .numberFormat() doesn't exist
2,000 | .numberFormat() doesn't exist
43,102 | .numberFormat() doesn't exist
1 | .numberFormat() doesn't exist
Expected result:
2,000 | 2,000
2,000 | 2,000
2,000 | 2,000
2,000 | 2,000
43,102 | 43,102
1 | 1
Please add these member functions as well:
.DecimalFormat()
.DollarFormat()
.LSCurrencyFormat()
.LSEuroCurrencyFormat()
.LSNumberFormat()
.NumberFormat()
Thanks!,
Attachments:
Comments: