Members
Methods
# getCurrency() → {Currency|undefined}
If the type of this INumber instance is "currency", then the parser will attempt to figure out which currency this amount represents. The amount can be written with any of the currency signs or ISO 4217 codes that are currently recognized by ilib, and the currency signs may occur before or after the numeric portion of the string. If no currency can be recognized, then the default currency for the locale is returned. If multiple currencies can be recognized (for example if the currency sign is "$"), then this method will prefer the one for the current locale. If multiple currencies can be recognized, but none are used in the current locale, then the first currency encountered will be used. This may produce random results, though the larger currencies occur earlier in the list. For example, if the sign found in the string is "$" and that is not the sign of the currency of the current locale then the US dollar will be recognized, as it is the largest currency that uses the "$" as its sign.
the currency instance for this amount, or undefined if this INumber object is not of type currency
Currency
|
undefined
# getLocale() → {Locale}
Return the locale for this formatter instance.
the locale instance for this formatter
# toString() → {string}
Return the original string that this number instance was created with.
the original string
string
# valueOf() → {number}
Return the value of this INumber object as a primitive number instance.
the value of this number instance
number