(locale: string, symbol: NumberSymbol)
| 490 | * Use `Intl.NumberFormat` to format numbers instead. |
| 491 | */ |
| 492 | export function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string { |
| 493 | const data = ɵfindLocaleData(locale); |
| 494 | const res = data[ɵLocaleDataIndex.NumberSymbols][symbol]; |
| 495 | if (typeof res === 'undefined') { |
| 496 | if (symbol === NumberSymbol.CurrencyDecimal) { |
| 497 | return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Decimal]; |
| 498 | } else if (symbol === NumberSymbol.CurrencyGroup) { |
| 499 | return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Group]; |
| 500 | } |
| 501 | } |
| 502 | return res; |
| 503 | } |
| 504 | |
| 505 | /** |
| 506 | * Retrieves a number format for a given locale. |
no outgoing calls
no test coverage detected