note 39059 deleted from ref.datetime by tomsommer
| From: | tomsommer@php.net | Date: | Thu, 15 Jan 2004 17:47:38 +0000 |
| Subject: | note 39059 deleted from ref.datetime by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-63635@lists.php.net to get a copy of this message | ||
Note Submitter: mam1411@hotmail.com
----
hi visualmind iam mohannad
see this code:
<?
// COPYRIGHT 2002 BY KHALED MAMDOUH www.vbzoom.com //
// Updated, and added Islamic names of months by Samir Greadly
// xushi at xushi dot homelinux dot org
function Hijri($GetDateFormat)
{
$TDays=round(strtotime($GetDateFormat)/(60*60*24));
$HYear=round($TDays/354.37419);
$Remain=$TDays-($HYear*354.37419);
$HMonths=round($Remain/29.531182);
$HDays=$Remain-($HMonths*29.531182);
$HYear=$HYear+1389;
$HMonths=$HMonths+10;
$HDays=$HDays+23;
if ($HDays>29.531188 and round($HDays)!=30)
{
$HMonths=$HMonths+1;
$HDays=Round($HDays-29.531182);
}
else
{
$HDays=Round($HDays);
}
if ($HMonths>12){$HMonths=$HMonths-12;$HYear=$HYear+1;}
$ResultDate="$HDays-$HMonths-$HYear";
$ResultDate="$ResultDate"."åÜ";
return $ResultDate;
}
function DateFormatDo($GetDateFormat,$DateFormat)
{
$Day=SubStr($GetDateFormat,8,2);
$Month=SubStr($GetDateFormat,5,2);
$Year=SubStr($GetDateFormat,0,4);
$ResultDate=@date ($DateFormat, mktime (0,0,0,$Month,$Day,$Year));
return $ResultDate;
}
// Get today's date
$today = date("Y-m-d");
// Date Format : YYYY-MM-DD
ECHO Hijri($today);
?>
(^_*)