Skip to content

Commit

Permalink
Merge pull request #9 from dchaofei/patch-1
Browse files Browse the repository at this point in the history
fix getZodiac()
  • Loading branch information
lilianjin authored May 28, 2018
2 parents 658c1cc + fd0f6a2 commit 6d2660c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/IdentityCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -24944,7 +24944,7 @@ public function getZodiac() : string
'en' => ['Cow', 'Tiger', 'Rabbit', 'Dragon', 'Snake', 'Horse', 'Sheep', 'Monkey', 'Chicken', 'Dog', 'Pig', 'Rat']
][static::getLocale()];

return $locale[abs(substr(static::$idCard, 10, 2) - 1901) % 12];
return $locale[abs(substr(static::$idCard, 6, 4) - 1901) % 12];
}

/**
Expand Down

0 comments on commit 6d2660c

Please sign in to comment.