dakalab/birthday

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

Maintainers

Package info

github.com/dakalab/birthday

pkg:composer/dakalab/birthday

Statistics

Installs: 91 823

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

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

This package is auto-updated.

Last update: 2026-03-11 22:45:44 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