GlideNumberFormatter – format(Number number)
Provides a string representation of a number formatted according to the language setting of the current user.
| Name | Type | Description |
|---|---|---|
| number | Number | Number of any size. |
| Type | Description |
|---|---|
| String | Number formatted according to the language setting of the current user. |
The following example shows the output for a user with language set to Spanish.
gs.info("Number is: " + sn_i18n.NumberFormatter.format(123456.789));
gs.info("Number is: " + sn_i18n.NumberFormatter.format(-123456.789));
Output:
Number is: 123.456,789
Number is: -123.456,789