Named Numeric Formats

Applies to Infiniti v8 or later
When specifying common formats for numbers there are several named terms can be used. For example 'currency' could be used rather than '$0.00'. The terms are useful for the format function or document format property.

Usage

Format Description
General Number Display number with no thousand separator
Currency Display number with thousand separator, if appropriate; display two digits to the right of the decimal separator. Output is based on system locale settings.
Fixed Display at least one digit to the left and two digits to the right of the decimal separator.
Standard Display number with thousand separator, at least one digit to the left and two digits to the right of the decimal separator.
Percent Display number multiplied by 100 with a percent sign (%) appended to the right; always display two digits to the right of the decimal separator.
Scientific Use standard scientific notation.
Yes/No Display ‘No’ if number is 0; otherwise, display ‘Yes’.
True/False Display ’False’ if number is 0; otherwise, display ‘True’.
On/Off Display ‘Off’ if number is 0; otherwise, display On’.

Related Articles

date time zone date diff timezone UTC