Skip to content
Kerri Shotts edited this page Jan 29, 2014 · 1 revision

(part of _y)

Parameters:

  • theNumber - the percentage to localize
  • theFormat - optional, the number of decimal places to use, "2" is the default
  • theLocale - optional, the locale to localize to

Returns: a localized number in currency format

Depends On: jQuery/Globalize

The number is passed to jQuery/Globalize for conversion. The format is p prepended to theFormat. Therefore, if theFormat is 2, the actual format string is p2.

Usage

  var convertedN = _y.PCT(3.14159, "", "en-US"); // 3.14%
  convertedN = _y.PCT(3.14159, "4", "es-ES"); // 3,1416%
Clone this wiki locally