diff --git a/src/components/relative-time.jsx b/src/components/relative-time.jsx index af3b669c..9c62c771 100644 --- a/src/components/relative-time.jsx +++ b/src/components/relative-time.jsx @@ -16,7 +16,7 @@ function isValidDate(value) { const resolvedLocale = new Intl.DateTimeFormat().resolvedOptions().locale; const DTF = mem((locale, opts = {}) => { - const lang = localeMatch([locale], [resolvedLocale]); + const lang = localeMatch([locale], [resolvedLocale], locale); try { return new Intl.DateTimeFormat(lang, opts); } catch (e) {} diff --git a/src/utils/nice-date-time.js b/src/utils/nice-date-time.js index dde3f7a0..29019360 100644 --- a/src/utils/nice-date-time.js +++ b/src/utils/nice-date-time.js @@ -9,7 +9,7 @@ const _DateTimeFormat = (opts) => { const { locale, dateYear, hideTime, formatOpts } = opts || {}; const loc = locale && !/pseudo/i.test(locale) - ? localeMatch([locale], [defaultLocale]) + ? localeMatch([locale], [defaultLocale], locale) : defaultLocale; const currentYear = new Date().getFullYear(); const options = {