+ if (!extension_loaded('intl')) {
+ self::missingIntlNotice();
+ return self::formatNumericByFormat($amount, '%!.' . $numberOfPlaces . 'i');
+ }
+ $money = Money::of($amount, CRM_Core_Config::singleton()->defaultCurrency, new CustomContext($numberOfPlaces), RoundingMode::CEILING);
+ $formatter = new \NumberFormatter(CRM_Core_I18n::getLocale(), NumberFormatter::CURRENCY);
+ $formatter->setSymbol(\NumberFormatter::CURRENCY_SYMBOL, '');
+ $formatter->setAttribute(\NumberFormatter::MIN_FRACTION_DIGITS, $numberOfPlaces);
+ return $money->formatWith($formatter);