Skip to content

Show post dates on their calendar day in every time zone - #1209

Draft
MaxGhenis wants to merge 1 commit into
mainfrom
fix/post-date-local-parse
Draft

MaxGhenis wants to merge 1 commit into
mainfrom
fix/post-date-local-parse

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

The research post page and the post cards formatted dates with new Date(post.date). For the 85 posts whose posts.json date is date-only (for example 2026-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 through formatPostDate in blogPreviewUtils.ts, which appends noon to date-only strings.

This routes Blog.page.tsx and BlogPostCard.tsx through the same helper, which gains a month argument (short by default, long for the post page), and adds tests for both forms on a date-only string. Verified the unit tests pass with TZ=America/New_York and TZ=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

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>
@vercel

vercel Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
policyengine-calculator-next Ready Ready Preview Sep 16, 2026 10:25pm UTC
policyengine-website Ready Ready Preview Sep 16, 2026 10:25pm UTC

Request Review

This branch was successfully deployed

2 active deployments
Preview – policyengine-website — f0eb03da Deployed Sep 16, 2026 by vercel[bot]
Preview – policyengine-calculator-next — f0eb03da Deployed Sep 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant