Skip to content

fix(constellation): start Sagittarius on Nov 23 - #391

Merged
gouguoyin merged 1 commit into
dromara:masterfrom
ChandraChaan:fix/sagittarius-boundary-pr
Nov 4, 2026
Merged

gouguoyin merged 1 commit into
dromara:masterfrom
ChandraChaan:fix/sagittarius-boundary-pr

Conversation

@ChandraChaan

Copy link
Copy Markdown
Contributor

IsSagittarius is true on November 22, the last day of Scorpio:

if month == 11 && day >= 22 {

The table at the top of constellation.go has Scorpio as 10/24 to 11/22 and Sagittarius as 11/23 to 12/21, and IsScorpio already uses day <= 22. So on 22 November IsScorpio and IsSagittarius are both true, while Constellation() returns Scorpio. The existing Scorpio test already asserts that 2020-11-22 is Scorpio.

This changes the comparison to day >= 23 and adds s.False(Parse("2020-11-22").IsSagittarius()) to the existing valid carbon case.

I couldn't run Go locally, so I ran the suite on a fork:

  • Test only, without the fix: test fails on macOS at constellation_unit_test.go:351 (TestConstellationSuite/TestCarbon_IsSagittarius/valid_carbon). The ubuntu and windows jobs of that run were cancelled after the macOS failure, so they didn't report a result.
  • Test with the fix: test passes on ubuntu, macOS and windows, and lint passes.

The commit in this PR is the squashed form of the fix branch (identical tree).

@gouguoyin
gouguoyin merged commit 5fbd08e into dromara:master Nov 4, 2026
6 checks passed
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