From a955488cdf7bbe54876b76548006979b0bd5eabe Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 26 Sep 2021 20:07:15 +0200 Subject: [PATCH] fix: date formatting for non-english languages --- src/helpers/time/formatDate.js | 4 ++-- src/i18n/lang/ru-RU.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/helpers/time/formatDate.js b/src/helpers/time/formatDate.js index b1d6d46f..ee5796b6 100644 --- a/src/helpers/time/formatDate.js +++ b/src/helpers/time/formatDate.js @@ -1,8 +1,8 @@ import {createDateFromString} from '@/helpers/time/createDateFromString' import {format, formatDistance} from 'date-fns' -import {enGB, de} from 'date-fns/locale' +import {enGB, de, fr, ru} from 'date-fns/locale' -const locales = {enGB, de} +const locales = {en: enGB, de, ch: de, fr, ru} const dateIsValid = date => { if (date === null) { diff --git a/src/i18n/lang/ru-RU.json b/src/i18n/lang/ru-RU.json index 58b3568e..4c9801e1 100644 --- a/src/i18n/lang/ru-RU.json +++ b/src/i18n/lang/ru-RU.json @@ -786,7 +786,7 @@ } }, "date": { - "locale": "en", + "locale": "ru", "in": "в {date}", "ago": "{date} назад", "altFormatLong": "j M Y H:i",