Example Output:

Tuesday 09th February 2010

الخميس القادم - 1265846400 - Thursday 11th February 2010

الأحد الماضي - 1265500800 - Sunday 07th February 2010

بعد أسبوع وثلاثة أيام - 1266565974 - Friday 19th February 2010

منذ تسعة أيام - 1264924374 - Sunday 31st January 2010

قبل إسبوعين - 1264492374 - Tuesday 26th January 2010

2 آب 1975 - 176169600 - Saturday 02nd August 1975

1 رمضان 1429 - 1220313600 - Tuesday 02nd September 2008


Example Code:

<?php
    date_default_timezone_set
('UTC');
    
$time time();

    echo 
date('l dS F Y'$time);
    echo 
'<br /><br />';

    include(
'I18N_Arabic.php');
    
$Arabic = new I18N_Arabic('StrToTime');

    
$str  'الخميس القادم';
    
$int  $Arabic->strtotime($str$time);
    
$date date('l dS F Y'$int);
    echo 
"$str - $int - $date<br /><br />";
    
    
$str  'الأحد الماضي';
    
$int  $Arabic->strtotime($str$time);
    
$date date('l dS F Y'$int);
    echo 
"$str - $int - $date<br /><br />";
    
    
$str  'بعد أسبوع وثلاثة أيام';
    
$int  $Arabic->strtotime($str$time);
    
$date date('l dS F Y'$int);
    echo 
"$str - $int - $date<br /><br />";
    
    
$str  'منذ تسعة أيام';
    
$int  $Arabic->strtotime($str$time);
    
$date date('l dS F Y'$int);
    echo 
"$str - $int - $date<br /><br />";
    
    
$str  'قبل إسبوعين';
    
$int  $Arabic->strtotime($str$time);
    
$date date('l dS F Y'$int);
    echo 
"$str - $int - $date<br /><br />";
    
    
$str  '2 آب 1975';
    
$int  $Arabic->strtotime($str$time);
    
$date date('l dS F Y'$int);
    echo 
"$str - $int - $date<br /><br />";
    
    
$str  '1 رمضان 1429';
    
$int  $Arabic->strtotime($str$time);
    
$date date('l dS F Y'$int);
    echo 
"$str - $int - $date<br /><br />";
?>

Total execution time is 0.041800975799561 seconds
Amount of memory allocated to this script is 317112 bytes

Names of included or required files:

Related Class Documentation