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 -
strtotime
text:
now:
Result (
var_dump
output):
Ar-PHP Manual
static method strtotime
[line
128
]
static Integer strtotime( string $text, integer $now)
This method will parse about any Arabic textual datetime description into a Unix timestamp
Tags:
return:
Returns a timestamp on success, FALSE otherwise
author:
Khaled Al-Sham'aa <
khaled@ar-php.org
>
access:
public
Parameters:
string
$text
The string to parse, according to the GNU » Date Input Formats syntax (in Arabic).
integer
$now
The timestamp used to calculate the returned value.
Example
date_default_timezone_set
(
'UTC'
)
;
$time
= time
(
)
;
echo date
(
'l dS F Y'
,
$time
)
;
echo
'<br /><br />'
;
include
(
'./I18N/Arabic.php'
)
;
$obj
=
new
I18N_Arabic
(
'StrToTime'
)
;
$int
=
$obj
->
strtotime
(
$str
,
$time
)
;
$date
= date
(
'l dS F Y'
,
$int
)
;
echo
"
<b><font color=#FFFF00>Arabic String:</font></b>
$str
<br />
"
;
echo
"
<b><font color=#FFFF00>Unix Timestamp:</font></b>
$int
<br />
"
;
echo
"
<b><font color=#FFFF00>Formated Date:</font></b>
$date
<br />
"
;
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