Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ben Yacoub Hatem  >  Islamic Calendar  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Sample use of the class
Class: Islamic Calendar
Class for islamic <-> georgian calendar conversion
Author: By
Last change:
Date: 2002-08-23 21:57
Size: 1,171 bytes
 

Contents

Class file image Download
<?php

echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1256\">";
    include ( 
"ICalendar.php" );

    
$acalend = new ICalendar();

    
$GDay=13;
    
$GMonth=8;
    
$GYear=2002;
    
    
$acdate=$acalend->GregorianToIslamic($GYear$GMonth$GDay);
    
    
    
$jour=$acdate[dayname];
    
$ADay=$acdate[day];
    
$AMonth=$acdate[monthname];
    
$AYear $acdate[year];

    echo 
"Georgian date : $GDay - $GMonth - $GYear<br>";
    echo 
"Islamic date :<font size=+1> $jour : $ADay - $AMonth - $AYear</font><br>";
    
/*
    $acalend->set_attributes(210, "#000000", "#ff0000", "#cccccc", 
                            11, 11, 12, "navy", "bold", 
                            20, "Arial, Helvetica, Sans-Serif");
    print $acalend->make_calendar();                             
//    print_r(get_object_vars($acalend));
*/

    
$IDay=18;
    
$IMonth=5;
    
$IYear=1423;
    
    
$acdate_g=$acalend->IslamicToGregorian($IYear$IMonth$IDay);
    
    
$jour=$acdate_g[dayname];
    
$ADay=$acdate_g[day];
    
$AMonth=$acdate_g[monthname];
    
$AYear $acdate_g[year];
    echo 
"<br>Islamic date : $IDay - $IMonth - $IYear<br>";
    echo 
"Georgian date<font size=+1> $jour : $ADay - $AMonth - $AYear</font><br>";
//    print_r(get_object_vars($acalend));

?>