dswitzer
08/10/2022, 11:32 AMisNumeric()
with a value run through the numberFormat()
function. I would expect the following code to return true
, but it's returning `false`:
dump(isNumeric(numberFormat(-2360, "9,999.9")));
However, all of the following variations do return `true`:
dump(isNumeric(-2360));
dump(isNumeric(-2360.0));
dump(isNumeric("-2360.0"));
dump(isNumeric(numberFormat(-236, "9,999.9")));
Now strangely enough, it appears that ACF & Lucee both have the same behavior. You can see this behavior on TryCF:
https://www.trycf.com/gist/6928301c037034c917e8771700dad03c/lucee5?theme=monokai
Am I misunderstanding something or should isNumeric(numberFormat(-2360, "9,999.9"))
indeed be returning true
?Rodney
08/10/2022, 11:56 AMdswitzer
08/10/2022, 11:58 AMfalse
. I suppose that makes sense.thisOldDave
08/10/2022, 1:22 PMdswitzer
08/10/2022, 2:08 PMzackster
08/10/2022, 4:26 PMEvil Ware
09/01/2022, 11:06 AM