Repository navigation
Conversation
Blog.page.tsx and BlogPostCard.tsx formatted post dates with new Date(post.date), which parses a date-only string such as 2026-09-15 as UTC midnight and shows September 14 to readers in US time zones. The home preview already avoided this through formatPostDate, so both components now use that helper, which gains a month-style argument for the long form the post page uses. Tests cover both forms on a date-only string. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Sep 17, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The research post page and the post cards formatted dates with
new Date(post.date). For the 85 posts whoseposts.jsondate is date-only (for example2026-09-15), that parses as UTC midnight, so readers in US time zones see the previous day (September 14 for a post dated September 15). The home-page preview already avoided this throughformatPostDateinblogPreviewUtils.ts, which appends noon to date-only strings.This routes
Blog.page.tsxandBlogPostCard.tsxthrough the same helper, which gains amonthargument (shortby default,longfor the post page), and adds tests for both forms on a date-only string. Verified the unit tests pass withTZ=America/New_YorkandTZ=Pacific/Honolulu; eslint and prettier clean on the changed files. Noticed while rendering #1208 locally: a post dated 2026-09-15 displayed as September 14.🤖 Generated with Claude Code