tracker issue : CF-4201889

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] ER for: simpleValue.numberFormat()

| View in Tracker

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:

Hi Adobe, Can these please be included in this ticket, since they are related? - .DecimalFormat() - .DollarFormat() - .LSCurrencyFormat() - .LSEuroCurrencyFormat() - .LSNumberFormat() - .NumberFormat() Thanks!, -Aaron
Comment by Aaron N.
27509 | April 12, 2018 09:05:16 AM GMT
Hi Adobe, As promised, .format() would be removed from Numeric. Could you please confirm? Since Numeric has many format() functions, the above 6 in my previous comment should be added. Thanks!, -Aaron
Comment by Aaron N.
27636 | May 02, 2018 04:20:24 AM GMT