Arabic
[ class tree: Arabic ] [ index: Arabic ] [ all elements ]

Class: ArStrToTime

Source Location: /sub/ArStrToTime.class.php

Class Overview


This PHP class parse about any Arabic textual datetime description into a Unix timestamp


Author(s):

Copyright:

  • 2009 Khaled Al-Shamaa

Variables

Methods



Class Details

[line 89]
This PHP class parse about any Arabic textual datetime description into a Unix timestamp



Tags:

author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
copyright:  2009 Khaled Al-Shamaa
link:  http://www.ar-php.org
license:  LGPL


[ Top ]


Class Variables

static $_hj = array('محرم', 'صفر', 'ربيع الأول', 'ربيع الثاني', 'جمادى الأولى', 'جمادى الثانية',
                               'رجب', 'شعبان', 'رمضان', 'شوال', 'ذو القعدة', 'ذو الحجة')

[line 91]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $_patterns = array('أ', 'إ', 'آ', 'ة', 'بعد', 'تالي', 'لاحق', 'قادم', 'سابق', 'فائت',
                                     'ماضي', 'منذ', 'قبل', 'يوم', 'ايام', 'ساعه', 'ساعتان', 'ساعتين', 'ساعات', 'دقيقه',
                                     'دقيقتان', 'دقيقتين', 'دقائق', 'ثانيه', 'ثانيتين', 'ثانيتان', 'ثواني', 'اسبوعين', 'اسبوعان', 'اسابيع',
                                     'اسبوع', 'شهرين', 'شهران', 'اشهر', 'شهور', 'شهر', 'سنه', 'سنتين', 'سنتان', 'سنوات',
                                     'سنين', 'صباحا', 'فجرا', 'قبل الظهر', 'مساء', 'عصرا', 'بعد الظهر', 'ليلا', 'غد', 'بارحة',
                                     'أمس', 'مضت', 'مضى', 'هذا', 'هذه', 'الآن', 'لحظه', 'اول', 'ثالث', 'رابع', 'خامس',
                                     'سادس', 'سابع', 'ثامن', 'تاسع', 'عاشر', 'حادي عشر', 'حاديه عشر', 'ثاني عشر', 'ثانيه عشر', 'سبت',
                                     'احد', 'اثنين', 'ثلاثاء', 'اربعاء', 'خميس', 'جمعه', 'ثلاث', 'اربع', 'خمس', 'ست',
                                     'سبع', 'ثمان', 'تسع', 'عشر', 'كانون ثاني', 'شباط', 'اذار', 'نيسان', 'ايار', 'حزيران',
                                     'تموز', 'اب', 'ايلول', 'تشرين اول', 'تشرين ثاني', 'كانون اول', 'يناير', 'فبراير', 'مارس', 'ابريل',
                                     'مايو', 'يونيو', 'يوليو', 'اغسطس', 'سبتمبر', 'اكتوبر', 'نوفمبر', 'ديسمبر')

[line 94]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $_replacements = array('ا', 'ا', 'ا', 'ه', 'next', 'next', 'next', 'next', 'last', 'last',
                                         'last', '-', '-', 'day', 'days', 'hour', '2 hours', '2 hours', 'hours', 'minute',
                                         '2 minutes', '2 minutes', 'minutes', 'second', '2 seconds', '2 seconds', 'seconds', '2 weeks', '2 weeks', 'weeks',
                                         'week', '2 months', '2 months', 'months', 'months', 'month', 'year', '2 years', '2 years', 'years',
                                         'years', 'am', 'am', 'am', 'pm', 'pm', 'pm', 'pm', 'tomorrow', 'yesterday',
                                         'yesterday', 'ago', 'ago', 'this', 'this', 'now', 'now', 'first', 'third', 'fourth', 'fifth',
                                         'sixth', 'seventh', 'eighth', 'ninth', 'tenth', 'eleventh', 'eleventh', 'twelfth', 'twelfth', 'saturday',
                                         'sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', '3', '4', '5', '6',
                                         '7', '8', '9', '10', 'january', 'february', 'march', 'april', 'may', 'june',
                                         'july', 'august', 'september', 'october', 'november', 'december', 'january', 'february', 'march', 'april',
                                         'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december')

[line 106]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


static method strtotime [line 131]

static Integer strtotime( string $text, integer $now, [string $inputCharset = null], [object $main = null])

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-Shamaa <khaled.alshamaa@gmail.com>
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.
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]


Documentation generated on Fri, 12 Mar 2010 01:01:44 +0300 by phpDocumentor 1.4.0