dakalab / birthday
Validate birthday, parse the age and constellation of valid birthday.
Installs: 83 464
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=7
Requires (Dev)
README
Validate birthday, parse the age and constellation of valid birthday.
Install
composer require dakalab/birthday
Usage
use Dakalab\Birthday\Birthday;
$birthday = new Birthday('2018-12-01', 'zh');
$age = $birthday->getAge();
$constellation = $birthday->getConstellation();
$formatedDate = $birthday->format('d/m/Y'); // 01/12/2018
$normalizedDate = (string) $birthday; // 2018-12-01