fix: date formatting for non-english languages
This commit is contained in:
parent
8cd4bbccf6
commit
a955488cdf
2 changed files with 3 additions and 3 deletions
|
@ -1,8 +1,8 @@
|
||||||
import {createDateFromString} from '@/helpers/time/createDateFromString'
|
import {createDateFromString} from '@/helpers/time/createDateFromString'
|
||||||
import {format, formatDistance} from 'date-fns'
|
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 => {
|
const dateIsValid = date => {
|
||||||
if (date === null) {
|
if (date === null) {
|
||||||
|
|
|
@ -786,7 +786,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"locale": "en",
|
"locale": "ru",
|
||||||
"in": "в {date}",
|
"in": "в {date}",
|
||||||
"ago": "{date} назад",
|
"ago": "{date} назад",
|
||||||
"altFormatLong": "j M Y H:i",
|
"altFormatLong": "j M Y H:i",
|
||||||
|
|
Loading…
Reference in a new issue