format.getNumberFormatter(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Creates a format.NumberFormatter object to format numbers to strings.

Returns

Object

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

10 units

Module

N/format/i18n Module

Methods and Properties

N/format/i18n Module Members

Since

2019.2

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.groupSeparator

string

optional

Indicates the group separator.

2019.2

options.decimalSeparator

string

optional

Indicates the decimal separator.

2019.2

options.precision

number

optional

Indicates the precision.

2019.2

options.negativeNumberFormat

enum

optional

Indicates the negative number format.

2019.2

options.locale

string

optional

Indicates the locale from which default settings are determined. The other format.getNumberFormatter(options) parameters can override this parameter.

2021.1

Errors

Error Code

Thrown If

INVALID_LOCALE

The locale parameter is not valid

SSS_INVALID_TYPE_ARG

The parameter type is wrong

Related Topics

N/format/i18n Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices