9 # NOTE: cweri après "NOTE:" po des racsegnes so des ratournaedjes
12 class LanguageWa
extends Language
{
14 ### Dates in Walloon are "1î d' <monthname>" for 1st of the month,
15 ### "<day> di <monthname>" for months starting by a consoun, and
16 ### "<day> d' <monthname>" for months starting with a vowel
18 function date( $ts, $adj = false, $format = true, $tc = false ) {
21 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); }
22 $datePreference = $this->dateFormat( $format );
24 # ISO (YYYY-mm-dd) format
26 # we also output this format for YMD (eg: 2001 January 15)
27 if ( $datePreference == 'ISO 8601' ) {
28 $d = substr($ts, 0, 4). '-' . substr($ts, 4, 2). '-' .substr($ts, 6, 2);
33 if ( $datePreference == 'walloon short' ) {
34 $d = substr($ts, 6, 2). '/' . substr($ts, 4, 2). '/' .substr($ts, 0, 4);
40 # we output this in all other cases
41 $m = substr( $ts, 4, 2 );
42 $n = substr( $ts, 6, 2 );
44 $d = "1î d' " . $this->getMonthName( $m ) .
45 " " . substr( $ts, 0, 4 );
46 } else if ($n == 2 ||
$n == 3 ||
$n == 20 ||
$n == 22 ||
$n == 23) {
47 $d = (0 +
$n) . " d' " . $this->getMonthName( $m ) .
48 " " . substr( $ts, 0, 4 );
49 } else if ($m == 4 ||
$m == 8 ||
$m == 10) {
50 $d = (0 +
$n) . " d' " . $this->getMonthName( $m ) .
51 " " . substr( $ts, 0, 4 );
53 $d = (0 +
$n) . " di " . $this->getMonthName( $m ) .
54 " " . substr( $ts, 0, 4 );
59 function timeanddate( $ts, $adj = false, $format = true, $tc = false ) {
60 if ( $adj ) { $ts = $this->userAdjust( $ts, $tc ); }
61 $datePreference = $this->dateFormat( $format );
62 if ( $datePreference == 'ISO 8601' ) {
63 return parent
::timeanddate( $ts, $adj, $format, $tc );
65 return $this->date( $ts, $adj, $format, $tc ) . ' a ' .
66 $this->time( $ts, $adj, $format, $tc );