PHPackages                             dakalab/birthday - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. dakalab/birthday

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

dakalab/birthday
================

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

v1.4.0(6y ago)091.8k11MITPHPPHP &gt;=7CI failing

Since Dec 3Pushed 6y ago1 watchersCompare

[ Source](https://github.com/dakalab/birthday)[ Packagist](https://packagist.org/packages/dakalab/birthday)[ RSS](/packages/dakalab-birthday/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (1)

birthday
========

[](#birthday)

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

[![Build Status](https://camo.githubusercontent.com/e4931fc0d5407be9aa15e80e4086122a3e65368cd93a8c2c5de092d4a6d7c9bd/68747470733a2f2f7472617669732d63692e6f72672f64616b616c61622f62697274686461792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dakalab/birthday)[![codecov](https://camo.githubusercontent.com/65f8c6e24cb283dba053c3553b6c55f5b1a50490459f88710485ca5414de07f1/68747470733a2f2f636f6465636f762e696f2f67682f64616b616c61622f62697274686461792f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/dakalab/birthday)[![Latest Stable Version](https://camo.githubusercontent.com/adc1c62ea21cade38fe5c5408b0b0b86b7a5805a06ef35791f0f815013e409aa/68747470733a2f2f706f7365722e707567782e6f72672f64616b616c61622f62697274686461792f762f737461626c65)](https://packagist.org/packages/dakalab/birthday)[![Total Downloads](https://camo.githubusercontent.com/bbf89a694a4b81605193b9db7eed966721cec75adcf15b75321f24c565428a62/68747470733a2f2f706f7365722e707567782e6f72672f64616b616c61622f62697274686461792f646f776e6c6f616473)](https://packagist.org/packages/dakalab/birthday)[![License](https://camo.githubusercontent.com/cc9b2aa44c04c834a14441295b80c6c8d57746d5b1cc30fe5588af0804b39ab7/68747470733a2f2f706f7365722e707567782e6f72672f64616b616c61622f62697274686461792f6c6963656e73652e737667)](https://packagist.org/packages/dakalab/birthday)

Install
-------

[](#install)

```
composer require dakalab/birthday

```

Usage
-----

[](#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

```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~116 days

Total

5

Last Release

2259d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/38477a075b41de5a26d8125f39a5075e700472d770024cf31e9e3d1566e0c5e5?d=identicon)[hyperjiang](/maintainers/hyperjiang)

---

Top Contributors

[![hyperjiang](https://avatars.githubusercontent.com/u/12892368?v=4)](https://github.com/hyperjiang "hyperjiang (8 commits)")

---

Tags

agebirthdayconstellation

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/dakalab-birthday/health.svg)

```
[![Health](https://phpackages.com/badges/dakalab-birthday/health.svg)](https://phpackages.com/packages/dakalab-birthday)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
