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

Truncate/Human readable option? #172

Closed pdgonzalez872 closed 1 year ago

pdgonzalez872 commented 2 years ago

Hi! Thanks for the library! It's awesome!

We had a use case the other day where we wanted to truncate (make it easier to read) a currency value:

$1,234,567 -> $1.2 m

I was wondering how folks usually tackle this problem. Do you have any suggestions? If this is a desirable feature, would you accept PRs?

Thank you!

Nitrino commented 1 year ago

I think in future versions we will add support for CLDR Number and currency patterns