I18N_Arabic

# Class: I18N_Arabic_Date Source Location: /Arabic/Date.php
### Class Overview
This PHP class is an Arabic customization for PHP date function #### Author(s): Khaled Al-Sham'aa <khaled@ar-php.org> #### Copyright: 2006-2013 Khaled Al-Sham'aa | ### Methods arabicMonths date dateCorrection en2ar getMode gregToJd hjConvert islamicToJd jdToIslamic setMode
### Class Details [line 177] This PHP class is an Arabic customization for PHP date function #### Tags:
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
copyright: | 2006-2013 Khaled Al-Sham'aa
link: | http://www.ar-php.org
license: | LGPL
[ Top ] ### Class Methods ### method arabicMonths [line 406]
`array arabicMonths( integer $mode)`
Add Arabic month names to the replacement array #### Tags:
return: | Arabic month names in selected style
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | protected
#### Parameters:
integer | $mode | Naming mode of months in Arabic where: 2) Arabic month names used in Middle East countries 3) Arabic Transliteration of Gregorian month names 4) Both of 2 and 3 formats together 5) Libya style 6) Algeria and Tunis style 7) Morocco style
[ Top ] ### method date [line 247]
`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
[ Top ] ### method dateCorrection [line 526]
`integer dateCorrection( integer $time)`
Calculate Hijri calendar correction using Um-Al-Qura calendar information #### Tags:
return: | Correction factor to fix Hijri calendar calculation using Um-Al-Qura calendar information
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | public
#### Parameters:
integer | $time | Unix timestamp
[ Top ] ### method en2ar [line 337]
`string en2ar( string $str)`
Translate English date/time terms into Arabic langauge #### Tags:
return: | Date/time string using Arabic terms
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | protected
#### Parameters:
string | $str | Date/time string using English terms
[ Top ] ### method getMode [line 229]
`Integer getMode( )`
Getting $mode value that refer to output mode format 1) Hijri format (Islamic calendar) 2) Arabic month names used in Middle East countries 3) Arabic Transliteration of Gregorian month names 4) Both of 2 and 3 formats together 5) Libyan way #### Tags:
return: | Value of $mode properity
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | public
[ Top ] ### method gregToJd [line 494]
`integer gregToJd( integer $m, integer $d, integer $y)`
Converts a Gregorian date to Julian Day Count #### Tags:
return: | The julian day for the given gregorian date as an integer
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | protected
#### Parameters:
integer | $m | The month as a number from 1 (for January) to 12 (for December)
integer | $d | The day as a number from 1 to 31
integer | $y | The year as a number between -4714 and 9999
[ Top ] ### method hjConvert [line 429]
`array hjConvert( integer $Y, integer $M, integer $D)`
Convert given Gregorian date into Hijri date #### Tags:
return: | Hijri date [int Year, int Month, int Day](Islamic calendar)
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | protected
#### Parameters:
integer | $Y | Year Gregorian year
integer | $M | Month Gregorian month
integer | $D | Day Gregorian day
[ Top ] ### method islamicToJd [line 476]
`integer islamicToJd( integer $year, integer $month, integer $day)`
Convert given Hijri date into Julian day #### Tags:
return: | Julian day
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | protected
#### Parameters:
integer | $year | Year Hijri year
integer | $month | Month Hijri month
integer | $day | Day Hijri day
[ Top ] ### method jdToIslamic [line 450]
`array jdToIslamic( integer $jd)`
Convert given Julian day into Hijri date #### Tags:
return: | Hijri date [int Year, int Month, int Day](Islamic calendar)
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | protected
#### Parameters:
integer | $jd | Julian day
[ Top ] ### method setMode [line 207]
`object setMode( [integer $mode = 1])`
Setting value for $mode scalar #### Tags:
return: | to build a fluent interface
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | public
#### Parameters:
integer | $mode | Output mode of date function where: 1) Hijri format (Islamic calendar) 2) Arabic month names used in Middle East countries 3) Arabic Transliteration of Gregorian month names 4) Both of 2 and 3 formats together 5) Libya style 6) Algeria and Tunis style 7) Morocco style
[ Top ] Documentation generated on Mon, 14 Jan 2013 17:48:44 +0100 by phpDocumentor 1.4.0