Format number to english notation (1,235)

number:to_english_notation(FLOAT $number, INT $decimal_points=2) : STRING

number:to_english_notation(10)
#=> "10.00"

number:to_english_notation(10, 0)
#=> "10"

number:to_english_notation(10, 3)
#=> "10.000"

number:to_english_notation(10.32)
#=> "10.32"

number:to_english_notation(12390.32)
#=> "12,390.32"

number:to_english_notation(128390.32)
#=> "128,390.32"

number:to_english_notation(12823390.32)
#=> "12,823,390.32"

number:to_english_notation(0)
#=> "0.00"

number:to_english_notation(-10)
#=> "-10.00"

Copyright ©2013-2022 SunSed®. All rights reserved.