Skip to content

Commit

Permalink
星座计算错误
Browse files Browse the repository at this point in the history
  • Loading branch information
deMemory authored Oct 9, 2022
1 parent df7b6d3 commit dbc1458
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/IdentityCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ public function getConstellation(): string

$day = (int) substr(static::$idCard, 12, 2);

if ($day >= $this->constellationEdgeDays[$month]) {
$month = $month + 1;
if ($day < $this->constellationEdgeDays[$month]) {
$month = $month - 1;
}

if ($month >= 0) {
Expand Down

0 comments on commit dbc1458

Please sign in to comment.