Built-In Namespace Number
| Method Attributes | Method Name and Description |
|---|---|
|
formatNumber(fmt)
Format a number according to the specs in fmt object.
|
Method Detail
formatNumber(fmt)
Format a number according to the specs in fmt object.
Defined in: <ricoCommon.js>.
Defined in: <ricoCommon.js>.
- Parameters:
- fmt
- may contain any of the following:
- multiplier
- the original number is multiplied by this amount before formatting
- decPlaces
- number of digits to the right of the decimal point
- decPoint
- character to be used as the decimal point
- thouSep
- character to use as the thousands separator
- prefix
- string added to the beginning of the result (e.g. a currency symbol)
- suffix
- string added to the end of the result (e.g. % symbol)
- negSign
- specifies format for negative numbers: L=leading minus, T=trailing minus, P=parens
- Returns:
- string, wrapped in a span element with a class of: negNumber, zeroNumber, posNumber These classes can be set in CSS to display negative numbers in red, for example.