Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 20-07-2002, 09:12 PM
MHR's Avatar
MHR MHR is offline
Senior Webmaster
 
Join Date: Sep 2001
Location: epox
Posts: 435
Rep Power: 96
MHR is on a distinguished road
Send a message via ICQ to MHR Send a message via Yahoo to MHR
Lightbulb script release : hijriah thingy

well, aku tatau la benda ni elok ke tidak. I needed it for my school site so i wrote it,so aku nak share la.. sapa yang ade site sangkut paut ngan mende ni, try la.
PHP Code:
function intPart($floatNum){
    if ( 
$floatNum < -0.0000001) {
        return(
ceil($floatNum-0.0000001));
    } else {
        return(
floor($floatNum+0.0000001));
    }

}
$nama date("j"); $name1 date("n"); $name2 date("Y");
if (
$name2 <= 200){ $name2 $name2 2000 100;}
$d $nama$m $name1$y $name2;
if ((
$y 1582) || (($y == 1582) && ($m 10)) || (( $y == 1582) && ($m == 10) && ($d 14))) {
    
$jd intPart((1461*($y+4800+intPart(($m-14)/12)))/4)+intPart((368*($m-2-12*(intPart(($m-14)/12))))/12)-intPart((3* (intPart(($y+4900+intPart( ($m-14)/12))/100))) /4)+$d-32075;
} else {
    
$jd 367*$y-intPart((7*($y+5001+intPart(($m-9)/7)))/4)+intPart((275*$m)/9)+$d+1729777;
}
  
$JD=$jd;
  
$l=$jd-1948440+10632;
  
$n=intPart(($l-1)/10631);
  
$l=$l-10631*$n+354;
  
$j=(intPart((10985-$l)/5316))*(intPart((50*$l)/17719))+(intPart($l/5670))*(intPart((43*$l)/15238));
  
$l=$l-(intPart((30-$j)/15))*(intPart((17719*$j)/50))-(intPart($j/16))*(intPart((15238*$j)/43))+29;
  
$m=intPart((24*$l)/709);
  
$d=$l-intPart((709*$m)/24);
  
$y=30*$n+$j-30;

$month = array("","Muharam","Safar","RabuilAwal","RabiulAkhir","JamadilAwal","Rejab","Sya'ban","Ramadhan","Syawal","Zulkaedah","Zulhijjah");
$tarikh $d." ".$month[$m]." ".$y;
echo 
$tarikh
kalau taknak print terus, delete line 'echo $tarikh' and bubuh ni dalam file and call it from somewhere.
__________________
Munzir + "/^[Hh](a)(z)\1\2[iI]$/"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 21-07-2002, 12:30 AM
mozaks's Avatar
Senior Webmaster
 
Join Date: Jul 2001
Location: Jail
Posts: 228
Rep Power: 94
mozaks is on a distinguished road
Send a message via ICQ to mozaks Send a message via AIM to mozaks Send a message via Yahoo to mozaks
thanks,,.. complicated gak kiraan dia
__________________
Malaysia's Best Web Hosting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 21-07-2002, 12:49 AM
MHR's Avatar
MHR MHR is offline
Senior Webmaster
 
Join Date: Sep 2001
Location: epox
Posts: 435
Rep Power: 96
MHR is on a distinguished road
Send a message via ICQ to MHR Send a message via Yahoo to MHR
*cough* *cough*
__________________
Munzir + "/^[Hh](a)(z)\1\2[iI]$/"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 14-08-2002, 05:19 PM
zaimlah's Avatar
Inspired Webmaster
 
Join Date: Jul 2001
Location: ttdi
Posts: 129
Rep Power: 92
zaimlah is on a distinguished road
cun.

aku nak tanya ni, dari mana kau dapat formula dia ah? aku dulu ada try buat jugak, tapi tak jadi...

bukannya aku yg buat la, tapi aku 'translate' satu program VB ni kepada PHP... tanpa memahami kiraannya yg sebenar... kira macam 'port'-kan la...

kau boleh explain kat aku tak camana nak kira? heh
__________________
blog:zaim_bakar_blog | biz:box
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 14-08-2002, 10:12 PM
MHR's Avatar
MHR MHR is offline
Senior Webmaster
 
Join Date: Sep 2001
Location: epox
Posts: 435
Rep Power: 96
MHR is on a distinguished road
Send a message via ICQ to MHR Send a message via Yahoo to MHR
well... muahaha
aku convert version javascript aje
aku jumpa javascript, pastu aku amik, convert to php. senang sikit so, bertuah la aku kalau aku leh buat calculation cam tu
i hate math
__________________
Munzir + "/^[Hh](a)(z)\1\2[iI]$/"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
List of free press release sites limcs Other Internet Marketing Methods 16 27-10-2006 11:06 AM
AOL screwed up! Release search data for 650'000 users limcs News and Announcements 3 12-08-2006 08:54 PM
Windows Official Release On Mac Announced gethosted Mamak Stall 1 07-04-2006 03:28 PM
News/Press Release hftey Other Internet Marketing Methods 10 18-01-2006 09:04 AM
cut & paste hijriah <-> masehi converter script zumaidi Mamak Stall 0 30-04-2004 05:24 PM


All times are GMT +8. The time now is 03:18 AM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61