<?php
arr cal_info ( int $calendar = -1 )
where,
$calendar = The calendar to get the information
( SEE the below TABLE )
?>
CONSTANT NAME | VALUES | CALENDAR NAME |
NO NAME | -1 | ALL BELOW |
CAL_GREGORIAN | 0 or NULL | Gregorian |
CAL_JULIAN | 1 | Julian |
CAL_JEWISH | 2 | Jewish |
CAL_FRENCH | 3 | French Revolutionary |
ed48 |
ARRAY INDEXES | MEANING |
[calname] | Calendar name |
[calsymbol] | Calendar symbol |
[month] | Calendar month names |
[abbrevmonth] | Abbreviation for calendar month names |
[maxdaysinmonth] | Maximum number of days for the month |
ed48 |
<?php
$cal01 = cal_info(NULL);
// CAL_GREGORIAN
echo 'Month Names ( Abbr ):<br><br>';
for($m = 1; $m <= 12; $m++)
{
echo $cal01['months'][$m] . ' ( ' . $cal01['abbrevmonths'][$m] . ' )<br>';
}
echo '<br>Maximun days in Month: ' . $cal01['maxdaysinmonth'] . '<br>';
echo 'Calendar Name: ' . $cal01['calname'] . '<br>';
echo 'Calendar Symbol: ' . $cal01['calsymbol'] . '<br>';
?>
<?php
$cal02 = cal_info(0);
// CAL_GREGORIAN
echo 'Month Names ( Abbr ):<br><br>';
for($m = 1; $m <= 12; $m++)
{
echo $cal02['months'][$m] . ' ( ' . $cal02['abbrevmonths'][$m] . ' )<br>';
}
echo '<br>Maximun days in Month: ' . $cal02['maxdaysinmonth'] . '<br>';
echo 'Calendar Name: ' . $cal02['calname'] . '<br>';
echo 'Calendar Symbol: ' . $cal02['calsymbol'] . '<br>';
?>
<?php
$cal03 = cal_info(1);
// CAL_JULIAN
echo 'Month Names ( Abbr ):<br><br>';
for($m = 1; $m <= 12; $m++)
{
echo $cal03['months'][$m] . ' ( ' . $cal03['abbrevmonths'][$m] . ' )<br>';
}
echo '<br>Maximun days in Month: ' . $cal03['maxdaysinmonth'] . '<br>';
echo 'Calendar Name: ' . $cal03['calname'] . '<br>';
echo 'Calendar Symbol: ' . $cal03['calsymbol'] . '<br>';
?>
<?php
$cal04 = cal_info(2);
// CAL_JEWISH
echo 'Month Names ( Abbr ):<br><br>';
for($m = 1; $m <= 13; $m++)
{
echo $cal04['months'][$m] . ' ( ' . $cal04['abbrevmonths'][$m] . ' )<br>';
}
echo '<br>Maximun days in Month: ' . $cal04['maxdaysinmonth'] . '<br>';
echo 'Calendar Name: ' . $cal04['calname'] . '<br>';
echo 'Calendar Symbol: ' . $cal04['calsymbol'] . '<br>';
?>
<?php
$cal05 = cal_info(3);
// CAL_FRENCH
echo 'Month Names ( Abbr ):<br><br>';
for($m = 1; $m <= 13; $m++)
{
echo $cal05['months'][$m] . ' ( ' . $cal05['abbrevmonths'][$m] . ' )<br>';
}
echo '<br>Maximun days in Month: ' . $cal05['maxdaysinmonth'] . '<br>';
echo 'Calendar Name: ' . $cal05['calname'] . '<br>';
echo 'Calendar Symbol: ' . $cal05['calsymbol'] . '<br>';
?>
<?php
$cal000 = cal_info(0);
$cal001 = cal_info(1);
$cal002 = cal_info(2);
$cal003 = cal_info(3);
echo '<br><pre><u>' . $cal000['calname'] . '</u><br><br>';
print_r($cal000);
echo '<br><br><br><u>' . $cal001['calname'] . '</u><br><br>';
print_r($cal001);
echo '<br><br><br><u>' . $cal002['calname'] . '</u><br><br>';
print_r($cal002);
echo '<br><br><br><u>' . $cal003['calname'] . '</u><br><br>';
print_r($cal003);
echo '</pre>';
?>