PHPackages                             kolyasiryk/yii2-date-behavior - 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. kolyasiryk/yii2-date-behavior

ActiveYii2-behavior[Utility &amp; Helpers](/categories/utility)

kolyasiryk/yii2-date-behavior
=============================

This behavior makes it easy to save and to take date in correct format.

v1.0.5(8y ago)025.1kMITPHPPHP &gt;=7.0.0

Since Nov 3Pushed 7y agoCompare

[ Source](https://github.com/KolyaSirik/yii2-date-behavior)[ Packagist](https://packagist.org/packages/kolyasiryk/yii2-date-behavior)[ Docs](https://github.com/KolyaSirik/yii2-date-behavior)[ RSS](/packages/kolyasiryk-yii2-date-behavior/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

Yii2 Date Behavior
==================

[](#yii2-date-behavior)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/). Check the [composer.json](https://github.com/kartik-v/yii2-widget-datetimepicker/blob/master/composer.json) for this extension's requirements and dependencies. Read this [web tip /wiki](http://webtips.krajee.com/setting-composer-minimum-stability-application/) on setting the `minimum-stability` settings for your application's composer.json.

To install, either run

```
$ php composer.phar require kolyasiryk/yii2-date-behavior "*"

```

or add

```
"kolyasiryk/yii2-date-behavior": "*"

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

```
    public function behaviors()
    {
        return [
            [
                'class' => \kolyasiryk\behaviors\DateBehavior::className(),
                'datetimeDisplayFormat' => 'php:d.m.Y H:i',
                'attributes' => [
                    'start_date' => 'datetime',
                    'end_date' => 'datetime',
                ],
            ],
        ];
    }
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity62

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 ~38 days

Recently: every ~48 days

Total

6

Last Release

2920d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ee86eced9332e32f327173d827db7eb2dea8044f1986ce29d8074bc78ea6c0b?d=identicon)[kolyasiryk](/maintainers/kolyasiryk)

---

Top Contributors

[![KolyaSirik](https://avatars.githubusercontent.com/u/11480548?v=4)](https://github.com/KolyaSirik "KolyaSirik (1 commits)")

---

Tags

dateyii2Behavioractive-record

### Embed Badge

![Health badge](/badges/kolyasiryk-yii2-date-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/kolyasiryk-yii2-date-behavior/health.svg)](https://phpackages.com/packages/kolyasiryk-yii2-date-behavior)
```

###  Alternatives

[mdmsoft/yii2-autonumber

Auto number extension for the Yii framework

1830.9k](/packages/mdmsoft-yii2-autonumber)[baibaratsky/yii2-serialized-attributes-behavior

Yii2 Serialized Attributes Behavior

1174.1k9](/packages/baibaratsky-yii2-serialized-attributes-behavior)[asinfotrack/yii2-audittrail

Yii2-audittrail is a behavior and a set of widgets to track all modifications performed on a model

1727.0k](/packages/asinfotrack-yii2-audittrail)

PHPackages © 2026

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