Test Ar-PHP Functionality Online

header line!
Test PHP Function










Ar-PHP Manual

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

Example
  1.    date_default_timezone_set('UTC');
  2.    $time = time();
  3.  
  4.    echo date('l dS F Y h:i:s A'$time);
  5.    echo '<br /><br />';
  6.  
  7.    include('./I18N/Arabic.php');
  8.    $obj new I18N_Arabic('Date');
  9.  
  10.    echo $obj->date('l dS F Y h:i:s A'$time);
  11.    echo '<br /><br />';
  12.  
  13.    $obj->setMode(2);
  14.    echo $obj->date('l dS F Y h:i:s A'$time);
  15.    echo '<br /><br />';
  16.  
  17.    $obj->setMode(3);
  18.    echo $obj->date('l dS F Y h:i:s A'$time);
  19.    echo '<br /><br />';
  20.  
  21.    $obj->setMode(4);
  22.    echo $obj->date('l dS F Y h:i:s A'$time);
Popular
Recent
Links
Ads!
footer line!

No Software Patents! General Public License

Home | Twitter | Blog | Contact

Copyright © 2006 - 2016 Khaled Al-Sham'aa