bradietilley/carbon-zodiac

Chinese zodiac helpers for the Carbon date library

Maintainers

Package info

github.com/bradietilley/carbon-zodiac

pkg:composer/bradietilley/carbon-zodiac

Transparency log

Statistics

Installs: 462

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 5

v2.1.0 2026-07-25 01:44 UTC

This package is auto-updated.

Last update: 2026-07-25 01:46:33 UTC


README

Chinese zodiac helpers for the Carbon date library — resolve Gregorian dates to zodiac year, sign, and element.

Static Analysis Tests PHP Version

Documentation

Full documentation is available at bradietilley.dev/carbon-zodiac.

Installation

composer require bradietilley/carbon-zodiac
use BradieTilley\Zodiac\Zodiac;
use Carbon\Carbon;

Zodiac::boot(); // automatic in Laravel via service provider

$date = Carbon::parse('1970-02-06');

$date->zodiacYear();    // Year<1970>
$date->zodiacSign();    // Sign::DOG
$date->zodiacElement(); // Element::METAL

$result = $date->zodiac();
$result->year;    // Year
$result->sign;    // Sign::DOG
$result->element; // Element::METAL

See the documentation for years, signs, elements, limitations, and sources.

Credits