home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.pdx.edu / 2014.02.ftp.ee.pdx.edu.tar / ftp.ee.pdx.edu / oss / cvs-2004 / bahasa / php / Indonesia.php,v < prev    next >
Text File  |  2003-08-19  |  5KB  |  193 lines

  1. head    1.3;
  2. access;
  3. symbols
  4.     Initial:1.1.1.1 bule:1.1.1;
  5. locks; strict;
  6. comment    @# @;
  7.  
  8.  
  9. 1.3
  10. date    2003.08.19.06.08.57;    author bule;    state Exp;
  11. branches;
  12. next    1.2;
  13.  
  14. 1.2
  15. date    2003.08.14.19.38.49;    author bule;    state Exp;
  16. branches;
  17. next    1.1;
  18.  
  19. 1.1
  20. date    2003.08.12.19.18.23;    author bule;    state Exp;
  21. branches
  22.     1.1.1.1;
  23. next    ;
  24.  
  25. 1.1.1.1
  26. date    2003.08.12.19.18.23;    author bule;    state Exp;
  27. branches;
  28. next    ;
  29.  
  30.  
  31. desc
  32. @@
  33.  
  34.  
  35. 1.3
  36. log
  37. @*** empty log message ***
  38. @
  39. text
  40. @<?
  41. require_once("Dictionary.php");
  42. //////////////////////////////////////////////////////////////////////////////
  43. //////////////////////////////////////////////////////////////////////////////
  44. // Project Name: Bahasa Indonesia Dictionary
  45. // Directory:    bahasa/php
  46. // File Name:    Indonesia.php
  47. // Author(s):    John L. Whiteman
  48. // Created:      June 23, 2003  
  49. // Modified:     August 18, 2003
  50. // Description:  This PHP class file inherits from the parent 
  51. //               Dictionary.php class file.  It contains various 
  52. //               methods that support data operations specific 
  53. //               to Bahasa Indonesia.  This file should reside 
  54. //               under the same directory as Dictionary.php and
  55. //               both should reside under a directory outside of 
  56. //               your web server's public virtual directories as 
  57. //               a security precaution. 
  58. // 
  59. // Copyright (c) 2003 John L. Whiteman
  60. //
  61. // Permission is herby granted, free of charge, to any person obtaining a 
  62. // copy of this software, data, and associated documentation files 
  63. // (the "Software"), to deal in the Software without restriction, 
  64. // including without limitation the rights to use, copy, modify, merge, 
  65. // publish, distribute, sublicense, and/or sell copies of Software, and to
  66. // permit persons to whom the Software is furnished to do so, subject to 
  67. // the following conditions:
  68. //
  69. // The above copyright notice and this permission notice shall be 
  70. // included in all copies or substantial portions of the Software.
  71. //
  72. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
  73. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
  74. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  75. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 
  76. // ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHERE IN AN ACTION OF CONTRACT,
  77. // TORT OR OTHERWISE, ARISING IN THE SOFTWARE.  
  78. //////////////////////////////////////////////////////////////////////////////
  79. //////////////////////////////////////////////////////////////////////////////
  80. ///////////////////////////////////////////////////////////////////////////////
  81. // Indonesia()
  82. // get_english_date()
  83. // get_indonesian_date()
  84. ///////////////////////////////////////////////////////////////////////////////
  85. class Indonesia extends Dictionary {
  86.  
  87.     ///////////////////////////////////////////////////////////////////////
  88.     //CLASS GLOBAL VARIABLES.
  89.     ///////////////////////////////////////////////////////////////////////
  90.  
  91.  
  92.     ///////////////////////////////////////////////////////////////////////
  93.     //This is the class constructor.
  94.     ///////////////////////////////////////////////////////////////////////
  95.     function Indonesia() {
  96.  
  97.         //Call the Dictionary.pm constructor
  98.         $this->Dictionary();
  99.         
  100.         return;
  101.     }
  102.     ///////////////////////////////////////////////////////////////////////
  103.     //Returns English date string using Indonesian proper date format
  104.     ///////////////////////////////////////////////////////////////////////
  105.     function get_english_date() {
  106.  
  107.         $today = getdate();
  108.         $emonth = $today['month'];
  109.         $emday = $today['mday'];
  110.         $eyear = $today['year'];
  111.         $ewday = $today['wday'];
  112.         $eweekday = $today['weekday'];
  113.  
  114.         return("${eweekday}, ${emday} ${emonth}, ${eyear}");
  115.     }
  116.     ///////////////////////////////////////////////////////////////////////
  117.     //Returns Indonesian date string in Indonesian proper date format 
  118.     ///////////////////////////////////////////////////////////////////////
  119.     function get_indonesian_date() {
  120.  
  121.         $ei_month = array();
  122.         $ei_day_of_week = array();
  123.  
  124.         $ei_month["January"] = "Januari";
  125.         $ei_month["February"] = "Februari";
  126.         $ei_month["March"] = "Maret";
  127.         $ei_month["April"] = "April";
  128.         $ei_month["May"] = "Mei";
  129.         $ei_month["June"] = "Juni";
  130.         $ei_month["July"] = "Juli";
  131.         $ei_month["August"] = "Agustus";
  132.         $ei_month["September"] = "September";
  133.         $ei_month["October"] = "Oktober";
  134.         $ei_month["November"] = "November";
  135.         $ei_month["December"] = "Desember";
  136.  
  137.         $ei_day_of_week["Sunday"] = "Minngu";
  138.         $ei_day_of_week["Monday"] = "Senin";
  139.         $ei_day_of_week["Tuesday"] = "Selasu";
  140.         $ei_day_of_week["Wednesday"] = "Rabu";
  141.         $ei_day_of_week["Thursday"] = "Kamis";
  142.         $ei_day_of_week["Friday"] = "Jumat";
  143.         $ei_day_of_week["Saturday"] = "Sabtu";
  144.  
  145.         $today = getdate();
  146.         $emonth = $today['month'];
  147.         $emday = $today['mday'];
  148.         $eyear = $today['year'];
  149.         $ewday = $today['wday'];
  150.         $eweekday = $today['weekday'];
  151.  
  152.         $imonth = $ei_month["$emonth"];
  153.  
  154.         $iweekday = $ei_day_of_week["$eweekday"]; 
  155.  
  156.         return("${iweekday}, ${emday} ${imonth}, ${eyear}");
  157.     }
  158. }
  159. ///////////////////////////////////////////////////////////////////////////////
  160. ///////////////////////////////////////////////////////////////////////////////
  161. ?>
  162. @
  163.  
  164.  
  165. 1.2
  166. log
  167. @*** empty log message ***
  168. @
  169. text
  170. @d2 39
  171. a40 1
  172. require_once("/u/bule/bahasa_dev/php/Dictionary.php");
  173. @
  174.  
  175.  
  176. 1.1
  177. log
  178. @Initial revision
  179. @
  180. text
  181. @d2 1
  182. a2 1
  183. require_once("Dictionary.php");
  184. @
  185.  
  186.  
  187. 1.1.1.1
  188. log
  189. @Bahasa Indonesia Dictionary
  190. @
  191. text
  192. @@
  193.