changed: added danish date locale

This commit is contained in:
LovelessCodes 2024-05-13 10:13:59 +02:00 committed by GitHub
parent 388a6c458a
commit d56698b728
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,6 @@
import { formatDistance } from "date-fns";
import type { FormatDistanceOptions } from "date-fns";
import { ptBR, enUS, es, fr, pl, hu, tr, ru, it, be } from "date-fns/locale";
import { ptBR, enUS, es, fr, pl, hu, tr, ru, it, be, da } from "date-fns/locale";
import { useTranslation } from "react-i18next";
export function useDate() {
@ -18,6 +18,7 @@ export function useDate() {
if (language.startsWith("ru")) return ru;
if (language.startsWith("it")) return it;
if (language.startsWith("be")) return be;
if (language.startsWith("da")) return da;
return enUS;
};