CurrencyFormatter.format(options)

Method Description

Formats the number to the currency string.

Returns

String

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

options.number

number

required

The number to be formatted

Syntax

Important:

The following code snippet shows the syntax for this member. It is not a functional example. For a complete script example, see N/format/i18n Module Script Samples.

            // Add additional code
...
var curFormatter = format.getCurrencyFormatter({
    currency: "USD"
});
var formattedCurrency = curFormatter.format({
    number: 12.53
});
// formattedCurrency is '$12.53'
...
// Add additional code 

          

General Notices