PHPackages                             intervention/zodiac - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. intervention/zodiac

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

intervention/zodiac
===================

Zodiac Sign Calculator

7.0.3(1mo ago)59201.7k↓26.5%16[1 PRs](https://github.com/Intervention/zodiac/pulls)MITPHPPHP ^8.2CI passing

Since Jan 2Pushed 3w ago1 watchersCompare

[ Source](https://github.com/Intervention/zodiac)[ Packagist](https://packagist.org/packages/intervention/zodiac)[ Docs](https://zodiac.intervention.io)[ Fund](https://paypal.me/interventionio)[ GitHub Sponsors](https://github.com/Intervention)[ RSS](/packages/intervention-zodiac/feed)WikiDiscussions develop Synced 2d ago

READMEChangelog (8)Dependencies (27)Versions (52)Used By (0)

Intervention Zodiac
===================

[](#intervention-zodiac)

[![Latest Version](https://camo.githubusercontent.com/48e04ddb89bad369ee63d52ee23795768081f70be3393754c703ca5949bf9b9d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e74657276656e74696f6e2f7a6f646961632e737667)](https://packagist.org/packages/intervention/zodiac)[![Tests](https://github.com/Intervention/zodiac/actions/workflows/build.yml/badge.svg)](https://github.com/Intervention/zodiac/actions/workflows/build.yml)[![Monthly Downloads](https://camo.githubusercontent.com/e09e701bee891dce59d121776907bb149e525a102603c29b1b464d380198ddee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f696e74657276656e74696f6e2f7a6f646961632e737667)](https://packagist.org/packages/intervention/zodiac/stats)[![Support me on Ko-fi](https://raw.githubusercontent.com/Intervention/zodiac/main/.github/images/support.svg)](https://ko-fi.com/interventionphp)

Intervention Zodiac is a astrological calculator for PHP 8.2+ that resolves Western and Chinese zodiac signs from various data types.

- Fluent interface to calculate zodiac signs
- Support for western and chinese astrology
- Framework-agnostic

Installation
------------

[](#installation)

The installation works with [Composer](https://getcomposer.org) by running the following command.

```
composer require intervention/zodiac
```

Although the library is framework agnostic it comes with a service provider for the [Laravel Framework](https://zodiac.intervention.io/v7/introduction/frameworks). Which will be discovered automatically and registers the calculator into your installation.

Getting Started
---------------

[](#getting-started)

Read the full [documentation](https://zodiac.intervention.io) for this library.

Code Examples
-------------

[](#code-examples)

### Calculator

[](#calculator)

```
use Intervention\Zodiac\Calculator;
use Intervention\Zodiac\Astrology;
use DateTime;

// create calculator with astrology
$calculator = new Calculator(Astrology::WESTERN);

// calculate various date formats
$sign = $calculator->calculate('2001-01-01');
$sign = $calculator->calculate('first day of june 2014');
$sign = $calculator->calculate('2018-06-15 12:34:00');
$sign = $calculator->calculate(new DateTime('2001-01-01'));
$sign = $calculator->calculate(228268800);
$sign = $calculator->calculate('228268800');

// override the default astrology
$sign = $calculator->calculate('2001-01-01', Astrology::CHINESE);
```

### Sign

[](#sign)

```
use Intervention\Zodiac\Sign;
use Intervention\Zodiac\Chinese\Sign as ChineseSign;
use Intervention\Zodiac\Western\Sign as WesternSign;
use DateTime;

// parse signs directly
$sign = Sign::fromString('2000-01-01');
$sign = Sign::fromString('first day of june 2014');
$sign = Sign::fromDate(new DateTime('2001-01-01'));
$sign = Sign::fromUnix(228268800);
$sign = Sign::fromUnix('228268800');

// parse western signs directly
$sign = WesternSign::fromString('2000-01-01');

// parse chinese signs directly
$sign = ChineseSign::fromString('2000-01-01');

// sign methods
$name = $sign->name(); // 'gemini'
$html = $sign->html(); // '♊︎'
$localized = $sign->localize('fr')->name(); // Gémeaux
$compatibility = $sign->compatibility($sign); // .6
```

Authors
-------

[](#authors)

This library is developed and maintained by [Oliver Vogel](https://intervention.io)

Thanks to the community of [contributors](https://github.com/Intervention/zodiac/graphs/contributors) who have helped to improve this project.

License
-------

[](#license)

Intervention Zodiac is licensed under the [MIT License](LICENSE).

###  Health Score

68

—

FairBetter than 99% of packages

Maintenance94

Actively maintained with recent releases

Popularity48

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 91.5% 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 ~79 days

Recently: every ~23 days

Total

49

Last Release

34d ago

Major Versions

2.2.0 → 3.0.02022-01-13

3.1.1 → 4.0.02024-02-01

4.1.1 → 5.0.02024-11-11

5.0.7 → 6.0.0-beta.12025-11-16

6.0.1 → 7.0.02026-04-10

PHP version history (7 changes)0.5.0PHP &gt;=5.4.0

1.3.0PHP ^7.0

2.0.0PHP ^7.2

2.1.1PHP ^7.3|^8.0

4.0.0PHP ^8.0

4.1.0PHP ^8.1

6.0.0-beta.1PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d172b42b2c5b53e71e56589fed3fb3467234a1c266d31b697b1d7b451f4cfe8?d=identicon)[olivervogel](/maintainers/olivervogel)

---

Top Contributors

[![olivervogel](https://avatars.githubusercontent.com/u/884642?v=4)](https://github.com/olivervogel "olivervogel (249 commits)")[![ergonomicus](https://avatars.githubusercontent.com/u/11394513?v=4)](https://github.com/ergonomicus "ergonomicus (6 commits)")[![fabriciojso](https://avatars.githubusercontent.com/u/1298122?v=4)](https://github.com/fabriciojso "fabriciojso (3 commits)")[![arnidan](https://avatars.githubusercontent.com/u/5755685?v=4)](https://github.com/arnidan "arnidan (2 commits)")[![jeffsmor](https://avatars.githubusercontent.com/u/40842204?v=4)](https://github.com/jeffsmor "jeffsmor (2 commits)")[![ludo237](https://avatars.githubusercontent.com/u/921500?v=4)](https://github.com/ludo237 "ludo237 (1 commits)")[![mustardandrew](https://avatars.githubusercontent.com/u/7501643?v=4)](https://github.com/mustardandrew "mustardandrew (1 commits)")[![ozgurkaragoz](https://avatars.githubusercontent.com/u/6477375?v=4)](https://github.com/ozgurkaragoz "ozgurkaragoz (1 commits)")[![serima](https://avatars.githubusercontent.com/u/1130921?v=4)](https://github.com/serima "serima (1 commits)")[![AkioSarkiz](https://avatars.githubusercontent.com/u/42392852?v=4)](https://github.com/AkioSarkiz "AkioSarkiz (1 commits)")[![sorasu](https://avatars.githubusercontent.com/u/2067943?v=4)](https://github.com/sorasu "sorasu (1 commits)")[![amirsadeghi1](https://avatars.githubusercontent.com/u/26359326?v=4)](https://github.com/amirsadeghi1 "amirsadeghi1 (1 commits)")[![baceto90](https://avatars.githubusercontent.com/u/20355435?v=4)](https://github.com/baceto90 "baceto90 (1 commits)")[![baceto90-tgod](https://avatars.githubusercontent.com/u/280386921?v=4)](https://github.com/baceto90-tgod "baceto90-tgod (1 commits)")[![hoangphison](https://avatars.githubusercontent.com/u/9270621?v=4)](https://github.com/hoangphison "hoangphison (1 commits)")

---

Tags

zodiachoroscopebirthdaysun signstar signastrology

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/intervention-zodiac/health.svg)

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

###  Alternatives

[illuminate/support

The Illuminate Support package.

630113.0M41.3k](/packages/illuminate-support)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

293952.6k33](/packages/craftcms-feed-me)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k19](/packages/solspace-craft-freeform)[japanese-date/japanese-date

日本の暦、祝日を取り扱うライブラリ

1610.0k](/packages/japanese-date-japanese-date)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[whatsma/zodiacsign

Calculates the zodiac sign for a given day and month.

109.2k](/packages/whatsma-zodiacsign)

PHPackages © 2026

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