Skip to content

Fix getQuarter off-by-one error#61

Open
giovanni935 wants to merge 1 commit into
Study4:mainfrom
giovanni935:fix-getquarter-off-by-one
Open

Fix getQuarter off-by-one error#61
giovanni935 wants to merge 1 commit into
Study4:mainfrom
giovanni935:fix-getquarter-off-by-one

Conversation

@giovanni935

Copy link
Copy Markdown

Summary

Fixes the off-by-one bug in DateUtils.getQuarter().

Changes

  • Return (month / 3) + 1 instead of month / 3
  • January now correctly returns Q1 instead of Q0

Testing

  • Verified testGetQuarter() passes successfully using the VS Code Java Test Runner.

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