<?php
int cal_to_jd ( int $calendar , int $month , int $day , int $year )
where,
$calendar = A calendar to convert from
( SEE the below TABLE )
$month = The month number in the selected calendar
$day = The day number in the selected calendar
$year = The year number in the selected calendar
?>
CONSTANT NAME | VALUES | CALENDAR NAME |
CAL_GREGORIAN | 0 or NULL | Gregorian |
CAL_JULIAN | 1 | Julian |
CAL_JEWISH | 2 | Jewish |
CAL_FRENCH | 3 | French Revolutionary |
ed48 |
<?php
$im = idate('m');
$id = idate('d');
$iy = idate('Y');
$cals = [ 'CAL_GREGORIAN' => CAL_GREGORIAN,
'CAL_JULIAN' => CAL_JULIAN,
'CAL_JEWISH' => CAL_JEWISH,
'CAL_FRENCH' => CAL_FRENCH ];
foreach($cals as $cl => $c)
{
echo $cl . ':<br>' . cal_to_jd($c, $im, $id, $iy) . '<br><br>';
}
?>