Skip to content

feat: Add getLastDayOfMonth utility with tests#139

Merged
jhechtf merged 1 commit into
mainfrom
feat/date-utils
Apr 5, 2026
Merged

feat: Add getLastDayOfMonth utility with tests#139
jhechtf merged 1 commit into
mainfrom
feat/date-utils

Conversation

@jhechtf

@jhechtf jhechtf commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Tests

    • Expanded test coverage for date utility functions, including validation of leap-year and non-leap-year behavior.
  • New Features

    • Added a date calculation utility to support improved date handling across the application.

@vercel

vercel Bot commented Apr 4, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
bill-tracker-mono Ready Ready Preview, Comment Apr 5, 2026 8:02am

@coderabbitai

coderabbitai Bot commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1897599b-4820-4c3a-a198-c1e52a0d71f3

📥 Commits

Reviewing files that changed from the base of the PR and between ce82925 and c72ee4d.

📒 Files selected for processing (2)
  • apps/website/src/lib/util/date.test.ts
  • apps/website/src/lib/util/date.ts

Walkthrough

A new utility function getLastDayOfMonth is added to the date utilities module to compute the final day of any given month, accounting for varying month lengths and leap years. Accompanying test cases verify correct behavior for both leap-year and non-leap-year scenarios.

Changes

Cohort / File(s) Summary
Date Utility Enhancement
apps/website/src/lib/util/date.ts, apps/website/src/lib/util/date.test.ts
Added new getLastDayOfMonth function that clones a date, advances one month, and rolls back to the last day of the original month. Updated test imports and added comprehensive test cases covering leap-year (29) and non-leap-year (28) February behavior.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A calendar's helper, so neat and so fine,
Counts the last day of each month in line!
February twists, leap or not so,
Our fuzzy friend's logic helps dates truly flow! 📅✨

✨ 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 feat/date-utils

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.

jhechtf commented Apr 4, 2026

Copy link
Copy Markdown
Contributor Author

jhechtf commented Apr 5, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Apr 5, 7:58 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 5, 8:01 AM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 5, 8:02 AM UTC: @jhechtf merged this pull request with Graphite.

@jhechtf
jhechtf changed the base branch from feat/new-ui-components to graphite-base/139 April 5, 2026 07:59
@jhechtf
jhechtf changed the base branch from graphite-base/139 to main April 5, 2026 08:00
@jhechtf
jhechtf merged commit 37165ac into main Apr 5, 2026
3 of 7 checks passed
@jhechtf
jhechtf deleted the feat/date-utils branch April 5, 2026 08:02
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