Preferred code conversion date to AD Hijra only the language of Java Script
function formatTimestamp($time) {
global $datetime, $locale;
ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
$time = mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]);
// COPYRIGHT 2002 BY Ahmed-Samara www.daniweb.com/forums/member173926.html //
$TDays=round($time/(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);
}
// COPYRIGHT 2002 BY Ahmed-Samara www.daniweb.com/forums/member173926.html //
if ($HMonths>12) {
$HMonths=$HMonths-12;
$HYear = $HYear+1;
}
$datetime = "$HDays-$HMonths-$HYear åÜ";
return($datetime);
}
But the problem in line code PHP, in directional mkTime did not get Vankhn reservists in the asp. Even Get the appropriate number ...
function formatTimestamp(xtime)
' global $datetime, $locale;
'ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
'$time = mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]);
'// COPYRIGHT 2002 BY Ahmed-Samara www.daniweb.com/forums/member173926.html //
TDays=round(xtime/(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) then
HMonths=HMonths+1
HDays=Round(HDays-29.531182)
else
HDays=Round(HDays)
end if
'// COPYRIGHT 2002 BY Ahmed-Samara www.daniweb.com/forums/member173926.html //
if (HMonths>12) then
HMonths=HMonths-12
HYear = HYear+1
end if
datetime = HDays & "-" & HMonths & "-" & HYear & " åÜ"
Response.Write(datetime)
end function
But the problem in line code PHP, in directional mkTime did not get Vankhn reservists in the asp. Even Get the appropriate number ...