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

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

dzava/calendar-month
====================

v1.1.1(7y ago)015MITPHPPHP &gt;=5.6

Since Apr 2Pushed 7y ago1 watchersCompare

[ Source](https://github.com/dzava/calendar-month)[ Packagist](https://packagist.org/packages/dzava/calendar-month)[ RSS](/packages/dzava-calendar-month/feed)WikiDiscussions master Synced 2w ago

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

Usage
-----

[](#usage)

#### Creating a Month instance

[](#creating-a-month-instance)

```
use Dzava\CalendarMonth\Month;

new Month(); // current month
new Month(5); // may of current year
new Month(5, 2019); // may of 2019
```

#### Retrieving the days in a month

[](#retrieving-the-days-in-a-month)

To get an array of the days in a month use the `days()` method.

```
use Dzava\CalendarMonth\Month;

$month = new Month(5, 2018);

$days = $month->days();

// array(31) {
//    [0] => class Carbon\Carbon {} // 2018-05-01
//    ...
//    [30] => class Carbon\Carbon {} // 2018-05-31
// }
```

To get a list of days per week of the month use the `weeks()` method.

```
use Dzava\CalendarMonth\Month;

$month = new Month(5, 2018);

$weeks = $month->weeks();

// array(5) {
//    [0] => array(7) {
//        [0] => class Carbon\Carbon {} // 2018-04-29
//        ...
//        [6] => class Carbon\Carbon {} // 2018-05-05
//    }
//    ...
//    [4] => array(7) {} // 2018-05-27 - 2018-06-02
// }
```

By default the weeks start on Sunday. If you want your weeks to start on a different day, use the `weekStartsAt($day)` method. 0 (for Sunday) through 6 (for Saturday).

#### Checks

[](#checks)

To check if a given date belongs to the month use the `contains($day)` method. The day can be either a `Carbon` instance or in any [other format](https://carbon.nesbot.com/docs/#api-instantiation) that is supported by the `Carbon` constructor.

```
use Dzava\CalendarMonth\Month;

$month = new Month(5, 2018);

$month->contains('2018-05-02'); // true
$month->contains('2018-04-02'); // false
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Every ~190 days

Total

3

Last Release

2630d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.4

v1.1.0PHP &gt;=5.6

### Community

Maintainers

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

---

Top Contributors

[![dzava](https://avatars.githubusercontent.com/u/1516475?v=4)](https://github.com/dzava "dzava (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[illuminate/support

The Illuminate Support package.

582110.9M40.0k](/packages/illuminate-support)[craftcms/feed-me

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

292943.4k27](/packages/craftcms-feed-me)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

53675.5k16](/packages/solspace-craft-freeform)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40140.4k2](/packages/erlandmuchasaj-laravel-gzip)[japanese-date/japanese-date

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

169.9k](/packages/japanese-date-japanese-date)[limingxinleo/hyperf-utils

Utils for Hyperf.

29136.4k3](/packages/limingxinleo-hyperf-utils)

PHPackages © 2026

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