-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bill li
committed
Apr 22, 2018
1 parent
182f8d0
commit 563bce8
Showing
6 changed files
with
58 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "anomalylab/component-identity-card", | ||
"name": "ofcold/component-identity-card", | ||
"description": "A simple proof of identity card of the people's Republic of China.", | ||
"keywords": [ | ||
"php71", | ||
|
@@ -9,19 +9,34 @@ | |
], | ||
"type": "library", | ||
"license": "MIT", | ||
"homepage": "https://anomalylab.org", | ||
"homepage": "https://ofcold.com", | ||
"authors": [ | ||
{ | ||
"name": "Bill li", | ||
"email": "[email protected]" | ||
"name": "Ofcold Team", | ||
"email": "[email protected]", | ||
"homepage": "https://ofcold.com" | ||
}, | ||
{ | ||
"name": "Olivia Fu", | ||
"email": "[email protected]", | ||
"homepage": "https://olivia.ink" | ||
}, | ||
{ | ||
"name": "Bill Li", | ||
"email": "[email protected]", | ||
"homepage": "https://artisanbill.com" | ||
} | ||
], | ||
"require": { | ||
"php": ">=7.1" | ||
"php": ">=7.1" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Anomaly\\Component\\IdentityCard\\": "src/" | ||
"Ofcold\\IdentityCard\\": "src/" | ||
} | ||
} | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"minimum-stability": "dev" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
<?php | ||
|
||
namespace Anomaly\Component\IdentityCard; | ||
namespace Ofcold\IdentityCard; | ||
|
||
|
||
/** | ||
* Class IdentityCard | ||
* Class IdentityCard | ||
* | ||
* @link https://ofcold.ink | ||
* | ||
* @link https://anomalylab.org | ||
* @author Anomaly lab, Inc <[email protected]> | ||
* @author Bill Li <[email protected]> | ||
* @author Ofcold, Inc <[email protected]> | ||
* @author Olivia Fu <[email protected]> | ||
* @author Bill Li <[email protected]> | ||
* | ||
* @package Ofcold\IdentityCard\IdentityCard | ||
*/ | ||
class IdentityCard | ||
{ | ||
|
@@ -59,15 +64,15 @@ public static function getLocale() : string | |
return static::$locale ?: 'zh-cn'; | ||
} | ||
|
||
/** | ||
/** | ||
* Constellations(Data from Wikipedia https://zh.wikipedia.org/wiki/%E8%A5%BF%E6%B4%8B%E5%8D%A0%E6%98%9F%E8%A1%93) | ||
* | ||
* | ||
* @var array | ||
*/ | ||
protected $constellations = [ | ||
'zh-cn' => [ | ||
// 1.21-2.19 [Aquarius] | ||
'水瓶座', | ||
'水瓶座', | ||
// 2.20-3.20 [Pisces] | ||
'双鱼座', | ||
// 3.21-4.19 [Aries] | ||
|
@@ -109,7 +114,7 @@ public static function getLocale() : string | |
|
||
/** | ||
* Constellation edge day cut data. | ||
* | ||
* | ||
* @var array | ||
*/ | ||
protected $constellationEdgeDays = [21, 20, 21, 20, 21, 22, 23, 23, 23, 24, 22, 21]; | ||
|
@@ -24815,7 +24820,7 @@ public function isCorrect() : bool | |
} | ||
|
||
return false; | ||
|
||
} | ||
|
||
/** | ||
|
@@ -24906,11 +24911,11 @@ public function getBirthday(string $format = 'Y-m-d') : string | |
return date( | ||
$format, | ||
mktime( | ||
0, | ||
0, | ||
0, | ||
substr(static::$idCard, 10, 2), | ||
substr(static::$idCard, 12, 2), | ||
0, | ||
0, | ||
0, | ||
substr(static::$idCard, 10, 2), | ||
substr(static::$idCard, 12, 2), | ||
substr(static::$idCard, 6, 4)) | ||
); | ||
} | ||
|