goog.i18n.NumberFormat
Classgoog.i18n.NumberFormat(pattern, opt_currency, opt_currencyStyle)
Constructor of NumberFormat.
pattern
{number
|string
}
opt_currency
{string
=}
opt_currencyStyle
{number
=}
goog.i18n.NumberFormat.CurrencyStyle
EnumCurrency styles. … more
goog.i18n.NumberFormat.Format
EnumStandard number formatting patterns. … more
.format(number)
Formats a Number to produce a string.
number
{number
}
string
}
.isEnforceAsciiDigits()
Return if Ascii digits is enforced.
boolean
}
.parse(text, opt_pos)
Parses text string to produce a Number. This method attempts to parse text starting from position "opt_pos" if it is given. Otherwise the parse will start from the beginning of the text. When opt_pos presents, opt_pos will be updated to the character next to where parsing stops after the call. If an error occurs, opt_pos won't be updated.
text
{string
}
opt_pos
{Array
.<number
>=}
number
}
.setEnforceAsciiDigits(doEnforce)
Set if the usage of Ascii digits in formatting should be enforced.
doEnforce
{boolean
}
.setMaximumFractionDigits(max)
Sets maximum number of fraction digits.
max
{number
}
.setMinimumFractionDigits(min)
Sets minimum number of fraction digits.
min
{number
}