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

ActiveLibrary

carvefx/calendar
================

Simple PHP Calendar Library

v0.1(11y ago)22.3k1MITPHPPHP &gt;=5.4

Since Aug 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/carvefx/calendar)[ Packagist](https://packagist.org/packages/carvefx/calendar)[ RSS](/packages/carvefx-calendar/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

[![Code Climate](https://camo.githubusercontent.com/c6980c86e404b0c7311b5b4f87f1dcbc78c969734a82ed87d1eb60564a3e84a2/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f636172766566782f63616c656e6461722e706e67)](https://codeclimate.com/github/carvefx/calendar)[![SensioLabsInsight](https://camo.githubusercontent.com/88e4501ee144659894864bf835aab5e6d7f1d00ec93d01251ecfb1302c4b8c53/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f32316630376565372d663630382d346133312d616530652d6432313464643936326534612f6d696e692e706e67)](https://insight.sensiolabs.com/projects/21f07ee7-f608-4a31-ae0e-d214dd962e4a)[![Build Status](https://camo.githubusercontent.com/c36fa8999140c9ac2687b32a1f3d065a83f1882c8daaebe1107e2374bc292cd1/68747470733a2f2f7472617669732d63692e6f72672f636172766566782f63616c656e6461722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/carvefx/calendar)

calendar
========

[](#calendar)

Calendar Library written in PHP

Usage
-----

[](#usage)

```
require('vendor/autoload.php');

use Carvefx\Calendar\Calendar;

$calendar = new Calendar(2014, 8);

foreach($calendar->getWeeks() as $week) {
  foreach($week->getDays() as $day) {
    $day->toDateString(); // 2014-07-27
    $day->isBlankDay(); // true
  }
}

```

Documentation
-------------

[](#documentation)

*Calendar* comes with 3 main classes:

- Calendar: represents a display of the current month, *including* the blank days that belong to the previous or next months
- Week: represents 7 days, regardless of the month it belongs to
- Day: represents a single day and wraps around the \\Carbon\\Carbon class

### Day API

[](#day-api)

```
$day = new Day(2014, 07, 01);
$day->setBlankDay(false);
$day->isBlankDay(); // returns a bool value, shows whether the current day is part of the current month

// Any of the \Carbon\Carbon methods work
$day->getDateString(); // 2014-07-01
$day->month; // 7

```

### Week API

[](#week-api)

```
$first_day = new Day(2014, 07, 01);
$week = new Week($first_day); // constructor requires the day the week starts at
$week->getDays(); // will result in an array containing 7 Day objects

```

### Calendar API

[](#calendar-api)

```
$calendar = new Calendar(2014, 8);
$calendar->setYear(2015);
$calendar->setMonth(7);
$calendar->getFirstDay(); // returns the first day of the month
$calendar->getLastDay(); // returns the last day of tyhe month
$calendar->getWeeks() // results in a number of Week objects

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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

4303d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/346798?v=4)[Adrian Mihai](/maintainers/carvefx)[@carvefx](https://github.com/carvefx)

---

Top Contributors

[![mikemand](https://avatars.githubusercontent.com/u/745184?v=4)](https://github.com/mikemand "mikemand (9 commits)")

---

Tags

calendar

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-google-calendar

Manage events on a Google Calendar

1.4k1.5M21](/packages/spatie-laravel-google-calendar)[benhall14/php-calendar

A simple PHP class to generate calendars.

9822.6k](/packages/benhall14-php-calendar)[unclecheese/eventcalendar

Event Calendar for the SilverStripe CMS

3215.2k8](/packages/unclecheese-eventcalendar)[silverstripe/event-calendar

Event Calendar for the SilverStripe CMS

318.5k3](/packages/silverstripe-event-calendar)

PHPackages © 2026

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