@telerik/kendo-intl
Advanced tools
Comparing version 0.10.0 to 0.10.1
@@ -97,5 +97,11 @@ module.exports = | ||
function patternOptions(pattern) { | ||
var patterns = pattern.replace(cldrCurrencyRegExp, "$").replace(patternRegExp, "n").split(";"); | ||
function getPatterns(pattern) { | ||
patternRegExp.lastIndex = 0; | ||
return pattern.replace(cldrCurrencyRegExp, "$").replace(patternRegExp, "n").split(";"); | ||
} | ||
function getGroupSize(pattern) { | ||
patternRegExp.lastIndex = 0; | ||
var numberPatterns = patternRegExp.exec(pattern.split(LIST_SEPARATOR)[0])[0].split(DECIMAL_SEPARATOR); | ||
@@ -108,6 +114,3 @@ var integer = numberPatterns[0]; | ||
return { | ||
groupSize: groupSize, | ||
patterns: patterns | ||
}; | ||
return groupSize; | ||
} | ||
@@ -133,5 +136,10 @@ | ||
var pattern = info[field].standard; | ||
numbers[style] = patternOptions(pattern); | ||
numbers[style] = { | ||
patterns: getPatterns(pattern) | ||
}; | ||
if (style === "currency") { | ||
numbers[style].groupSize = getGroupSize((info["decimal" + LATIN_NUMBER_FORMATS] || info[field]).standard); | ||
loadCurrencyUnitPatterns(numbers[style], info[field]); | ||
} else { | ||
numbers[style].groupSize = getGroupSize(pattern); | ||
} | ||
@@ -138,0 +146,0 @@ } else if (field === "currencies") { |
{ | ||
"name": "@telerik/kendo-intl", | ||
"description": "A package exporting functions for date and number parsing and formatting", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
@@ -55,3 +55,3 @@ [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) | ||
For more examples and available configuration options, refer to the article on [date parsing](https://github.com/telerik/kendo-intl/blob/master/docs/dates/date-parsing.md). | ||
For more examples and available configuration options, refer to the article on [date parsing](https://github.com/telerik/kendo-intl/blob/master/docs/date-parsing/index.md). | ||
@@ -70,3 +70,3 @@ ### Date Formatting | ||
For more examples and available configuration options, refer to the article on [date formatting](https://github.com/telerik/kendo-intl/blob/master/docs/dates/date-formatting.md). | ||
For more examples and available configuration options, refer to the article on [date formatting](https://github.com/telerik/kendo-intl/blob/master/docs/date-formatting/index.md). | ||
@@ -86,3 +86,3 @@ ### Number Parsing | ||
For more examples and available configuration options, refer to the article on [number parsing](https://github.com/telerik/kendo-intl/blob/master/docs/numbers/number-parsing.md). | ||
For more examples and available configuration options, refer to the article on [number parsing](https://github.com/telerik/kendo-intl/blob/master/docs/num-parsing/index.md). | ||
@@ -109,3 +109,3 @@ ### Number Formatting | ||
For more examples and available configuration options, refer to the article on [number formatting](https://github.com/telerik/kendo-intl/blob/master/docs/numbers/number-formatting.md). | ||
For more examples and available configuration options, refer to the article on [number formatting](https://github.com/telerik/kendo-intl/blob/master/docs/num-formatting/index.md). | ||
@@ -137,2 +137,2 @@ ## Installation | ||
> To install the npm package, it is recommended that you use Node.js 5.0.0 or later versions. | ||
> To install the npm package, you use Node.js 5.0.0 or later versions. |
163382
4291