developit/yii2-pdate

yii2 intl persian date

1.0 2016-10-05 13:40 UTC

README

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist developit/yii2-pdate "~1.0"

or add

"developit/yii2-pdate": "~1.0"

to the require section of your composer.json file.

Usage

In view

use developit\pdate\Date;
echo Date::widget(); // 00:30 - 1395/07/14
// echo Date::widget(['value' => 1475594367]); // 18:49 - 1395/07/13
// echo Date::widget(['value' => time(), 'format' => 'yyyy/MM/dd']); // 1395/07/14