Test Ar-PHP Functionality Online
Test PHP Function
Sub Class:
- Select one -
AutoSummarize
CharsetD
CompressStr
Date
Gender
Glyphs
Hiero
Identifier
KeySwap
Mktime
Normalise
Numbers
Query
Salat
Sort
Soundex
Standard
Stemmer
StrToTime
Transliteration
WordTag
Method:
- Select one -
setDate
setLocation
setConf
getPrayTime
getPrayTime2
getQibla
coordinate2deg
Result (
var_dump
output):
Ar-PHP Manual
method getPrayTime
[line
393
]
array getPrayTime( )
Alias for getPrayTime2 method
Tags:
return:
of Salat times + sun rise in the following format hh:mm where hh is the hour in local format and 24 mode mm is minutes with leading zero to be 2 digits always array items is [$Fajr, $Sunrise, $Dhuhr, $Asr, $Maghrib, $Isha, $Sunset, $Midnight, $Imsak, array $timestamps]
author:
Hamid Zarrabi-Zadeh <
zarrabi@scs.carleton.ca
>
author:
Khaled Al-Sham'aa <
khaled@ar-php.org
>
source:
http://praytimes.org/calculation
access:
public
Example
date_default_timezone_set
(
'UTC'
)
;
include
(
'./I18N/Arabic.php'
)
;
$obj
=
new
I18N_Arabic
(
'Salat'
)
;
$obj
->
setLocation
(
33.513
,
36.292
,
2
)
;
$obj
->
setDate
(
date
(
'j'
)
,
date
(
'n'
)
,
date
(
'Y'
))
;
$times
=
$obj
->
getPrayTime
(
)
;
echo
'<b>Damascus, Syria</b><br />'
;
echo date
(
'l F j, Y'
)
.
'<br /><br />'
;
echo
"
<b class=hilight>Imsak:</b> {
$times
[
8
]
}
<br />
"
;
echo
"
<b class=hilight>Fajr:</b> {
$times
[
0
]
}
<br />
"
;
echo
"
<b class=hilight>Sunrise:</b> {
$times
[
1
]
}
<br />
"
;
echo
"
<b class=hilight>Zuhr:</b> {
$times
[
2
]
}
<br />
"
;
echo
"
<b class=hilight>Asr:</b> {
$times
[
3
]
}
<br />
"
;
echo
"
<b class=hilight>Sunset:</b> {
$times
[
6
]
}
<br />
"
;
echo
"
<b class=hilight>Maghrib:</b> {
$times
[
4
]
}
<br />
"
;
echo
"
<b class=hilight>Isha:</b> {
$times
[
5
]
}
<br />
"
;
echo
"
<b class=hilight>Midnight:</b> {
$times
[
7
]
}
<br />
"
;
Popular
utf8Glyphs
(1224)
ar2en
(973)
money2str
(550)
en2ar
(400)
isFemale
(291)
Recent
getPrayTime2
(5 days)
getPrayTime
(5 days)
stripTatweel
(9 days)
stem
(9 days)
tagText
(9 days)
Links
Homepage
Download
Bug Report
Feature Request
My Blog
My Twitter
Ads!
Home
|
Twitter
|
Blog
|
Contact
Copyright © 2006 - 2016 Khaled Al-Sham'aa