| 123456789101112131415161718192021222324252627282930313233 |
- /**
- * DevExtreme (localization/currency.js)
- * Version: 19.1.16
- * Build date: Tue Oct 18 2022
- *
- * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
- * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
- */
- "use strict";
- var extend = require("../core/utils/extend").extend;
- var numberLocalization = require("./number");
- numberLocalization.inject({
- _formatNumberCore: function(value, format, formatConfig) {
- if ("currency" === format) {
- formatConfig.precision = formatConfig.precision || 0;
- var result = this.format(value, extend({}, formatConfig, {
- type: "fixedpoint"
- }));
- var currencyPart = this.getCurrencySymbol().symbol.replace("$", "$$$$");
- result = result.replace(/^(\D*)(\d.*)/, "$1" + currencyPart + "$2");
- return result
- }
- return this.callBase.apply(this, arguments)
- },
- getCurrencySymbol: function() {
- return {
- symbol: "$"
- }
- },
- getOpenXmlCurrencyFormat: function() {
- return "$#,##0{0}_);\\($#,##0{0}\\)"
- }
- });
|