diff --git a/packages/cs-shared/CHANGELOG.md b/packages/cs-shared/CHANGELOG.md index 82de55a362e67a80dbba57729700182a1dc9eabd..892a71f0b8b1bf9e403be791235d995960a504c7 100644 --- a/packages/cs-shared/CHANGELOG.md +++ b/packages/cs-shared/CHANGELOG.md @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Removed ### Fixed + - force `numeric: true` for `Intl.Collator(lang, { numeric: true })`. For `en` this is not necessary, but for `uk` + without forcing numeric numbers compared as strings. ## [5.5.0] - 2020-07-19 ### Added diff --git a/packages/cs-shared/formatByPattern.js b/packages/cs-shared/formatByPattern.js index e56fc0b7ea0a45b748e854e7109d8b91398de5a0..7e5a66500357d542ccc81c375f7c6fc29ba63aaa 100644 --- a/packages/cs-shared/formatByPattern.js +++ b/packages/cs-shared/formatByPattern.js @@ -177,7 +177,7 @@ function setDefaultLang (lang) { _collator = undefined if (lang === 'en') return if ((typeof Intl === 'object') && Intl.Collator) { - _collator = new Intl.Collator(lang) + _collator = new Intl.Collator(lang, { numeric: true }) } } setDefaultLang('en')