src/aria/utils/Number.js
function (number, patternString, formatSymbols) {
            formatSymbols = this._normalizeSymbols(formatSymbols);

            var patternDescription = this._explode(patternString);
            if (!patternDescription) {
                return this.$logError(this.INVALID_FORMAT, ["formatCurrency", this.CURRENCY_BEAN]);
            }

            var currencySymbol = this._currency;
            number = this.formatNumber(number, patternString, formatSymbols);

            if (patternDescription.currencyBegin) {
                return currencySymbol + number;
            } else if (patternDescription.currencyEnd) {
                return number + currencySymbol;
            } else {
                return number;
            }
        }
function (number, patternString, formatSymbols) {
            formatSymbols = this._normalizeSymbols(formatSymbols);

            var patternDescription = this._explode(patternString);
            if (!patternDescription) {
                return this.$logError(this.INVALID_FORMAT, ["formatCurrency", this.CURRENCY_BEAN]);
            }

            var currencySymbol = this._currency;
            number = this.formatNumber(number, patternString, formatSymbols);

            if (patternDescription.currencyBegin) {
                return currencySymbol + number;
            } else if (patternDescription.currencyEnd) {
                return number + currencySymbol;
            } else {
                return number;
            }
        }
function ( number , patternString , formatSymbols ) { formatSymbols = this . _normalizeSymbols ( formatSymbols ) ; var patternDescription = this . _explode ( patternString ) ; if ( ! patternDescription ) { return this . $logError ( this . INVALID_FORMAT , [ "formatCurrency" , this . CURRENCY_BEAN ] ) ; } var currencySymbol = this . _currency ; number = this . formatNumber ( number , patternString , formatSymbols ) ; if ( patternDescription . currencyBegin ) { return currencySymbol + number ; } else if ( patternDescription . currencyEnd ) { return number + currencySymbol ; } else { return number ; } }
Take the formatted number from formatNumber and apply currency specific formatting, such as the currency
symbol
@param {Number} number The number you want to format
@param {String} patternString the pattern to be used
@param {aria.utils.environment.NumberCfgBeans:DecimalFormatSymbols} formatSymbols Optional custom formatting
symbols
@return {String}
Take the formatted number from formatNumber and apply currency specific formatting such as the currency symbol