You are here

function cmfcCalendarV1Gregorian::date_fa in Calendar Systems 5

Same name and namespace in other branches
  1. 8 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::date_fa()
  2. 8.2 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::date_fa()
  3. 6.3 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::date_fa()
  4. 6 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::date_fa()
  5. 7.3 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::date_fa()
  6. 7 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::date_fa()
  7. 7.2 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::date_fa()

File

calendar/v1/calendarSystems/gregorian.class.inc.php, line 234

Class

cmfcCalendarV1Gregorian
@desc

Code

function date_fa($date) {
  list($year, $month, $day) = preg_split('/-/', $date);
  list($jyear, $jmonth, $jday) = cmfcDateTime::gregorianToJalali($year, $month, $day);
  $date = jmaketime(0, 0, 0, $jmonth, $jday, $jyear);
  $date = jdate("d M Y", $date);
  return $date;
}