November 2, 2019
Quick Tip: After 20 years developing with ColdFusion, I finally realized numberFormat() can round.
Like
(1)
Comments
(1)
1
1
I’ve been developing ColdFusion applications for about 20 years and sometimes I feel like I’m still learning. On occasion it takes stumbling across a feature to realize how something works.
Consider the following code:
<cfoutput> #NumberFormat(1.5)# </cfoutput>
Now… some people might look at that and think, “of course it’s going to display 2.” Honestly, I had no idea. numberFormat() without a mask will round numbers. That seems strange to me, frankly, but live and learn.
Anyone know of any other eccentricities of functions?