elixir-cldr / cldr_units

Unit formatting (volume, area, length, ...) functions for the Common Locale Data Repository (CLDR)
Other
16 stars 13 forks source link

API to get the value of a Cldr.Unit struct #6

Closed LostKobrakai closed 6 years ago

LostKobrakai commented 6 years ago

I'm using Cldr.Unit not only because of it's formatting capabilities, but also as general purpose unit type within my system. So in some places it might be nice to have an API method for getting back the value of the struct as well.

kipcole9 commented 6 years ago

@LostKobrakai Thanks as always for the constructive feedback. And I've not forgotten our previous conversation and your request either. I'll be able to make a proposal for this issue over the weekend. Is that timing acceptable to you?

LostKobrakai commented 6 years ago

Sure I've simply gone with stuct.value for now.

kipcole9 commented 6 years ago

Added Cldr.Unit.value/1 and published in hex 1.1.0.