beta
cables is under heavy development.
There might be one or another bug, please let us know about it!

NumberFormatter Op



NumberFormatter
Namespace: Ops.String

Op author: kikohs

Format a number to a string in the given locale and format


Wrapped standard Javascript function toLocaleString.

Outputs a formated representation of the input number, can work with currencies, use the browser locale or use a custom one. Numbers will be rounded to

See doc here: https://www.w3schools.com/jsref/jsref_tolocalestring_number.asp



  Brower support [caniuse.com]

Inputs

Input Number (Number)
Locale index (integer /Number)
Locale string (String)

A string with a BCP 47 language tag

Style index (integer /Number)

The formatting style to use

Format

Minimum Integer Digits (integer /Number)

The minimum number of integer digits to use. Possible values are from 1 to 21

Minimum Fraction Digits (integer /Number)

The minimum number of fraction digits to use. Possible values are from 0 to 20

Maximum Fraction Digits (integer /Number)

The maximum number of fraction digits to use. Possible values are from 0 to 20

Significant Digits

Minimum Significant Digits (integer /Number)

The maximum number of significant digits to use. Possible values are from 1 to 21

Maximum Significant Digits (integer /Number)

The minimum number of significant digits to use. Possible values are from 1 to 21

Use Grouping (boolean /Number)

Whether to use grouping separators, such as thousands separators.

Currency

Currency Name (String)

The currency to use in currency formatting. Possible values are the ISO 4217 currency codes.

Currency Display index (integer /Number)

How to display the currency in currency formatting

Outputs

Formatted Number (String)
Has error (Number)

Caught a mistake or want to contribute to the documentation?

Edit Documentation 

NumberFormatter Example


Patches using NumberFormatter

  • Examples (1)
  • Public
  • My Patches

Changelog


created op
2022-03-15 - kikohs