dev-master
9999999-devBehavior for Russian date.
MIT
The Requires
- php >=5.4.0
- yiisoft/yii2 *
by Sergey Morozov
yii2 date russian
Behavior for Russian date.
The Behavior class for operations with date fields in Russian format., (*1)
No more maintained, please use sergmoro1\yii2-ru-kit., (*2)
$ composer require sergmoro1/yii2-ru-date "dev-master"
You should define behavior in a Model class., (*3)
use sergmoro1\rudate\RuDate; class Post extends ActiveRecord { public function behaviors() { return [ 'RuDate' => ['class' => RuDate::className()] ]; }
And use it in appropriate place in a view., (*4)
<?= $model->getFullDate('created_at'); ?>
Only month and year., (*5)
<?= $model->getFullDate('created_at', 'M Y'); ?> // Фев 2018
Full month, day and year., (*6)
<?= $model->getFullDate('created_at', 'F d из t, Y (e)'); ?> // Февраль 13 из 28, 2018 (UTC)
Behavior for Russian date.
MIT
yii2 date russian