Fix translating dates

This commit is contained in:
kolaente 2021-07-06 16:46:45 +02:00
parent 21d31f2b40
commit 647b02e989
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -30,7 +30,7 @@ export const formatDateSince = (date, $t) => {
date = createDateFromString(date) date = createDateFromString(date)
const currentDate = new Date() const currentDate = new Date()
const distance = formatDistance(date, currentDate) const distance = formatDistance(date, currentDate, {locale: locales[$t('date.locale')]})
if (date > currentDate) { if (date > currentDate) {
return $t('date.in', {date: distance}) return $t('date.in', {date: distance})