money icon indicating copy to clipboard operation
money copied to clipboard

Wrong output with sign_before_symbol: true for currencies with symbol after the number

Open grk opened this issue 3 years ago • 0 comments

Formatting with sign_before_symbol: true results in weird output for currencies that use symbol after the amount. Compare those two for example:

Money.from_amount(-1.23, "USD").format(sign_before_symbol: true)
=> "-$1.23"
Money.from_amount(-1.23, "PLN").format(sign_before_symbol: true)
=> "1,23 -zł"

While the USD result is correct, for PLN I'd expect the output to be -1,23 zł.

Is there any setting that I missed that would make format report the minus sign at the beginning for all currencies?

grk avatar Jan 23 '22 17:01 grk