Related Class Documentation
<?php
date_default_timezone_set('UTC');
$time = time();
echo date('l dS F Y', $time);
echo '<br /><br />';
require('I18N/Arabic.php');
$Arabic = new I18N_Arabic('StrToTime');
$forms = array('الخميس القادم',
'الأحد الماضي',
'بعد أسبوع وثلاثة أيام',
'منذ تسعة أيام',
'قبل إسبوعين',
'2 آب 1975',
'1 رمضان 1429');
foreach ($forms as $str) {
$int = $Arabic->strtotime($str, $time);
$date = date('l dS F Y', $int);
echo "<b><font color=#FFFF00>
Arabic String:</font></b>
<spin dir=rtl>$str</spin>
<br /><b><font color=#FFFF00>
Unix Timestamp:</font>
</b> $int<br />
<b><font color=#FFFF00>
Formated Date:</font></b> $date
<br /><br />";
}
?>
|
Saturday 21st December 2024
Arabic String:
الخميس القادم
Unix Timestamp:
1735171200
Formated Date: Thursday 26th December 2024
Arabic String:
الأحد الماضي
Unix Timestamp:
1734220800
Formated Date: Sunday 15th December 2024
Arabic String:
بعد أسبوع وثلاثة أيام
Unix Timestamp:
1735664753
Formated Date: Tuesday 31st December 2024
Arabic String:
منذ تسعة أيام
Unix Timestamp:
1734023153
Formated Date: Thursday 12th December 2024
Arabic String:
قبل إسبوعين
Unix Timestamp:
1733591153
Formated Date: Saturday 07th December 2024
Arabic String:
2 آب 1975
Unix Timestamp:
176169600
Formated Date: Saturday 02nd August 1975
Arabic String:
1 رمضان 1429
Unix Timestamp:
1220227200
Formated Date: Monday 01st September 2008
|
|