function cmfcCalendarV1Arabic::toGregorian in Calendar Systems 6.3
Same name and namespace in other branches
- 8 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::toGregorian()
- 8.2 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::toGregorian()
- 6 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::toGregorian()
- 7.3 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::toGregorian()
- 7 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::toGregorian()
- 7.2 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::toGregorian()
Islamic Calendar
Parameters
$i_y:
$i_m:
$i_d:
Return value
unknown_type
6 calls to cmfcCalendarV1Arabic::toGregorian()
- cmfcCalendarV1Arabic::date in calendar/
v1/ calendarSystems/ arabic.class.inc.php - Implementation of PHP date function This is the simplified version by Sina Salek
- cmfcCalendarV1Arabic::infoArrayToTimestamp in calendar/
v1/ calendarSystems/ arabic.class.inc.php - * Islamic Calendar *
- cmfcCalendarV1Arabic::makeTime in calendar/
v1/ calendarSystems/ arabic.class.inc.php - cmfcCalendarV1Arabic::monthStartDay in calendar/
v1/ calendarSystems/ arabic.class.inc.php - Find num of Day Begining Of Month ( 0 for Sat & 6 for Sun)
- cmfcCalendarV1Arabic::valueToTimeStamp in calendar/
v1/ calendarSystems/ arabic.class.inc.php
File
- calendar/
v1/ calendarSystems/ arabic.class.inc.php, line 486
Class
Code
function toGregorian($i_y, $i_m, $i_d) {
//$jd=$this->islamic_to_jd($i_y, $i_m, $i_d);
//list($gy, $gm, $gd)=JDToGregorian($jd);
$y = $i_y;
$m = $i_m;
$d = $i_d;
$jd = (int) ((11 * $y + 3) / 30) + 354 * $y + 30 * $m - (int) (($m - 1) / 2) + $d + 1948440 - 385;
//$this->julianday = $jd;
if ($jd > 2299160) {
$l = $jd + 68569;
$n = (int) (4 * $l / 146097);
$l = $l - (int) ((146097 * $n + 3) / 4);
$i = (int) (4000 * ($l + 1) / 1461001);
$l = $l - (int) (1461 * $i / 4) + 31;
$j = (int) (80 * $l / 2447);
$d = $l - (int) (2447 * $j / 80);
$l = (int) ($j / 11);
$m = $j + 2 - 12 * $l;
$y = 100 * ($n - 49) + $i + $l;
}
else {
$j = $jd + 1402;
$k = (int) (($j - 1) / 1461);
$l = $j - 1461 * $k;
$n = (int) (($l - 1) / 365) - (int) ($l / 1461);
$i = $l - 365 * $n + 30;
$j = (int) (80 * $i / 2447);
$d = $i - (int) (2447 * $j / 80);
$i = (int) ($j / 11);
$m = $j + 2 - 12 * $i;
$y = 4 * $k + $n + $i - 4716;
}
return array(
$y,
$m,
$d,
);
}