icap_create_calendar

(PHP 4 <= 4.2.3)

icap_create_calendar --  Create a new calendar

Description

string icap_create_calendar ( int stream_id, string calendar )

警告

本函数暂无文档,仅有参数列表。


add a note add a note User Contributed Notes
nrkkalyan at rediffmail dot com
05-Mar-2005 04:36
Simply copy this and save as cal.php. you will get a calender for the corresponding month you select.

<?PHP

$first_date
= mktime(12,0,0,2,23,2005);
$second_date = mktime(12,0,0,2,27,2005);
$offset = $second_date-$first_date;

$noofdays= floor($offset/60/60/24);

if(
$noofdays==0){
  
$hours=8;
}
else{
  
$hours=$noofdays * 8;
}
 echo
$hours ."<br>". $noofdays;

$month=date("m");
$year=date("Y");
$num = cal_days_in_month(CAL_GREGORIAN,$month,$year ); // 31
echo "<br>There was $num days in $month $year";
echo
"<br>";
echo
" <table>";
for (
$i=1;$i<=$num; )
   {
echo
"<tr>";
   for(
$j=0;$j<7 & $i<=$num;$j++)
   {

echo
" <td>";
    
     echo
$i . "  ";
    
$i++;
echo
" </td>";
   }
echo
"</tr>";
   }
   echo
" </table>";

 
?>