PHPackages                             microinginer/yii2-human-formatter - 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. microinginer/yii2-human-formatter

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

microinginer/yii2-human-formatter
=================================

v1.0.0(10y ago)81.4k1[1 PRs](https://github.com/microinginer/yii2-human-formatter/pulls)MITPHP

Since Aug 14Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/microinginer/yii2-human-formatter)[ Packagist](https://packagist.org/packages/microinginer/yii2-human-formatter)[ Docs](https://github.com/microinginer/yii2-human-formatter)[ RSS](/packages/microinginer-yii2-human-formatter/feed)WikiDiscussions master Synced today

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

yii2-human-formatter
====================

[](#yii2-human-formatter)

This formatter for yii2 which extend basic formatter. Override datetime and add method of formatting phones (only Russia's number)

[russian readme](https://github.com/microinginer/yii2-human-formatter/blob/master/README-RU.md)

Example
-------

[](#example)

```
echo Yii::$app->formatter->asDatetime(time()); // 0 seconds ago
echo Yii::$app->formatter->asDatetime(strtotime('- 1 day')); // Yesterday at 11:55 pm
echo Yii::$app->formatter->asDatetime('2014-08-23 23:55:12'); //  August 23 at 11:55 pm

echo Yii::$app->formatter->asPhone('89254552773'); //  +7 (925) 455-27-73
echo Yii::$app->formatter->asPhone('9254552773'); //  +7 (925) 455-27-73
echo Yii::$app->formatter->asPhone('925 455 27 73'); //  +7 (925) 455-27-73
echo Yii::$app->formatter->asPhone('(925) 455 27-73'); //  +7 (925) 455-27-73
```

```
echo GridView::widget([
    'dataProvider' => $dataProvider,
    'columns' => [
        'id',
        'title',
        'mobile:phone',
        'created_at:datetime',
        'description:ntext',
    ],
]);
```

Install
-------

[](#install)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist microinginer/yii2-human-formatter "dev-master"

```

or add

```
"microinginer/yii2-human-formatter": "dev-master"
```

to the require section of your composer.json file.

add to config:

```
$config = [
    ...
    'components' => [
        ...
        'formatter'  => [
            'class' => 'microinginer\humanFormatter\HumanFormatter',
        ]
        ...
    ]
    ...
]
```

###  Health Score

38

—

LowBetter than 86% of packages

Maintenance44

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

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

Unknown

Total

1

Last Release

3872d ago

### Community

Maintainers

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

---

Top Contributors

[![microinginer](https://avatars.githubusercontent.com/u/1836062?v=4)](https://github.com/microinginer "microinginer (11 commits)")

---

Tags

formatterdatetimeyii2human

### Embed Badge

![Health badge](/badges/microinginer-yii2-human-formatter/health.svg)

```
[![Health](https://phpackages.com/badges/microinginer-yii2-human-formatter/health.svg)](https://phpackages.com/packages/microinginer-yii2-human-formatter)
```

###  Alternatives

[kartik-v/php-date-formatter

A Javascript datetime formatting and manipulation library using PHP date-time formats.

461.5M1](/packages/kartik-v-php-date-formatter)[brussens/yii2-maintenance-mode

Maintenance mode component for Yii framework 2.x.x version.

78253.9k5](/packages/brussens-yii2-maintenance-mode)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1356.4k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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