PHPackages                             rebeccathedev/episcopaldate - 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. rebeccathedev/episcopaldate

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

rebeccathedev/episcopaldate
===========================

A modern PHP 8.1+ library for handling dates in the Episcopal Church USA (the American branch of the worldwide Anglican Communion). As a Western Christian tradition, many of these functions are suitable for use in other denominations as well.

v1.0.0(4mo ago)30MITPHPPHP ^8.1CI passing

Since Dec 14Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/rebeccathedev/EpiscopalDate)[ Packagist](https://packagist.org/packages/rebeccathedev/episcopaldate)[ RSS](/packages/rebeccathedev-episcopaldate/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

✝️ EpiscopalDate
================

[](#️-episcopaldate)

A modern PHP 8.1+ library for handling dates in the Episcopal Church USA (the American branch of the worldwide Anglican Communion). As a Western Christian tradition, many of these functions are suitable for use in other denominations as well.

📦 Installation
--------------

[](#-installation)

```
composer require rebeccathedev/episcopaldate
```

**Requirements:** PHP 8.1 or higher

✨ Features
----------

[](#-features)

- 📅 Calculate liturgical dates (Easter, Advent, Ash Wednesday, etc.)
- 🎨 Determine liturgical seasons and years
- 📖 Generate full liturgical calendars
- 🔥 Modern PHP 8.1+ with enums, typed properties, and DateTimeImmutable
- ✅ Full test coverage with PHPUnit
- 🔄 Backwards compatible legacy API

🚀 Usage
-------

[](#-usage)

### Modern API (Recommended)

[](#modern-api-recommended)

```
use RebeccaTheDev\EpiscopalDate\EpiscopalDate;
use DateTimeImmutable;

// Create an instance for today
$date = new EpiscopalDate();

// Or for a specific date
$date = new EpiscopalDate(new DateTimeImmutable('2024-03-15'));

// Get liturgical dates
$easter = $date->getEaster();              // DateTimeImmutable
$ashWednesday = $date->getAshWednesday();
$palmSunday = $date->getPalmSunday();
$pentecost = $date->getPentecost();
$advent = $date->getAdvent();

// Get season and year
$season = $date->getSeason();              // Season enum
echo $season->value;                       // "Lent"

$year = $date->getLiturgicalYear();        // LiturgicalYear enum
echo $year->value;                         // "A", "B", or "C"

// Get liturgical week
$week = $date->getLiturgicalWeek();        // "Lent 3"

// Generate a full liturgical calendar
$calendar = $date->generateLiturgicalCalendar(2024);
foreach ($calendar as $sunday => $weekName) {
    echo "$sunday: $weekName\n";
}

// Calculate dates for specific years
$easter2025 = EpiscopalDate::calculateEaster(2025);
$advent2025 = EpiscopalDate::calculateAdvent(2025);
```

### 🎯 Enums

[](#-enums)

The library provides two enums for type safety:

```
use RebeccaTheDev\EpiscopalDate\Season;
use RebeccaTheDev\EpiscopalDate\LiturgicalYear;

// Season enum
Season::Advent
Season::Christmas
Season::Epiphany
Season::Lent
Season::Easter
Season::Pentecost

// LiturgicalYear enum
LiturgicalYear::A
LiturgicalYear::B
LiturgicalYear::C

// Calculate liturgical year from calendar year
$year = LiturgicalYear::forYear(2024);  // LiturgicalYear::B
```

### 🔄 Legacy API (Backwards Compatibility)

[](#-legacy-api-backwards-compatibility)

For backwards compatibility with the old timestamp-based API:

```
use RebeccaTheDev\EpiscopalDate\LegacyEpiscopalDate;

// All methods return Unix timestamps
$easter = LegacyEpiscopalDate::easterDate(2024);
$ashWednesday = LegacyEpiscopalDate::ashWednesdayDate(2024);
$season = LegacyEpiscopalDate::liturgicalSeason(time());
$year = LegacyEpiscopalDate::liturgicalYear(time());
```

🧪 Development
-------------

[](#-development)

### Running Tests

[](#running-tests)

```
composer install
vendor/bin/phpunit
```

### Project Structure

[](#project-structure)

```
src/
├── EpiscopalDate.php          # Main class with modern API
├── LegacyEpiscopalDate.php    # Legacy backwards-compatible API
├── Season.php                  # Season enum
└── LiturgicalYear.php         # Liturgical year enum

tests/
├── EpiscopalDateTest.php
└── LegacyEpiscopalDateTest.php

```

📝 License
---------

[](#-license)

MIT License - see [LICENSE](LICENSE) file for details

👩‍💻 Author
----------

[](#‍-author)

**Rebecca Peck** -

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance74

Regular maintenance activity

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

147d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e44d774aeb52f48a966c8da491231abf0f0cf1fc9dfecc16266528aafd96b6db?d=identicon)[rebeccathedev](/maintainers/rebeccathedev)

---

Top Contributors

[![rebeccathedev](https://avatars.githubusercontent.com/u/500950?v=4)](https://github.com/rebeccathedev "rebeccathedev (14 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rebeccathedev-episcopaldate/health.svg)

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

PHPackages © 2026

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