bradietilley / carbon-zodiac
Chinese zodiac helpers for the Carbon date library
v2.1.0
2026-07-25 01:44 UTC
Requires
- php: ^8.3
- illuminate/support: >=10.0
- nesbot/carbon: >=2.0
Requires (Dev)
- laravel/pint: ^1.10
- pestphp/pest: ^2.0|^3.0
- phpstan/phpstan: ^1.10|^2.0
- symfony/var-dumper: >=5.0
README
Chinese zodiac helpers for the Carbon date library — resolve Gregorian dates to zodiac year, sign, and element.
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.