2017 © Pedro Peláez
 

library jalali-date-bundle

Bundle for working with jalali date

image

ce/jalali-date-bundle

Bundle for working with jalali date

  • Monday, April 22, 2013
  • by empire
  • Repository
  • 2 Watchers
  • 0 Stars
  • 278 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

jalalidate-bundle

Bundle for working with jalali date, (*1)

Installation

Using Composer, just require the ce/jalali-date-bundle package:, (*2)

javascript { "require": { "ce/jalali-date-bundle": "@dev-master" } }, (*3)

Otherwise, install the library and setup the autoloader yourself., (*4)

Usage

This library is under development. At this time, there is tow developed services., (*5)

JalaliDateTime

For working with Jalali date. You can use this services by getting the service and then calling provided methods., (*6)

``` php <?php, (*7)

// In your action of controller $jalaliDatetime = $this->get('ce.jalali_date.date_time'); $jalaliDatetime->currentDate(); // return (1392, 2, 7) for example $jalaliDatetime->getDayOfYear(1392, 11, 4); // Getting the number of passed days $jalaliDatetime->getWeekNumber(1392, 11, 4); // Getting the number of passed weeks $jalaliDatetime->getWeekDayOfFirstDayOfYear(1392); // 0 for Saturday and 6 for Friday, (*8)

```, (*9)

DateConverter

For converting Jalali to gregorian date and vice versa. You can use this services by getting the service and then calling provided methods., (*10)

``` php <?php, (*11)

// In your action of controller $jalaliDatetime = $this->get('ce.jalali_date.date_converter'); $jalaliDatetime->gregorianToJalali(2013, 1, 27); // Convert gregorian date to jalali $jalaliDatetime->jalaliToGregorian(1392, 11, 4); // Convert jalali date to gregorian $jalaliDatetime->jalaliToJd(1392, 11, 4); // Convert jalali date to julian $jalaliDatetime->jalaliToTimestamp(1392, 11, 4); // Getting timestamp of jalali date, (*12)

```, (*13)

Test

This bundle is fully tested., (*14)

License

JalaliDateBundle is released under the MIT License. See the bundled LICENSE file for details., (*15)

The Versions

22/04 2013

dev-master

9999999-dev

Bundle for working with jalali date

  Sources   Download

MIT

The Development Requires

by Hossein Zolfi

calendar bundle symfony jalali