Class: module:br/formatting/PercentFormatter

module:br/formatting/PercentFormatter

Converts the number to a percentage.

PercentFormatter is typically used with Presenter, but can be invoked programmatically as in the following example which evaluates to "61.8%":

br.formatting.PercentFormatter.format(0.618, {dp:1})

Constructor

new module:br/formatting/PercentFormatter()

Implements:
Source:

Methods

format(vValue, mAttributes)

Converts a decimal number to a percentage.
Parameters:
Name Type Description
vValue Variant the decimal number (String or Number type).
mAttributes Map a list of attributes, as specified in module:br/formatting/RoundingFormatter.
Implements:
Source:
Returns:
the number specified as a percentage.

Docs generated using BladeRunnerJS v1.7.0-0.g85ccf9420-DEV on Thu Jul 13 2017 14:07:54 GMT+0100 (BST)