diff --git a/components/teks/komante.jsx b/components/teks/komante.jsx index 4c45e8f..673749f 100644 --- a/components/teks/komante.jsx +++ b/components/teks/komante.jsx @@ -7,8 +7,6 @@ import Avatar from '@mui/material/Avatar' import Typography from '@mui/material/Typography' import Chip from '@mui/material/Chip' import Link from 'next/link' -import {format} from 'date-fns' -import {fr} from 'date-fns/locale' import {Mastodon} from '@icons-pack/react-simple-icons' function formatAuteur(commentaire) { @@ -24,7 +22,8 @@ function formatDat(commentaire) { return null } - return format(new Date(commentaire.datePublication), 'Pp', {locale: fr}) + return new Intl.DateTimeFormat(undefined, {dateStyle: 'short', timeStyle: 'short'}) + .format(new Date(commentaire.datePublication)) } const MENTION_REGEX = /(?:@[\w.-]+){1,2}/g