From 56a55e4730de824655a61a313b8703d98c723e39 Mon Sep 17 00:00:00 2001 From: Jan Amann Date: Wed, 25 Sep 2024 12:24:34 +0200 Subject: [PATCH] docs: Update blog post date --- docs/pages/blog/date-formatting-nextjs.mdx | 8 ++++---- docs/pages/blog/index.mdx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/pages/blog/date-formatting-nextjs.mdx b/docs/pages/blog/date-formatting-nextjs.mdx index be44ac04f..0a912029f 100644 --- a/docs/pages/blog/date-formatting-nextjs.mdx +++ b/docs/pages/blog/date-formatting-nextjs.mdx @@ -6,7 +6,7 @@ import {Tweet} from 'react-tweet'; # Reliable date formatting in Next.js -Sep 19, 2024 · by Jan Amann +Sep 25, 2024 · by Jan Amann Let's take a look at the following component: @@ -159,7 +159,7 @@ Well, are we done now? ## Where are we? -We've carefully ensured that our app is free of hydration mismatches and have established consistent time handling across all components. But what happens if we decide one day that we don't want to render a relative time like "2 days ago", but a specific date like "Sep 19, 2024"? +We've carefully ensured that our app is free of hydration mismatches and have established consistent time handling across all components. But what happens if we decide one day that we don't want to render a relative time like "2 days ago", but a specific date like "Sep 25, 2024"? ```tsx import {format} from 'date-fns'; @@ -229,7 +229,7 @@ As browsers don't include the time zone of the user in an HTTP request, one way So far, we've assumed that our app will be used by American English users, with dates being formatted like: ``` -Sep 19, 2024 +Sep 25, 2024 ``` Our situation gets interesting again, once we consider that the date format is not universal. In Great Britain, for instance, the same date might be formatted as "19 Sept 2024", with the day and month being swapped. @@ -306,7 +306,7 @@ export default function BlogPostPublishedDate({published}: Props) { // ✅ Works in any environment const format = useFormatter(); - // "Sep 19, 2024" + // "Sep 25, 2024" format.dateTime(published); // "8 days ago" diff --git a/docs/pages/blog/index.mdx b/docs/pages/blog/index.mdx index b5b35e9b7..42c6d2d6d 100644 --- a/docs/pages/blog/index.mdx +++ b/docs/pages/blog/index.mdx @@ -6,7 +6,7 @@ import CommunityLink from 'components/CommunityLink';