@telerik/kendo-intl
Advanced tools
Comparing version 0.12.2 to 0.12.3
@@ -84,2 +84,6 @@ import formatCurrencySymbol from './format-currency-symbol'; | ||
function isConstantFormat(format) { | ||
return format.indexOf(SHARP) === -1 && format.indexOf(ZERO) === -1; | ||
} | ||
function setValueSpecificFormat(formatOptions) { | ||
@@ -93,3 +97,7 @@ var number = formatOptions.number; | ||
} else if (number === 0) { | ||
format = format[2] || format[0]; | ||
var zeroFormat = format[2]; | ||
format = zeroFormat || format[0]; | ||
if (zeroFormat && isConstantFormat(zeroFormat)) { | ||
formatOptions.constant = zeroFormat; | ||
} | ||
} else { | ||
@@ -260,6 +268,2 @@ format = format[0]; | ||
function isConstantFormat(format) { | ||
return format.indexOf(SHARP) === -1 && format.indexOf(ZERO) === -1; | ||
} | ||
export default function customNumberFormat(number, format, info) { | ||
@@ -274,4 +278,4 @@ var formatOptions = { | ||
if (isConstantFormat(formatOptions.format)) { | ||
return formatOptions.format; | ||
if (formatOptions.constant) { | ||
return formatOptions.constant; | ||
} | ||
@@ -278,0 +282,0 @@ |
{ | ||
"name": "@telerik/kendo-intl", | ||
"description": "A package exporting functions for date and number parsing and formatting", | ||
"version": "0.12.2", | ||
"version": "0.12.3", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
545123
5396