00001 <?php 00008 # NOTE: cweri après "NOTE:" po des racsegnes so des ratournaedjes 00009 # k' i gn a. 00010 00011 class LanguageWa extends Language { 00012 ### 00013 ### Dates in Walloon are "1î d' <monthname>" for 1st of the month, 00014 ### "<day> di <monthname>" for months starting by a consoun, and 00015 ### "<day> d' <monthname>" for months starting with a vowel 00016 ### 00017 function date( $ts, $adj = false, $format = true, $tc = false ) { 00018 global $wgUser; 00019 00020 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); } 00021 $datePreference = $this->dateFormat( $format ); 00022 00023 # ISO (YYYY-mm-dd) format 00024 # 00025 # we also output this format for YMD (eg: 2001 January 15) 00026 if ( $datePreference == 'ISO 8601' ) { 00027 $d = substr($ts, 0, 4). '-' . substr($ts, 4, 2). '-' .substr($ts, 6, 2); 00028 return $d; 00029 } 00030 00031 # dd/mm/YYYY format 00032 if ( $datePreference == 'walloon short' ) { 00033 $d = substr($ts, 6, 2). '/' . substr($ts, 4, 2). '/' .substr($ts, 0, 4); 00034 return $d; 00035 } 00036 00037 # Walloon format 00038 # 00039 # we output this in all other cases 00040 $m = substr( $ts, 4, 2 ); 00041 $n = substr( $ts, 6, 2 ); 00042 if ($n == 1) { 00043 $d = "1î d' " . $this->getMonthName( $m ) . 00044 " " . substr( $ts, 0, 4 ); 00045 } else if ($n == 2 || $n == 3 || $n == 20 || $n == 22 || $n == 23) { 00046 $d = (0 + $n) . " d' " . $this->getMonthName( $m ) . 00047 " " . substr( $ts, 0, 4 ); 00048 } else if ($m == 4 || $m == 8 || $m == 10) { 00049 $d = (0 + $n) . " d' " . $this->getMonthName( $m ) . 00050 " " . substr( $ts, 0, 4 ); 00051 } else { 00052 $d = (0 + $n) . " di " . $this->getMonthName( $m ) . 00053 " " . substr( $ts, 0, 4 ); 00054 } 00055 return $d; 00056 } 00057 00058 function timeanddate( $ts, $adj = false, $format = true, $tc = false ) { 00059 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); } 00060 $datePreference = $this->dateFormat( $format ); 00061 if ( $datePreference == 'ISO 8601' ) { 00062 return parent::timeanddate( $ts, $adj, $format, $tc ); 00063 } else { 00064 return $this->date( $ts, $adj, $format, $tc ) . ' a ' . 00065 $this->time( $ts, $adj, $format, $tc ); 00066 } 00067 } 00068 }