change news article date formatting

This commit is contained in:
2024-06-21 23:57:16 +02:00
parent b51c737885
commit 9dcb543482
3 changed files with 12 additions and 9 deletions

View File

@ -3,7 +3,7 @@ import { Blocks } from "@/components/blocks/Blocks";
import Image from "@/components/general/Image";
import { graphql } from "@/gql";
import { NewsFragment } from "@/gql/graphql";
import { compactDateFormat, formatDate } from "@/lib/date";
import { formatExtendedDateTime } from "@/lib/date";
import { notFound } from "next/navigation";
export async function generateStaticParams() {
@ -67,7 +67,7 @@ export default async function Page({ params }: { params: { slug: string } }) {
)}
</figure>
)}
<p>{formatDate(news.firstPublishedAt, compactDateFormat)}</p>
<p>{formatExtendedDateTime(news.firstPublishedAt, true, true)}</p>
</section>
<section className="pageContent">
<Blocks blocks={news.body} />