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

Need "symbo-alt-narrow" for Int.NumberFormat options.currencyDisplay #200

Closed
zincli opened this issue Nov 23, 2017 · 6 comments
Closed

Need "symbo-alt-narrow" for Int.NumberFormat options.currencyDisplay #200

zincli opened this issue Nov 23, 2017 · 6 comments
Labels
c: numbers Component: numbers, currency, units s: in progress Status: the issue has an active proposal

Comments

@zincli
Copy link

zincli commented Nov 23, 2017

new Intl.NumberFormat('th', { style: 'currency', currency: 'THB', currencyDisplay: 'symbol' }).format(130);
// "THB130.00"

new Intl.NumberFormat('vi', { style: 'currency', currency: 'THB', currencyDisplay: 'symbol' }).format(130);
// "฿ 130,00"

Even though this is defined in the CLDR, I'm still not sure if it is a expectation for "symbol".

So I'm thinking that we could use the "symbol-alt-narrow" defined in CLDR to match our product's requirements.

@littledan littledan added the Small Smaller change solvable in a Pull Request label Dec 13, 2017
@sffc
Copy link
Contributor

sffc commented Nov 26, 2018

This is covered as part of

https://github.com/tc39-transfer/proposal-unified-intl-numberformat

Will be available in currencyDisplay: "narrowSymbol"

@sffc

This comment has been minimized.

@sffc sffc added s: in progress Status: the issue has an active proposal c: numbers Component: numbers, currency, units and removed Small Smaller change solvable in a Pull Request labels Mar 19, 2019
longlho pushed a commit to formatjs/formatjs-old that referenced this issue Dec 2, 2019
add support for `currencyDisplay`: `narrowSymbol`

polyfill for tc39/ecma402#200
@anba
Copy link
Contributor

anba commented Mar 16, 2020

CLDR was changed to use "฿" for Thai.

But apart from that change, the "narrowSymbol" option is now available, too.

js> print(new Intl.NumberFormat('th', { style: 'currency', currency: 'SYP', currencyDisplay: 'symbol' }).format(130))       
SYP 130.00
js> print(new Intl.NumberFormat('th', { style: 'currency', currency: 'SYP', currencyDisplay: 'narrowSymbol' }).format(130)) 
£130.00

@sffc
Copy link
Contributor

sffc commented Mar 16, 2020

Yep, the proposal is Stage 4 and merged. Closing as Fixed

@sffc sffc closed this as completed Mar 16, 2020
longlho pushed a commit to formatjs/formatjs that referenced this issue Apr 27, 2020
add support for `currencyDisplay`: `narrowSymbol`

polyfill for tc39/ecma402#200
@gecko25
Copy link

gecko25 commented Jun 30, 2020

Has this been released yet?

I am on FireFox 77.0.1 and getting thrown this error:

Screen Shot 2020-06-30 at 1 58 31 PM

@anba
Copy link
Contributor

anba commented Jun 30, 2020

This feature will be available starting Firefox 78 (release today, not sure if automatic updates have already started).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: numbers Component: numbers, currency, units s: in progress Status: the issue has an active proposal
Projects
None yet
Development

No branches or pull requests

5 participants