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

Class: ArDate

Source Location: /sub/ArDate.class.php

Class Overview


PHP class for Arabic and Islamic customization of PHP date function. It can convert UNIX timestamp into string in Arabic as well as convert it into Hijri calendar


Author(s):

Copyright:

  • Khaled Al-Shamaa 2008

Methods



Class Details

[line 40]
PHP class for Arabic and Islamic customization of PHP date function. It can convert UNIX timestamp into string in Arabic as well as convert it into Hijri calendar



Tags:

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


[ Top ]


Class Methods


constructor __construct [line 43]

ArDate __construct( )



Tags:

access:  public


[ Top ]

method date [line 91]

String date( String $format, [Integer $timestamp = time])

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-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

String   $format   Format string (same as PHP date function)
Integer   $timestamp   Unix timestamp (default is current local time)

[ Top ]

method getMode [line 78]

Integer getMode( )

Getting $mode value that refer to output mode format 1) Hegri 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



Tags:

return:  Value of $mode properity
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


[ Top ]

method setMode [line 57]

TRUE setMode( [Integer $mode = 1])

Setting value for $mode scalar



Tags:

return:  if success, or FALSE if fail
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

Integer   $mode   Output mode of date function where: 1) Hegri 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

[ Top ]


Documentation generated on Thu, 21 Feb 2008 13:58:53 +0200 by phpDocumentor 1.4.0