feat: généraliser le formatage de date adaptatif à la locale

This commit is contained in:
2026-07-05 20:47:52 +04:00
parent 35c39a97f3
commit 33514bf633
2 changed files with 2 additions and 7 deletions
+1 -3
View File
@@ -3,8 +3,6 @@
import PropTypes from 'prop-types'
import {useRouter} from 'next/navigation'
import Image from 'next/image'
import {format} from 'date-fns'
import {fr} from 'date-fns/locale'
import Card from '@mui/material/Card'
import CardActionArea from '@mui/material/CardActionArea'
@@ -37,7 +35,7 @@ export default function TeksKat({parole}) {
const router = useRouter()
const {titre, artistes, annee, couverture, createdAt, slug} = parole
const datPiblikasyon = format(new Date(createdAt), 'P', {locale: fr})
const datPiblikasyon = new Intl.DateTimeFormat(undefined, {dateStyle: 'short'}).format(new Date(createdAt))
const aliases = getAlias(artistes, parole.prioriteArtistes)
const handleClick = slug => {