elixirmoney / money

Elixir library for working with Money safer, easier, and fun... Is an interpretation of the Fowler's Money pattern in fun.prog.
https://hex.pm/packages/money/
MIT License
826 stars 139 forks source link

Allow specify the display_options for each custom_currency #224

Closed gabrielperales closed 2 months ago

gabrielperales commented 2 months ago

Hi!, we are using Money in our app with different currencies like dollars and euros, among others. Money currently only allows having the default formatting configuration, but we would like custom ones for each currency because, for example, euros usually have the symbol at the right, and dollars have it at the left.

I've checked the code and I think it will be just to check if the configuration has the keys symbol_on_right, symbol_space ... here as that function is already doing with the symbol.

I can try to make a PR with the changes if you think it is a useful feature.