Skip to content

Tag: number-formatting

How to format decimals in a currency format?

Is there a way to format a decimal as following: If it is a round number, omit the decimal part. Otherwise format with two decimal places. Answer I doubt it. The problem is that 100 is never 100 if it’s a float, it’s normally 99.9999999999 or 100.0000001 or something like that. If you do want to format it that way,