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-2016 Khaled Al-Sham'aa | ### Methods arabicMonths date dateCorrection en2ar getMode gregToJd hjConvert islamicToJd jdToIslamic setMode
### Class Details [line 166] This PHP class is an Arabic customization for PHP date function #### Tags:
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
copyright: | 2006-2016 Khaled Al-Sham'aa
link: | http://www.ar-php.org
license: | LGPL
[ Top ] ### Class Methods ### method arabicMonths [line 414]
`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 240]
`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 534]
`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 345]
`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 222]
`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 6) Algeria and Tunis style 7) Morocco style 8) Hijri format (Islamic calendar) in English #### Tags:
return: | Value of $mode properity
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | public
[ Top ] ### method gregToJd [line 502]
`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 437]
`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 484]
`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 458]
`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 197]
`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 8) Hijri format (Islamic calendar) in English
[ Top ] Documentation generated on Fri, 01 Jan 2016 10:25:58 +0200 by phpDocumentor 1.4.0