kipcole9 / money

Elixir implementation of Money with Currency
https://hex.pm/packages/ex_money
Other
572 stars 48 forks source link

Create comparison helper functions #141

Closed emaiax closed 2 years ago

emaiax commented 2 years ago

This PR will add three new functions to compare Money types, zero?, negative? and positive?.

kipcole9 commented 2 years ago

Thanks for the PR @emaiax, much appreciated. I'd prefer the first function is zero?/1 rather than is_zero?/1 since the is_ form typically means its guard compatible which of course this is not. Oh, just checked the PR and you do actually call it zero?/1 which is great.

I'll just make some doc adjustments to be consistent with the rest of the project and release a new version on April 6th (there is a new CLDR release on April 6th which I'll align with). Hope that's ok from a timing perspective?

emaiax commented 2 years ago

@kipcole9 not a rush. thank you so much for merging this! 🙏