dev-master
9999999-devBundle for working with jalali date
MIT
The Development Requires
by Hossein Zolfi
calendar bundle symfony jalali
Wallogit.com
2017 © Pedro Peláez
Bundle for working with jalali date
Bundle for working with jalali date, (*1)
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)
This library is under development. At this time, there is tow developed services., (*5)
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)
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)
This bundle is fully tested., (*14)
JalaliDateBundle is released under the MIT License. See the bundled LICENSE file for details., (*15)
Bundle for working with jalali date
MIT
calendar bundle symfony jalali