PHPackages                             venca-x/date-cz - 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. venca-x/date-cz

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

venca-x/date-cz
===============

Nette addon. Convert month number to name or day number to name (CZ)

v1.1.0(8y ago)0125MITPHPPHP &gt;=7.1

Since Aug 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/venca-x/date-cz)[ Packagist](https://packagist.org/packages/venca-x/date-cz)[ RSS](/packages/venca-x-date-cz/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

Date-cz
=======

[](#date-cz)

[![Build Status](https://camo.githubusercontent.com/4cbf8e929833ce93c25a3ed822d9401af7589de7f4cfd1a49d2a8937893fbc31/68747470733a2f2f7472617669732d63692e6f72672f76656e63612d782f646174652d637a2e737667)](https://travis-ci.org/venca-x/date-cz)[![Coverage Status](https://camo.githubusercontent.com/0282eebf68543759fe498f6baa4f9cc3f7d6bba97bbb9da143a73dcfe019792c/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f76656e63612d782f646174652d637a2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/venca-x/date-cz?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/616b008957daf22ee8d55eae7e081c65cf7b3505dc929ed8073dc7c7158f6633/68747470733a2f2f706f7365722e707567782e6f72672f76656e63612d782f646174652d637a2f762f737461626c652e737667)](https://packagist.org/packages/venca-x/date-cz)[![Latest Unstable Version](https://camo.githubusercontent.com/bc560bfc2d3cd18967804975ef2f37a6d72e79e3dc27b47aa0014d5bdab5924a/68747470733a2f2f706f7365722e707567782e6f72672f76656e63612d782f646174652d637a2f762f756e737461626c652e737667)](https://packagist.org/packages/venca-x/date-cz)[![Total Downloads](https://camo.githubusercontent.com/33225d32eff4e953e16a4550784ad38237c6f402f87472a00f4a08cc679ff3c5/68747470733a2f2f706f7365722e707567782e6f72672f76656e63612d782f646174652d637a2f646f776e6c6f6164732e737667)](https://packagist.org/packages/venca-x/date-cz)[![License](https://camo.githubusercontent.com/28a1a5fc63222bb937c3cd40a70a2c1442843daa0f515e17397c92a443b0837e/68747470733a2f2f706f7365722e707567782e6f72672f76656e63612d782f646174652d637a2f6c6963656e73652e737667)](https://packagist.org/packages/venca-x/date-cz)

Nette addon for czech days and month names

VersionPHP Recommended Nettedev-master&gt;= 7.1Nette 3.01.1.x&gt;= 7.1Nette 3.01.0.x&gt;= 5.5Nette 2.4, 2.3Installation
------------

[](#installation)

Install plugin to your dependencies with composer:

```
composer require venca-x/date-cz:^1.1

```

**For dev version install**:

```
composer require venca-x/date-cz:dev-master

```

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

[](#configuration)

Register filter for Nette/Layout. You do not have to use Nette/Layout, then call **$dateCZ-&gt;getMonthName($text)** in php code.

BasePresenter.php

```
use VencaX;
//...
protected function beforeRender()
{
    parent::beforeRender();

    $this->template->addFilter('monthNameCZ', function ($dayNumber) {
        $dateCZ = new VencaX\DateCZ();
        return $dateCZ->getMonthName($dayNumber);
    });

    $this->template->addFilter('dayNameCZ', function ($dayNumber) {
        $dateCZ = new VencaX\DateCZ();
        return $dateCZ->getDayName($dayNumber);
    });

    $this->template->addFilter('dayNameShortCZ', function ($dayNumber) {
        $dateCZ = new VencaX\DateCZ();
        return $dateCZ->getShortDayName($dayNumber);
    });
}
```

Usage
-----

[](#usage)

To display the correct day use PHP function for formating date:

FormatDescriptionExplain'n'Numeric representation of a month, without leading zeros1 through 12'N'ISO-8601 numeric representation of the day of the week (added in PHP 5.1.0)1 (for Monday) through 7 (for Sunday)Use in Nette/Layout:

```
{$dateTime->date|date:'n'|monthNameCZ} (* month name*)

{$dateTime->date|date:'N'|dayNameCZ} (* day name*)

{$dateTime->date|date:'N'|dayNameShortCZ} (* short day name*)
```

Use in PHP:

```
$dateCZ = new VencaX\DateCZ();
echo $dateCZ->monthNameCZ($dateTime->date->format('n')); //month name

echo $dateCZ->dayNameCZ($dateTime->date->format('N')); //day name

echo $dateCZ->dayNameShortCZ($dateTime->date->format('N')); //short day name
```

Output example
--------------

[](#output-example)

```
//monthNameCZ
echo $dateCZ->monthNameCZ(1); //leden
echo $dateCZ->monthNameCZ(2); //únor
echo $dateCZ->monthNameCZ(3); //březen
echo $dateCZ->monthNameCZ(4); //duben
echo $dateCZ->monthNameCZ(5); //květen
echo $dateCZ->monthNameCZ(6); //červen
echo $dateCZ->monthNameCZ(7); //červenec
echo $dateCZ->monthNameCZ(8); //srpen
echo $dateCZ->monthNameCZ(9); //září
echo $dateCZ->monthNameCZ(10); //říjen
echo $dateCZ->monthNameCZ(11); //listopad
echo $dateCZ->monthNameCZ(12); //prosinec

//dayNameCZ
echo $dateCZ->dayNameCZ(1); //pondělí
echo $dateCZ->dayNameCZ(2); //úterý
echo $dateCZ->dayNameCZ(3); //středa
echo $dateCZ->dayNameCZ(4); //čtvrtek
echo $dateCZ->dayNameCZ(5); //pátek
echo $dateCZ->dayNameCZ(6); //sobota
echo $dateCZ->dayNameCZ(7); //neděle

//dayNameShortCZ
echo $dateCZ->dayNameShortCZ(1); //po
echo $dateCZ->dayNameShortCZ(2); //út
echo $dateCZ->dayNameShortCZ(3); //st
echo $dateCZ->dayNameShortCZ(4); //čt
echo $dateCZ->dayNameShortCZ(5); //pá
echo $dateCZ->dayNameShortCZ(6); //so
echo $dateCZ->dayNameShortCZ(7); //ne
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Every ~1266 days

Total

2

Last Release

3028d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/118375a8804ba0a6a9e67531be1064cf2cf1ddd4669de5ca7cdc6f1618add53e?d=identicon)[venca-x](/maintainers/venca-x)

---

Top Contributors

[![venca-x](https://avatars.githubusercontent.com/u/4173836?v=4)](https://github.com/venca-x "venca-x (28 commits)")

### Embed Badge

![Health badge](/badges/venca-x-date-cz/health.svg)

```
[![Health](https://phpackages.com/badges/venca-x-date-cz/health.svg)](https://phpackages.com/packages/venca-x-date-cz)
```

###  Alternatives

[symfony/polyfill-php72

Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions

4.8k674.7M31](/packages/symfony-polyfill-php72)[symfony/polyfill-intl-icu

Symfony polyfill for intl's ICU-related data and classes

2.6k251.4M96](/packages/symfony-polyfill-intl-icu)[nette/php-generator

🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.5 features.

2.2k64.2M574](/packages/nette-php-generator)[consolidation/site-process

A thin wrapper around the Symfony Process Component that allows applications to use the Site Alias library to specify the target for a remote call.

5345.3M8](/packages/consolidation-site-process)[sycho/flarum-profile-cover

Adds the ability to add a cover image to a profile.

1836.6k](/packages/sycho-flarum-profile-cover)

PHPackages © 2026

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