dakalab/birthday

Validate birthday, parse the age and constellation of valid birthday.

v1.4.0 2020-03-11 10:06 UTC

This package is auto-updated.

Last update: 2024-05-11 19:10:03 UTC


README

Validate birthday, parse the age and constellation of valid birthday.

Build Status codecov Latest Stable Version Total Downloads License

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