PHPackages                             fzed51/calendar-helper - 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. fzed51/calendar-helper

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

fzed51/calendar-helper
======================

Function collections for working with a calendar.

v1.0.0(5y ago)04[1 issues](https://github.com/fzed51/calendar-helper/issues)MITPHPCI failing

Since Jul 19Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/fzed51/calendar-helper)[ Packagist](https://packagist.org/packages/fzed51/calendar-helper)[ RSS](/packages/fzed51-calendar-helper/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (3)Versions (4)Used By (0)

CALENDAR HELPER
===============

[](#calendar-helper)

*Function collections for working with a calendar.*

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

[](#installation)

```
composer require fzed51/calendar-helper
```

Use
---

[](#use)

### Calendar

[](#calendar)

#### Is a bisextile year

[](#is-a-bisextile-year)

```
\CalendarHelper\Calendar::isBisextile(2020);
// => true

\CalendarHelper\Calendar::isBisextile(new \DateTime('2020-06-15'));
// => true

\CalendarHelper\Calendar::isBisextile(2019);
// => false
```

Returns `bool`.

#### Number of days in the month

[](#number-of-days-in-the-month)

```
\CalendarHelper\Calendar::numberOfDays(2020, 2);
// => 29

\CalendarHelper\Calendar::numberOfDays(new \DateTime('2020-02-15'));
// => 29

\CalendarHelper\Calendar::numberOfDays(2019, 2);
// => 28
```

Returns `int`.

#### Is a holiday

[](#is-a-holiday)

```
\CalendarHelper\Calendar::isHolidays(2020, 7, 14);
// => true  (Bastille Day)

\CalendarHelper\Calendar::isHolidays(new \DateTime('2020-07-14'));
// => true

\CalendarHelper\Calendar::isHolidays(2020, 7, 15);
// => false
```

Returns `bool`.

#### List the holidays of a year

[](#list-the-holidays-of-a-year)

```
\CalendarHelper\Calendar::holidaysList(2020);
// => [
//      DateTimeImmutable('2020-01-01'),  // New Year's Day
//      DateTimeImmutable('2020-04-13'),  // Easter Monday
//      DateTimeImmutable('2020-05-01'),  // May Day
//      DateTimeImmutable('2020-11-11'),  // Armistice 1918
//      DateTimeImmutable('2020-05-21'),  // Ascension
//      DateTimeImmutable('2020-06-01'),  // Whit Monday
//      DateTimeImmutable('2020-07-14'),  // Bastille Day
//      DateTimeImmutable('2020-08-15'),  // Assumption
//      DateTimeImmutable('2020-11-01'),  // All Saints' Day
//      DateTimeImmutable('2020-05-08'),  // Armistice 1945
//      DateTimeImmutable('2020-12-25'),  // Christmas Day
//    ]
```

Returns `\DateTimeImmutable[]`.

---

### Holiday

[](#holiday)

The `Holiday` class provides static methods to get the date of each French public holiday for a given year. Each method accepts either an `int` year or a `\DateTimeInterface` object and returns a `\DateTimeImmutable`.

#### New Year's Day (1st January)

[](#new-years-day-1st-january)

```
\CalendarHelper\Holiday::newYearsDay(2020);
// => DateTimeImmutable('2020-01-01')

\CalendarHelper\Holiday::newYearsDay(new \DateTime('2020-06-15'));
// => DateTimeImmutable('2020-01-01')
```

#### Easter Sunday

[](#easter-sunday)

```
\CalendarHelper\Holiday::easterDay(2020);
// => DateTimeImmutable('2020-04-12')
```

#### Easter Monday

[](#easter-monday)

```
\CalendarHelper\Holiday::easterMonday(2020);
// => DateTimeImmutable('2020-04-13')
```

#### May Day / Labour Day (1st May)

[](#may-day--labour-day-1st-may)

```
\CalendarHelper\Holiday::mayDay(2020);
// => DateTimeImmutable('2020-05-01')
```

#### Armistice 1945 / Victory in Europe Day (8th May)

[](#armistice-1945--victory-in-europe-day-8th-may)

```
\CalendarHelper\Holiday::armisticeDe1945(2020);
// => DateTimeImmutable('2020-05-08')
```

#### Ascension (39 days after Easter)

[](#ascension-39-days-after-easter)

```
\CalendarHelper\Holiday::ascension(2020);
// => DateTimeImmutable('2020-05-21')
```

#### Pentecost / Whit Sunday (49 days after Easter)

[](#pentecost--whit-sunday-49-days-after-easter)

```
\CalendarHelper\Holiday::pentecote(2020);
// => DateTimeImmutable('2020-05-31')
```

#### Whit Monday / Lundi de Pentecôte (50 days after Easter)

[](#whit-monday--lundi-de-pentecôte-50-days-after-easter)

```
\CalendarHelper\Holiday::lundiDePentecote(2020);
// => DateTimeImmutable('2020-06-01')
```

#### Bastille Day (14th July)

[](#bastille-day-14th-july)

```
\CalendarHelper\Holiday::bastilleDay(2020);
// => DateTimeImmutable('2020-07-14')
```

#### Assumption (15th August)

[](#assumption-15th-august)

```
\CalendarHelper\Holiday::assomption(2020);
// => DateTimeImmutable('2020-08-15')
```

#### All Saints' Day / Toussaint (1st November)

[](#all-saints-day--toussaint-1st-november)

```
\CalendarHelper\Holiday::tousSaint(2020);
// => DateTimeImmutable('2020-11-01')
```

#### Armistice 1918 (11th November)

[](#armistice-1918-11th-november)

```
\CalendarHelper\Holiday::armisticeDe1918(2020);
// => DateTimeImmutable('2020-11-11')
```

#### Christmas Day (25th December)

[](#christmas-day-25th-december)

```
\CalendarHelper\Holiday::christmasDay(2020);
// => DateTimeImmutable('2020-12-25')
```

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance61

Regular maintenance activity

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.7% 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

2173d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b6a8b19c5e90c6de2bc25cb56516bc0bf6cd4fa8eee97ee3a762b11180a0362?d=identicon)[fzed51](/maintainers/fzed51)

---

Top Contributors

[![fzed51](https://avatars.githubusercontent.com/u/1201984?v=4)](https://github.com/fzed51 "fzed51 (13 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (2 commits)")

---

Tags

calendardatedatetimehelperholidayphpphp-library

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fzed51-calendar-helper/health.svg)

```
[![Health](https://phpackages.com/badges/fzed51-calendar-helper/health.svg)](https://phpackages.com/packages/fzed51-calendar-helper)
```

###  Alternatives

[elivz/craft-single-cat

A field type to allow users to select a single category from a dropdown.

1117.4k](/packages/elivz-craft-single-cat)

PHPackages © 2026

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