diff --git a/src/common/util/date.ts b/src/common/util/date.ts index 77fd65e99..f6d2bf24a 100644 --- a/src/common/util/date.ts +++ b/src/common/util/date.ts @@ -5,10 +5,13 @@ export const formatDate = 'dd MMM yyyy' export const formatDatetime = 'dd MMM yyyy HH:mm:ss' export const formatDateString = (dateString: string | Date, language?: string) => { - if (language) { - return Intl.DateTimeFormat(language).format(new Date(dateString)) - } - return new Date(dateString).toLocaleDateString() + const date = new Date(dateString) + + const day = String(date.getDate()).padStart(2, '0') + const month = String(date.getMonth() + 1).padStart(2, '0') + const year = date.getFullYear() + + return `${day}.${month}.${year}` } const matchLocale = (language?: string): Locale => {