Skip to content

Commit

Permalink
Merge pull request #21 from de-memory/patch-1
Browse files Browse the repository at this point in the history
星座计算错误
  • Loading branch information
lilianjin authored Jul 9, 2023
2 parents df7b6d3 + dbc1458 commit de4d301
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 de4d301

Please sign in to comment.