Closed rxaviers closed 4 years ago
currencyToPartsFormatter
would be very useful for several projects that I'm working on, not just for access to the currency sign but also for access to the different number parts for stylizing dollars and cents (and their equivalents in other currencies) in different formats.
@patch is anyone from your team willing to work on it? It's a straightforward change. This diff can be used as baseline and I'd be available to guide.
Potentially. I'll review the changes for dateToPartsFormatter
and start out with the spec for currencyToPartsFormatter
. Fortunately we now have a solid date-based part formatter to work from. (By the way, great new feature! Thanks!)
Excellent and thank you! :)
Are there any updates on this? As we recently ran into this issue.
Hi @TheDutchDevil, this has stalled. Do you want to contribute this feature. It should be a straightforward additioanl and it can use date to parts as baseline as mentioned above. Thanks
I would love to add it in, however, I just don't have the hours for it. :( Especially as the diff you linked appears to look quite involved.
Funny if not sad, we all would love to do a lot of things, the problem are the hours for them.
Context
Formatter is designed to provide an opaque string as an output that is not meant to be manipulated by the consumer, which makes impossible for UX/design using rich formatting, e.g.,
"<strong>EUR</strong> 35"
.Goal
Expose format to parts similarly to Ecma-402 Intl.DateTimeFormat.prototype.formatToParts().
References