dakalab / birthday
Validate birthday, parse the age and constellation of valid birthday.
v1.4.0
2020-03-11 10:06 UTC
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