fix(localize): return sign to the front of the currency formatted value in Dutch
This commit is contained in:
parent
0afb0e1272
commit
8fb70c2080
2 changed files with 7 additions and 7 deletions
|
|
@ -17,7 +17,7 @@ export function normalizeIntl(formattedParts, options, _locale) {
|
|||
let normalize = forceNormalSpaces(formattedParts, options);
|
||||
// Dutch and Belgian currency must be moved to end of number
|
||||
if (options && options.style === 'currency') {
|
||||
if (_locale.slice(0, 2) === 'nl') {
|
||||
if (options.currencyDisplay === 'code' && _locale.slice(0, 2) === 'nl') {
|
||||
normalize = forceCurrencyToEnd(normalize);
|
||||
}
|
||||
// Add group separator for Bulgarian locale
|
||||
|
|
|
|||
|
|
@ -234,9 +234,9 @@ describe('formatNumber', () => {
|
|||
expect(formatNumber(123456.789, currencyCode('EUR'))).to.equal('123.456,79 EUR');
|
||||
expect(formatNumber(123456.789, currencyCode('USD'))).to.equal('123.456,79 USD');
|
||||
expect(formatNumber(123456.789, currencyCode('JPY'))).to.equal('123.457 JPY');
|
||||
expect(formatNumber(123456.789, currencySymbol('EUR'))).to.equal('123.456,79 €');
|
||||
expect(formatNumber(123456.789, currencySymbol('USD'))).to.equal('123.456,79 $');
|
||||
expect(formatNumber(123456.789, currencySymbol('JPY'))).to.equal('123.457 ¥');
|
||||
expect(formatNumber(123456.789, currencySymbol('EUR'))).to.equal('€ 123.456,79');
|
||||
expect(formatNumber(123456.789, currencySymbol('USD'))).to.equal('$ 123.456,79');
|
||||
expect(formatNumber(123456.789, currencySymbol('JPY'))).to.equal('¥ 123.457');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -246,9 +246,9 @@ describe('formatNumber', () => {
|
|||
expect(formatNumber(123456.789, currencyCode('EUR'))).to.equal('123.456,79 EUR');
|
||||
expect(formatNumber(123456.789, currencyCode('USD'))).to.equal('123.456,79 USD');
|
||||
expect(formatNumber(123456.789, currencyCode('JPY'))).to.equal('123.457 JPY');
|
||||
expect(formatNumber(123456.789, currencySymbol('EUR'))).to.equal('123.456,79 €');
|
||||
expect(formatNumber(123456.789, currencySymbol('USD'))).to.equal('123.456,79 $');
|
||||
expect(formatNumber(123456.789, currencySymbol('JPY'))).to.equal('123.457 ¥');
|
||||
expect(formatNumber(123456.789, currencySymbol('EUR'))).to.equal('€ 123.456,79');
|
||||
expect(formatNumber(123456.789, currencySymbol('USD'))).to.equal('$ 123.456,79');
|
||||
expect(formatNumber(123456.789, currencySymbol('JPY'))).to.equal('¥ 123.457');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue