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
format:
timestamp:
[correction]:
Result (
var_dump
output):
Ar-PHP Manual
method date
[line
240
]
string date( string $format, integer $timestamp, [integer $correction = 0])
Format a local time/date in Arabic string
Tags:
return:
Format Arabic date string according to given format string using the given integer timestamp or the current local time if no timestamp is given.
author:
Khaled Al-Sham'aa <
khaled@ar-php.org
>
access:
public
Parameters:
string
$format
Format string (same as PHP date function)
integer
$timestamp
Unix timestamp
integer
$correction
To apply correction factor (+/- 1-2) to standard hijri calendar
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
(1182)
ar2en
(963)
money2str
(550)
en2ar
(394)
isFemale
(291)
Recent
a4Lines
(8 days)
utf8Glyphs
(8 days)
ar2en
(8 days)
money2str
(30 days)
str2graph
(30 days)
Links
Homepage
Download
Bug Report
Feature Request
My Blog
My Twitter
Ads!
Home
|
Twitter
|
Blog
|
Contact
Copyright © 2006 - 2016 Khaled Al-Sham'aa