Add support for NumberFormat.formatToParts()
giboin opened this issue · 0 comments
Is your feature request related to a problem? Please describe.
Hi everyone, thanks for the great job that's being done here !
I need to display a price with only the amount in bold, not the currency. I would then need a format function that would not return a String but an object that holds the information of the amount of my price, the currency symbol and the way they should be displayed according to a locale.
Describe the solution you'd like
Like in JS, we could have a formatToParts
method on NumberFormat
(and maybe others like DateTimeFormat
?) that would return an array of Strings. Here is the doc for the JS method on NumberFormat
Describe alternatives you've considered
getters on NumberFormat
for the amount (currency symbol getter already exists) and the way of displaying them