2017 © Pedro Peláez
 

yii2-extension yii2-ru-date

Behavior for Russian date.

image

sergmoro1/yii2-ru-date

Behavior for Russian date.

  • Tuesday, February 13, 2018
  • by sergmoro1
  • Repository
  • 1 Watchers
  • 0 Stars
  • 44 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 5 % Grown

The README.md

Yii2 behavior for date fields processing

The Behavior class for operations with date fields in Russian format., (*1)

No more maintained, please use sergmoro1\yii2-ru-kit., (*2)

Installation

$ composer require sergmoro1/yii2-ru-date "dev-master"

Usage

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)

The Versions

13/02 2018

dev-master

9999999-dev

Behavior for Russian date.

  Sources   Download

MIT

The Requires

 

by Sergey Morozov

yii2 date russian