| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
use MediaWiki\Language\Language; |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
s |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
class LanguageWa extends Language { |
| 32 |
|
| 33 |
|
| 34 |
, |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
public function date( $ts, $adj = false, $format = true, $timecorrection = false ) { |
| 41 |
$datePreference = $this->dateFormat( $format ); |
| 42 |
if ( $datePreference == 'ISO 8601' || $datePreference == 'walloon short' ) { |
| 43 |
return parent::date( $ts, $adj, $format, $timecorrection ); |
| 44 |
} |
| 45 |
|
| 46 |
$ts = wfTimestamp( TS_MW, $ts ); |
| 47 |
if ( $adj ) { |
| 48 |
$ts = $this->userAdjust( $ts, $timecorrection ); |
| 49 |
} |
| 50 |
|
| 51 |
|
| 52 |
$m = (int)substr( $ts, 4, 2 ); |
| 53 |
$n = (int)substr( $ts, 6, 2 ); |
| 54 |
if ( $n == 1 ) { |
| 55 |
$d = "1î d' " . $this->getMonthName( $m ) . |
| 56 |
" " . substr( $ts, 0, 4 ); |
| 57 |
} elseif ( $n == 2 || $n == 3 || $n == 20 || $n == 22 || $n == 23 ) { |
| 58 |
$d = $n . " d' " . $this->getMonthName( $m ) . |
| 59 |
" " . substr( $ts, 0, 4 ); |
| 60 |
} elseif ( $m == 4 || $m == 8 || $m == 10 ) { |
| 61 |
$d = $n . " d' " . $this->getMonthName( $m ) . |
| 62 |
" " . substr( $ts, 0, 4 ); |
| 63 |
} else { |
| 64 |
$d = $n . " di " . $this->getMonthName( $m ) . |
| 65 |
" " . substr( $ts, 0, 4 ); |
| 66 |
} |
| 67 |
return $d; |
| 68 |
} |
| 69 |
|
| 70 |
public function timeanddate( $ts, $adj = false, $format = true, $tc = false ) { |
| 71 |
$datePreference = $this->dateFormat( $format ); |
| 72 |
if ( $datePreference == 'ISO 8601' || $datePreference == 'walloon short' ) { |
| 73 |
return parent::timeanddate( $ts, $adj, $format, $tc ); |
| 74 |
} |
| 75 |
|
| 76 |
|
| 77 |
return $this->date( $ts, $adj, $format, $tc ) . ' a ' . |
| 78 |
$this->time( $ts, $adj, $format, $tc ); |
| 79 |
} |
| 80 |
} |