Use Doxygen @addtogroup instead of phpdoc @package && @subpackage
[lhc/web/wiklou.git] / languages / classes / LanguageWa.php
1 <?php
2 /**
3 * Walloon (Walon)
4 *
5 * @addtogroup Language
6 */
7
8 # NOTE: cweri après "NOTE:" po des racsegnes so des ratournaedjes
9 # k' i gn a.
10
11 class LanguageWa extends Language {
12 ###
13 ### Dates in Walloon are "1î d' <monthname>" for 1st of the month,
14 ### "<day> di <monthname>" for months starting by a consoun, and
15 ### "<day> d' <monthname>" for months starting with a vowel
16 ###
17 function date( $ts, $adj = false, $format = true, $tc = false ) {
18 global $wgUser;
19
20 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); }
21 $datePreference = $this->dateFormat( $format );
22
23 # ISO (YYYY-mm-dd) format
24 #
25 # we also output this format for YMD (eg: 2001 January 15)
26 if ( $datePreference == 'ISO 8601' ) {
27 $d = substr($ts, 0, 4). '-' . substr($ts, 4, 2). '-' .substr($ts, 6, 2);
28 return $d;
29 }
30
31 # dd/mm/YYYY format
32 if ( $datePreference == 'walloon short' ) {
33 $d = substr($ts, 6, 2). '/' . substr($ts, 4, 2). '/' .substr($ts, 0, 4);
34 return $d;
35 }
36
37 # Walloon format
38 #
39 # we output this in all other cases
40 $m = substr( $ts, 4, 2 );
41 $n = substr( $ts, 6, 2 );
42 if ($n == 1) {
43 $d = "1î d' " . $this->getMonthName( $m ) .
44 " " . substr( $ts, 0, 4 );
45 } else if ($n == 2 || $n == 3 || $n == 20 || $n == 22 || $n == 23) {
46 $d = (0 + $n) . " d' " . $this->getMonthName( $m ) .
47 " " . substr( $ts, 0, 4 );
48 } else if ($m == 4 || $m == 8 || $m == 10) {
49 $d = (0 + $n) . " d' " . $this->getMonthName( $m ) .
50 " " . substr( $ts, 0, 4 );
51 } else {
52 $d = (0 + $n) . " di " . $this->getMonthName( $m ) .
53 " " . substr( $ts, 0, 4 );
54 }
55 return $d;
56 }
57
58 function timeanddate( $ts, $adj = false, $format = true, $tc = false ) {
59 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); }
60 $datePreference = $this->dateFormat( $format );
61 if ( $datePreference == 'ISO 8601' ) {
62 return parent::timeanddate( $ts, $adj, $format, $tc );
63 } else {
64 return $this->date( $ts, $adj, $format, $tc ) . ' a ' .
65 $this->time( $ts, $adj, $format, $tc );
66 }
67 }
68 }
69
70 ?>