8 # NOTE: cweri après "NOTE:" po des racsegnes so des ratournaedjes
11 class LanguageWa
extends Language
{
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
17 function date( $ts, $adj = false, $format = true, $tc = false ) {
18 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); }
19 $datePreference = $this->dateFormat( $format );
21 # ISO (YYYY-mm-dd) format
23 # we also output this format for YMD (eg: 2001 January 15)
24 if ( $datePreference == 'ISO 8601' ) {
25 $d = substr($ts, 0, 4). '-' . substr($ts, 4, 2). '-' .substr($ts, 6, 2);
30 if ( $datePreference == 'walloon short' ) {
31 $d = substr($ts, 6, 2). '/' . substr($ts, 4, 2). '/' .substr($ts, 0, 4);
37 # we output this in all other cases
38 $m = substr( $ts, 4, 2 );
39 $n = substr( $ts, 6, 2 );
41 $d = "1î d' " . $this->getMonthName( $m ) .
42 " " . substr( $ts, 0, 4 );
43 } else if ($n == 2 ||
$n == 3 ||
$n == 20 ||
$n == 22 ||
$n == 23) {
44 $d = (0 +
$n) . " d' " . $this->getMonthName( $m ) .
45 " " . substr( $ts, 0, 4 );
46 } else if ($m == 4 ||
$m == 8 ||
$m == 10) {
47 $d = (0 +
$n) . " d' " . $this->getMonthName( $m ) .
48 " " . substr( $ts, 0, 4 );
50 $d = (0 +
$n) . " di " . $this->getMonthName( $m ) .
51 " " . substr( $ts, 0, 4 );
56 function timeanddate( $ts, $adj = false, $format = true, $tc = false ) {
57 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); }
58 $datePreference = $this->dateFormat( $format );
59 if ( $datePreference == 'ISO 8601' ) {
60 return parent
::timeanddate( $ts, $adj, $format, $tc );
62 return $this->date( $ts, $adj, $format, $tc ) . ' a ' .
63 $this->time( $ts, $adj, $format, $tc );