-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Negative currency amount is displayed as $-xxx,xxx.xx for en-us culture #10158
Comments
I believe that this is because the en-us locale info in CLDR does not provide a specific negative pattern and so we "guess" at it on this line: https://github.com/angular/angular.js/blob/master/i18n/src/parser.js#L59 |
@clement911 Using currency filter, the current display of negative US currency is wrapped around by parenthesis. e.g. ($1234.56) . Sample: http://plnkr.co/edit/w16eMG8LzJ1pe4iuPaum?p=preview Don't know how you did it so I can reproduce it. Can you please provide a Plnkr? Thanks! |
@shwei - you need to load the en-US locale. See http://plnkr.co/edit/Gz9GcM1CarYuD4YRV5VB?p=preview |
I'm pretty sure this line is where the regression is: By the way, this issue affects other cultures too, for example en-au. |
@petebacondarwin when "guessing" the negative pattern would it be more appropriate to use |
Thanks for the clarification, @clement911 and @petebacondarwin. I think in en-us '-' + p.posPre makes more sense. Based on CLDR's documentation, displaying negative currency with a parenthesis around the number is a currency-accounting type. http://cldr.unicode.org/translation/number-patterns They changed the default display of a negative currency from a number in a parenthesis to prefixing it with a minus sign. A number in a parenthesis for negative currency is considered an accounting form based on this ticket: http://unicode.org/cldr/trac/ticket/5674 So for en-us, should we make negative currency to be displayed like -$123.45? |
It seems that the case where the negative sign goes between the currency symbol and the numeric value is actually the special case and that locales that require this have it built in. So we should default to having the negative sign before the symbol. See http://cldr.unicode.org/translation/number-patterns Closes angular#10158
It seems that the case where the negative sign goes between the currency symbol and the numeric value is actually the special case and that locales that require this have it built in. So we should default to having the negative sign before the symbol. See http://cldr.unicode.org/translation/number-patterns and http://unicode.org/cldr/trac/ticket/5674 Closes angular#10158
It seems that the case where the negative sign goes between the currency symbol and the numeric value is actually the special case and that locales that require this have it built in. So we should default to having the negative sign before the symbol. See http://cldr.unicode.org/translation/number-patterns and http://unicode.org/cldr/trac/ticket/5674 Closes angular#10158
It seems that the case where the negative sign goes between the currency symbol and the numeric value is actually the special case and that locales that require this have it built in. So we should default to having the negative sign before the symbol. See http://cldr.unicode.org/translation/number-patterns and http://unicode.org/cldr/trac/ticket/5674 Closes angular#10158
It seems that the case where the negative sign goes between the currency symbol and the numeric value is actually the special case and that locales that require this have it built in. So we should default to having the negative sign before the symbol. See http://cldr.unicode.org/translation/number-patterns and http://unicode.org/cldr/trac/ticket/5674 Closes #10158
It seems that the case where the negative sign goes between the currency symbol and the numeric value is actually the special case and that locales that require this have it built in. So we should default to having the negative sign before the symbol. See http://cldr.unicode.org/translation/number-patterns and http://unicode.org/cldr/trac/ticket/5674 Closes angular#10158
It seems that the case where the negative sign goes between the currency symbol and the numeric value is actually the special case and that locales that require this have it built in. So we should default to having the negative sign before the symbol. See http://cldr.unicode.org/translation/number-patterns and http://unicode.org/cldr/trac/ticket/5674 Closes angular#10158
It seems that the case where the negative sign goes between the currency symbol and the numeric value is actually the special case and that locales that require this have it built in. So we should default to having the negative sign before the symbol. See http://cldr.unicode.org/translation/number-patterns and http://unicode.org/cldr/trac/ticket/5674 Closes angular#10158
It seems that the case where the negative sign goes between the currency symbol and the numeric value is actually the special case and that locales that require this have it built in. So we should default to having the negative sign before the symbol. See http://cldr.unicode.org/translation/number-patterns and http://unicode.org/cldr/trac/ticket/5674 Closes angular#10158
Shouldn't a negative currency amount be displayed -$xxx,xxx.xx for en-us ?
With that commit it will show as $-xxx,xxx.xx which is kind of weird...
The text was updated successfully, but these errors were encountered: