PHPackages                             10quality/php-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. 10quality/php-calendar

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

10quality/php-calendar
======================

PHP calendar handler class.

v1.0.2(7y ago)0161MITPHPPHP &gt;=5.2

Since Feb 23Pushed 6y ago2 watchersCompare

[ Source](https://github.com/10quality/php-calendar)[ Packagist](https://packagist.org/packages/10quality/php-calendar)[ RSS](/packages/10quality-php-calendar/feed)WikiDiscussions v1.0 Synced 2mo ago

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

Calendar (PHP class)
====================

[](#calendar-php-class)

[![Latest Stable Version](https://camo.githubusercontent.com/4ed8f3c37f46f0df6e007545f4778092dae6bf270b58fbda74d4a7eac87d90c5/68747470733a2f2f706f7365722e707567782e6f72672f31307175616c6974792f7068702d63616c656e6461722f762f737461626c65)](https://packagist.org/packages/10quality/php-calendar)[![Total Downloads](https://camo.githubusercontent.com/4fa17efb304f2dcb95cb2563950e76dc9b8e75db9414e38c99963c932f282657/68747470733a2f2f706f7365722e707567782e6f72672f31307175616c6974792f7068702d63616c656e6461722f646f776e6c6f616473)](https://packagist.org/packages/10quality/php-calendar)[![License](https://camo.githubusercontent.com/4a5ae9faafd7bc7394cab2335ed8183d5d660a5bf563110dd7e15af9c5a33c42/68747470733a2f2f706f7365722e707567782e6f72672f31307175616c6974792f7068702d63616c656e6461722f6c6963656e7365)](https://packagist.org/packages/10quality/php-calendar)

Calendar handler library for PHP.

**NOTE:** This class will not echo / print the calendar.

Features:

- Handles monthly weeks and days.
- Ability to attach data.
- Able to be render in any custom template.

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

[](#installation)

With composer, make the dependecy required in your project:

```
composer require 10quality/php-calendar
```

Usage
-----

[](#usage)

The following example will build the calendar for the current month:

```
use TenQuality\Utility\Calendar;

$calendar = new Calendar();
$calendar->build();
```

### Attaching data

[](#attaching-data)

```
// Example
$data = array();
$data[] = $obj; // Either ARRAY or OBJECT

$calendar = new Calendar();
$calendar->data = $data;
// Array column or object filed containing the date related to each data row
$calendar->dataDateFiled = 'dateCreated';
// Build
$calendar->build();
```

### Printing

[](#printing)

Printing example:

```

            headers as $header) : ?>

        weeks as $week) : ?>

                days as $day) : ?>

                        number ?>
                        data as $row) : ?>

```

### Other properties or methods

[](#other-properties-or-methods)

Build calendar for a specific date:

```
$calendar = new Calendar('2017-01-25');
$calendar->build();
```

Get previous and next month dates:

```
$calendar = new Calendar('2017-01-25');
$calendar->nextMonthDate;
$calendar->prevMonthDate;
```

Coding guidelines
-----------------

[](#coding-guidelines)

PSR-4.

LICENSE
-------

[](#license)

The MIT License (MIT)

Copyright (c) 2017 [10Quality](http://www.10quality.com).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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 ~268 days

Total

4

Last Release

2565d ago

### Community

Maintainers

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

---

Top Contributors

[![amostajo](https://avatars.githubusercontent.com/u/1645908?v=4)](https://github.com/amostajo "amostajo (4 commits)")[![hopeseekr](https://avatars.githubusercontent.com/u/1125541?v=4)](https://github.com/hopeseekr "hopeseekr (1 commits)")

---

Tags

phpcalendar

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/10quality-php-calendar/health.svg)

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

###  Alternatives

[czemu/nova-calendar-tool

Calendar tool for Laravel Nova.

2915.8k](/packages/czemu-nova-calendar-tool)

PHPackages © 2026

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