Returns a NumberFormat object.
Signature
getNumberFormat(string format, string symbols)
Parameters
format: Type: string. The number format. For example, format=".00" displays the number followed by two decimal places.
symbols: Type: string. An optional map of localized symbols. Otherwise, the current locale’s symbols are used.
Returns
Type: NumberFormat The number format returned by $Locale.numberFormat.
Sample Code
var f = $A.get("$Locale.numberFormat");
var num = 10000
var nf = $A.localizationService.getNumberFormat(f);
var formatted = nf.format(num);
// Returns 10,000
var formatted = $A.localizationService.formatNumber(num);