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

Add a CurrencyFormatter #22

Open
Mordil opened this issue Feb 13, 2020 · 3 comments
Open

Add a CurrencyFormatter #22

Mordil opened this issue Feb 13, 2020 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Mordil
Copy link
Member

Mordil commented Feb 13, 2020

Goal

To remove reliance on Foundation, which leaves us vulnerable to bugs introduced between Swift versions and more control over a nicer API for currency formatting instead of Foundation.NumberFormatter.

Implications

This means that this library will be responsible for vending the necessary parts of ICU to support Localization of currency formats, as well as currency symbols.

This is not a trivial feature

@Mordil Mordil added enhancement New feature or request help wanted Extra attention is needed labels Feb 13, 2020
@Mordil
Copy link
Member Author

Mordil commented Jan 17, 2025

After several years of thinking about this - I think it's fine to rely on Foundation to avoid duplicating a lot of work for supporting currency formatting.

A lot of the differences between Swift versions is really the difference between ICU versions, which makes sense as it updates to stay current with changing Locales.

I think if this was to be kept as a feature request, what it would end up being is a wrapper around NumberFormatter to highly specialize it for currency and not a general purpose number formatter.

@tonyarnold
Copy link

Honestly, most projects should be using Currency Style - my understanding is that the format styles are orders of magnitude faster than the old style Foundation formatters.

@Mordil
Copy link
Member Author

Mordil commented Jan 18, 2025

Honestly, most projects should be using Currency Style - my understanding is that the format styles are orders of magnitude faster than the old style Foundation formatters.

That's a good point. I honestly forgot about those APIs 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants