PHPackages                             surda/datetime-period - 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. surda/datetime-period

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

surda/datetime-period
=====================

Datetime period control for Nette Framework

v1.0.0(6y ago)07MITPHPPHP &gt;=7.1

Since Oct 16Pushed 6y ago1 watchersCompare

[ Source](https://github.com/surda/datetime-period)[ Packagist](https://packagist.org/packages/surda/datetime-period)[ Docs](http://surani.cz)[ RSS](/packages/surda-datetime-period/feed)WikiDiscussions master Synced today

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

Datetime period control for Nette Framework
===========================================

[](#datetime-period-control-for-nette-framework)

---

[![Build Status](https://camo.githubusercontent.com/54c8d7f8fb84d283a3f018b980e7da4258a416fa9f630d5dd6676e07c2895f3f/68747470733a2f2f7472617669732d63692e6f72672f73757264612f6461746574696d652d706572696f642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/surda/datetime-period)[![Licence](https://camo.githubusercontent.com/7054f30c2dfae52ea23c99005be78d62e8d6efb594de67b5c75249aa48ed76a0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73757264612f6461746574696d652d706572696f642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/surda/datetime-period)[![Latest stable](https://camo.githubusercontent.com/8ac6ff5db87fc7399fa22be86cea7d5d57b266870ba621fb52c711aae1f550b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73757264612f6461746574696d652d706572696f642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/surda/datetime-period)[![PHPStan](https://camo.githubusercontent.com/441b5874ce4df0a2defc892979c96c46889b69cb32119d04f0b48626349f8bc9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d627269676874677265656e2e7376673f7374796c653d666c6174)](https://github.com/phpstan/phpstan)

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

[](#installation)

The recommended way to is via Composer:

```
composer require surda/datetime-period

```

After that you have to register extension in config.neon:

```
extensions:
    monthPeriod: Surda\DateTimePeriod\DI\MonthPeriodExtension
```

Configuration
-------------

[](#configuration)

Default

```
monthPeriod:
    templates:
        default: bootstrap4.default.latte
    useAjax: FALSE
```

Usage
-----

[](#usage)

Presenter

```
use Surda\DateTimePeriod\MonthPeriod\MonthPeriod;
use Surda\DateTimePeriod\MonthPeriod\MonthPeriodControl;
use Surda\DateTimePeriod\MonthPeriod\TMonthPeriod;

class ProductPresenter extends Nette\Application\UI\Presenter
{
    use TMonthPeriod;

    public function actionDefault(): void
    {
        /** @var MonthPeriodControl $mp */
        $mp = $this->getComponent('mp');

        /** @var MonthPeriod $monthPeriod */
        $monthPeriod = $mp->getMonthPeriod();
    }
}
```

Template

```
{control mp} or {control mp template}
```

Custom options
--------------

[](#custom-options)

```
class ProductPresenter extends Nette\Application\UI\Presenter
{
    /**
     * @return MonthPeriodControl
     */
    protected function createComponentMp(): MonthPeriodControl
    {
        $control = $this->monthPeriodControlFactory->create();

        $control->onChange[] = function (MonthPeriodControl $control, MonthPeriod $monthPeriod): void {
            $this->redirect('this');
        };

        return $control;
    }
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

2398d ago

### Community

Maintainers

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

---

Top Contributors

[![surda](https://avatars.githubusercontent.com/u/588663?v=4)](https://github.com/surda "surda (2 commits)")

---

Tags

nettedatetimecontrol

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/surda-datetime-period/health.svg)

```
[![Health](https://phpackages.com/badges/surda-datetime-period/health.svg)](https://phpackages.com/packages/surda-datetime-period)
```

###  Alternatives

[nette/utils

🛠 Nette Utils: lightweight utilities for string &amp; array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.

2.1k394.3M1.5k](/packages/nette-utils)[morilog/jalali

This Package helps developers to easily work with Jalali (Shamsi or Iranian) dates in PHP applications, based on Jalali (Shamsi) DateTime class.

9201.2M45](/packages/morilog-jalali)[contributte/di

Extra contrib to nette/di

465.8M18](/packages/contributte-di)[contributte/menu-control

Menu control for Nette framework

29108.6k1](/packages/contributte-menu-control)[carrooi/nette-menu

Menu control for Nette framework

2950.0k1](/packages/carrooi-nette-menu)[contributte/event-dispatcher

Best event dispatcher / event manager / event emitter for Nette Framework

292.4M19](/packages/contributte-event-dispatcher)

PHPackages © 2026

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