2017 © Pedro Peláez
 

yii2-extension yii2-jdf

Convert Any Type Of Date

image

sgh370/yii2-jdf

Convert Any Type Of Date

  • Saturday, March 18, 2017
  • by sgh370
  • Repository
  • 0 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 8 % Grown

The README.md

Persian Date Converting

Convert Any Type Of Date, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist sgh370/yii2-jdf "dev-master"

or add, (*4)

"sgh370/yii2-jdf": "dev-master"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by :, (*6)


1) add the following line in component section in web.config file: 'components' => [ ... 'jdf' => [ 'class' => '\sgh370\jdf\Jdf' ], ... ] 2) use the following functions and pass needed arguments: \Yii::$app->jdf->jdate($format, $timestamp = '', $none = '', $time_zone = 'Asia/Tehran', $tr_num = 'fa'); \Yii::$app->jdf->jstrftime($format, $timestamp = '', $none = '', $time_zone = 'Asia/Tehran', $tr_num = 'fa'); \Yii::$app->jdf->jmktime($h = '', $m = '', $s = '', $jm = '', $jd = '', $jy = '', $none = '', $timezone = 'Asia/Tehran'); \Yii::$app->jdf->jgetdate($timestamp = '', $none = '', $timezone = 'Asia/Tehran', $tn = 'en'); \Yii::$app->jdf->jcheckdate($jm, $jd, $jy); \Yii::$app->jdf->tr_num($str, $mod = 'en', $mf = '٫'); \Yii::$app->jdf->jdate_words($array, $mod = ''); \Yii::$app->jdf->gregorian_to_jalali($gy, $gm, $gd, $mod = ''); \Yii::$app->jdf->jalali_to_gregorian($jy, $jm, $jd, $mod = '');

The Versions

18/03 2017

dev-master

9999999-dev

Convert Any Type Of Date

  Sources   Download

GPL-2.0

The Requires

 

by Avatar sgh370

extension yii2 jdf jdate persian date