Skip to content

fix blog date format#1572

Merged
aline-pereira merged 1 commit intomainfrom
fix/blog
Apr 9, 2026
Merged

fix blog date format#1572
aline-pereira merged 1 commit intomainfrom
fix/blog

Conversation

@aline-pereira
Copy link
Copy Markdown
Contributor

@aline-pereira aline-pereira commented Apr 9, 2026

What is this Contribution About?

Please provide a brief description of the changes or enhancements you are proposing in this pull request.

Issue Link

Please link to the relevant issue that this pull request addresses:

Loom Video

Record a quick screencast describing your changes to help the team understand and review your contribution. This will greatly assist in the review process.

Demonstration Link

Provide a link to a branch or environment where this pull request can be tested and seen in action.


Summary by cubic

Fix blog post date handling to ensure consistent sorting and display across browsers by normalizing YYYY-MM-DD strings to YYYY-MM-DDT00:00:00.

  • Bug Fixes
    • Use new Date(${date}T00:00:00) when sorting by date in blog/core/handlePosts.ts.
    • Use the same normalized date for display in blog/sections/Template.tsx to avoid timezone shifts.

Written for commit 4783476. Summary will update on new commits.

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced date parsing and formatting logic to ensure consistent timezone-neutral date handling throughout the application for more reliable date calculations and display consistency.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Tagging Options

Should a new tag be published when this PR is merged?

  • 👍 for Patch 0.144.3 update
  • 🎉 for Minor 0.145.0 update
  • 🚀 for Major 1.0.0 update

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d4c6ff99-2dcb-48d9-98b8-1e314549f12d

📥 Commits

Reviewing files that changed from the base of the PR and between a07ef6c and 4783476.

📒 Files selected for processing (2)
  • blog/core/handlePosts.ts
  • blog/sections/Template.tsx

📝 Walkthrough

Walkthrough

Both blog/core/handlePosts.ts and blog/sections/Template.tsx were modified to normalize date string parsing by appending T00:00:00 and constructing dates from template strings instead of direct date construction, affecting date sorting and formatting operations.

Changes

Cohort / File(s) Summary
Date Sorting Logic
blog/core/handlePosts.ts
Modified sortPosts function's date comparison to parse dates via template strings with T00:00:00 appended, changing timestamp calculation for date-based ordering.
Date Formatting Logic
blog/sections/Template.tsx
Updated date formatting to construct Date from normalized ISO-like string format before calling toLocaleDateString, ensuring consistent date parsing.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit hops through timezones near and far,
With T00:00:00 beneath each twinkling star,
No more date confusion in the morning light,
Sorted and formatted, everything's right!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix blog date format' is clearly related to the main changes: normalizing date string formatting in blog post sorting and display logic.
Description check ✅ Passed The PR description includes the required template sections and auto-generated summary, though the author did not manually fill in the 'What is this Contribution About?' or provide an Issue Link, Loom Video, or Demonstration Link.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/blog

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@aline-pereira aline-pereira merged commit a1a738d into main Apr 9, 2026
7 checks passed
@aline-pereira aline-pereira deleted the fix/blog branch April 9, 2026 19:42
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.

2 participants