https://github.com/dakalab/birthday
Validate birthday, parse the age and constellation of valid birthday, support multiple languages
https://github.com/dakalab/birthday
age birthday constellation
Last synced: 23 days ago
JSON representation
Validate birthday, parse the age and constellation of valid birthday, support multiple languages
- Host: GitHub
- URL: https://github.com/dakalab/birthday
- Owner: dakalab
- License: mit
- Created: 2018-12-02T02:31:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-11T10:13:16.000Z (over 6 years ago)
- Last Synced: 2025-11-27T18:36:03.838Z (7 months ago)
- Topics: age, birthday, constellation
- Language: PHP
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# birthday
Validate birthday, parse the age and constellation of valid birthday.
[](https://travis-ci.org/dakalab/birthday)
[](https://codecov.io/gh/dakalab/birthday)
[](https://packagist.org/packages/dakalab/birthday)
[](https://packagist.org/packages/dakalab/birthday)
[](https://packagist.org/packages/dakalab/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
```