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

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

thebigmiike/calendar
====================

WIP : A small library for manipulating periods and generate calendars. Still work in progress.

022PHP

Since May 22Pushed 9y ago1 watchersCompare

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

READMEChangelog (7)DependenciesVersions (1)Used By (0)

Calendar
========

[](#calendar)

WIP : A small library for manipulating periods and generate calendars. Still work in progress.

Create a calendar
-----------------

[](#create-a-calendar)

You can create a calendar in 2 different ways :

By using Laravel facades (requires `illuminate\support` package)

`$calendar = Calendar::create('2016-09-01', '2017-07-01');`

Or by instantiating a Calendar class

`$calendar = new Calendar('2016-09-01', '2017-07-01')`

You can pass `\DateTime()` or `Moment()` instances instead of typing a date format

Change Calendar settings
------------------------

[](#change-calendar-settings)

### Set locale / translate date and month names (Moment feature)

[](#set-locale--translate-date-and-month-names-moment-feature)

To translate day and month names : `MomentLocale::setLocale('fr_FR');`

### Change week first day

[](#change-week-first-day)

Parameter is an integer :

- 0 = Sunday
- 1 = Monday
- 2 = Tuesday
- 3 = Wednesday
- 4 = Thursday
- 5 = Friday
- 6 = Saturdy

Example to set the beginning of a week to Monday

`$calendar->setWeekFirstDay(1) // 1 for Monday`

### Change non business days in a week

[](#change-non-business-days-in-a-week)

Parameter is an array of integer and system is the same like above : Integers between 0 and 6 match to a specific day.

`$calendar->setNonBusinessDays([0, 3, 6]);`

Add events and holidays
-----------------------

[](#add-events-and-holidays)

You need to create an `Event` or `Holiday` object. Both are similar but instantiating an Holiday class will set period as non business period.

`$holiday = new Holiday('Christmas holidays', '2016-12-19', '2017-01-02'); $calendar->addHoliday($holiday); // same for events`

You can pass an `array` or a `Calendar\Collections\Collection`of holidays too.

Generate HTML calendar
----------------------

[](#generate-html-calendar)

```

                    Lun
                    Mar
                    Mer
                    Jeu
                    Ven
                    Sam
                    Dim

```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7195805?v=4)[TheBigMiike](/maintainers/TheBigMiike)[@TheBigMiike](https://github.com/TheBigMiike)

---

Top Contributors

[![TheBigMiike](https://avatars.githubusercontent.com/u/7195805?v=4)](https://github.com/TheBigMiike "TheBigMiike (20 commits)")

### Embed Badge

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

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

###  Alternatives

[flowpack/listable

Tiny extension for listing things

35217.8k7](/packages/flowpack-listable)

PHPackages © 2026

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