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 -
setMode
getMode
date
en2ar
arabicMonths
hjConvert
jdToIslamic
islamicToJd
gregToJd
dateCorrection
[mode]:
Result (
var_dump
output):
Ar-PHP Manual
method setMode
[line
197
]
object setMode( [integer $mode = 1])
Setting value for $mode scalar
Tags:
return:
to build a fluent interface
author:
Khaled Al-Sham'aa <
khaled@ar-php.org
>
access:
public
Parameters:
integer
$mode
Output mode of date function where: 1) Hijri format (Islamic calendar) 2) Arabic month names used in Middle East countries 3) Arabic Transliteration of Gregorian month names 4) Both of 2 and 3 formats together 5) Libya style 6) Algeria and Tunis style 7) Morocco style 8) Hijri format (Islamic calendar) in English
Example
date_default_timezone_set
(
'UTC'
)
;
$time
= time
(
)
;
echo date
(
'l dS F Y h:i:s A'
,
$time
)
;
echo
'<br /><br />'
;
include
(
'./I18N/Arabic.php'
)
;
$obj
=
new
I18N_Arabic
(
'Date'
)
;
echo
$obj
->
date
(
'l dS F Y h:i:s A'
,
$time
)
;
echo
'<br /><br />'
;
$obj
->
setMode
(
2
)
;
echo
$obj
->
date
(
'l dS F Y h:i:s A'
,
$time
)
;
echo
'<br /><br />'
;
$obj
->
setMode
(
3
)
;
echo
$obj
->
date
(
'l dS F Y h:i:s A'
,
$time
)
;
echo
'<br /><br />'
;
$obj
->
setMode
(
4
)
;
echo
$obj
->
date
(
'l dS F Y h:i:s A'
,
$time
)
;
Popular
utf8Glyphs
(1224)
ar2en
(973)
money2str
(550)
en2ar
(400)
isFemale
(291)
Recent
stripTatweel
(7 hours)
stem
(7 hours)
tagText
(9 hours)
swapAe
(8 days)
normaliseHamza
(8 days)
Links
Homepage
Download
Bug Report
Feature Request
My Blog
My Twitter
Ads!
Home
|
Twitter
|
Blog
|
Contact
Copyright © 2006 - 2016 Khaled Al-Sham'aa