Skip to content

Commit 56a55e4

Browse files
committed
docs: Update blog post date
1 parent 0012e4d commit 56a55e4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/pages/blog/date-formatting-nextjs.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {Tweet} from 'react-tweet';
66

77
# Reliable date formatting in Next.js
88

9-
<small>Sep 19, 2024 · by Jan Amann</small>
9+
<small>Sep 25, 2024 · by Jan Amann</small>
1010

1111
Let's take a look at the following component:
1212

@@ -159,7 +159,7 @@ Well, are we done now?
159159

160160
## Where are we?
161161

162-
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"?
162+
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"?
163163

164164
```tsx
165165
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
229229
So far, we've assumed that our app will be used by American English users, with dates being formatted like:
230230

231231
```
232-
Sep 19, 2024
232+
Sep 25, 2024
233233
```
234234

235235
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) {
306306
// ✅ Works in any environment
307307
const format = useFormatter();
308308

309-
// "Sep 19, 2024"
309+
// "Sep 25, 2024"
310310
format.dateTime(published);
311311

312312
// "8 days ago"

docs/pages/blog/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import CommunityLink from 'components/CommunityLink';
66
<CommunityLink
77
href="/blog/date-formatting-nextjs"
88
title="Reliable date formatting in Next.js"
9-
date="Sep 19, 2024"
9+
date="Sep 25, 2024"
1010
author="By Jan Amann"
1111
/>
1212
<CommunityLink

0 commit comments

Comments
 (0)