Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currency format to parts #679

Closed
rxaviers opened this issue Jan 25, 2017 · 8 comments · Fixed by #891
Closed

Currency format to parts #679

rxaviers opened this issue Jan 25, 2017 · 8 comments · Fixed by #891

Comments

@rxaviers
Copy link
Member

rxaviers commented Jan 25, 2017

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

@patch
Copy link
Contributor

patch commented Jul 6, 2017

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.

@rxaviers
Copy link
Member Author

rxaviers commented Jul 6, 2017

@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.

@patch
Copy link
Contributor

patch commented Jul 6, 2017

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!)

@rxaviers
Copy link
Member Author

rxaviers commented Jul 6, 2017

Excellent and thank you! :)

@TheDutchDevil
Copy link

Are there any updates on this? As we recently ran into this issue.

@rxaviers
Copy link
Member Author

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

@TheDutchDevil
Copy link

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.

@rxaviers
Copy link
Member Author

Funny if not sad, we all would love to do a lot of things, the problem are the hours for them.

rxaviers added a commit to rxaviers/globalize that referenced this issue Mar 20, 2020
- Currency: Fix code style
- Currency: pluralGenerator better error handling

Fixes globalizejs#679
Fixes globalizejs#680
rxaviers added a commit to rxaviers/globalize that referenced this issue Mar 23, 2020
- Currency: Fix code style
- Currency: pluralGenerator better error handling

Fixes globalizejs#679
Fixes globalizejs#680
rxaviers added a commit to rxaviers/globalize that referenced this issue Mar 24, 2020
- Currency: Fix code style
- Currency: pluralGenerator better error handling

Fixes globalizejs#679
Fixes globalizejs#680
rxaviers added a commit to rxaviers/globalize that referenced this issue Mar 24, 2020
- Currency: Fix code style
- Currency: pluralGenerator better error handling

Fixes globalizejs#679
Fixes globalizejs#680
rxaviers added a commit to rxaviers/globalize that referenced this issue Mar 24, 2020
- Currency: Fix code style
- Currency: pluralGenerator better error handling

Fixes globalizejs#679
Fixes globalizejs#680
rxaviers added a commit to rxaviers/globalize that referenced this issue Mar 24, 2020
- Currency: Fix code style
- Currency: pluralGenerator better error handling

Fixes globalizejs#679
Fixes globalizejs#680
rxaviers added a commit to rxaviers/globalize that referenced this issue Mar 25, 2020
- Currency: Fix code style
- Currency: pluralGenerator better error handling

Fixes globalizejs#679
Fixes globalizejs#680
rxaviers added a commit to rxaviers/globalize that referenced this issue Mar 25, 2020
- Currency: Fix code style
- Currency: pluralGenerator better error handling

Fixes globalizejs#679
Fixes globalizejs#680
rxaviers added a commit to rxaviers/globalize that referenced this issue Mar 25, 2020
- Currency: Fix code style
- Currency: pluralGenerator better error handling

Fixes globalizejs#679
Fixes globalizejs#680
rxaviers added a commit that referenced this issue Mar 25, 2020
- Currency: Fix code style
- Currency: pluralGenerator better error handling

Fixes #679
Fixes #680
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants