fn (Format number)

Prev Next

Formats a number in the scheme of the current language.

Tooltip

This info will only appear in the tooltip. Here only extremely short and concise! In general, please do not use images or links here. Tables are allowed.

Syntax: $fn(number,[precision=2[,integerDigits=1,[useThousandsSeparator=false]]])

Parameter

Description

number

The number to be formatted.

precision

The number of decimal places.

integerDigits

The number of integers.

useThousandsSeparator

Use thousand separator.

keepUnits

If the value is a number with unit, the value will be appended to the result string.

Syntax

$fn(number,[precision=2[,integerDigits=1,[useThousandsSeparator=false]]])

Parameter

Name

Description

number

The number to be formatted.

precision

The number of decimal places.

integerDigits

The number of integers.

useThousandsSeparator

Use thousand separator.

keepUnits

If the value is a number with unit, the value will be appended to the result string.

Return value

The formatted number.

Examples

Syntax

Result

$fn(2.5,3)

2,500

$fn(2.5,3,2)

02,500