(locale: string, symbol: NumberSymbol)
| 473 | * Use `Intl.NumberFormat` to format numbers instead. |
| 474 | */ |
| 475 | export function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string { |
| 476 | const data = ɵfindLocaleData(locale); |
| 477 | const res = data[ɵLocaleDataIndex.NumberSymbols][symbol]; |
| 478 | if (typeof res === 'undefined') { |
| 479 | if (symbol === NumberSymbol.CurrencyDecimal) { |
| 480 | return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Decimal]; |
| 481 | } else if (symbol === NumberSymbol.CurrencyGroup) { |
| 482 | return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Group]; |
| 483 | } |
| 484 | } |
| 485 | return res; |
| 486 | } |
| 487 | |
| 488 | /** |
| 489 | * Retrieves a number format for a given locale. |
no outgoing calls
no test coverage detected
searching dependent graphs…