8use Wikimedia\Timestamp\TimestampFormat as TS;
27 public function date( $ts, $adj =
false, $format =
true, $timecorrection =
false ) {
28 $datePreference = $this->
dateFormat( $format );
29 if ( $datePreference ==
'ISO 8601' || $datePreference ==
'walloon short' ) {
30 return parent::date( $ts, $adj, $format, $timecorrection );
35 $ts = $this->
userAdjust( $ts, $timecorrection );
38 # Walloon 'dmy' format
39 $m = (int)substr( $ts, 4, 2 );
40 $n = (int)substr( $ts, 6, 2 );
43 " " . substr( $ts, 0, 4 );
44 } elseif ( $n == 2 || $n == 3 || $n == 20 || $n == 22 || $n == 23 ) {
46 " " . substr( $ts, 0, 4 );
47 } elseif ( $m == 4 || $m == 8 || $m == 10 ) {
49 " " . substr( $ts, 0, 4 );
52 " " . substr( $ts, 0, 4 );
58 public function timeanddate( $ts, $adj =
false, $format =
true, $tc =
false ) {
59 $datePreference = $this->
dateFormat( $format );
60 if ( $datePreference ==
'ISO 8601' || $datePreference ==
'walloon short' ) {
61 return parent::timeanddate( $ts, $adj, $format, $tc );
64 # Walloon 'dmy' format
65 return $this->
date( $ts, $adj, $format, $tc ) .
' a ' .
66 $this->
time( $ts, $adj, $format, $tc );
wfTimestamp( $outputtype=TS::UNIX, $ts=0)
Get a timestamp string in one of various formats.
date( $ts, $adj=false, $format=true, $timecorrection=false)
Dates in Walloon are "1î d' <monthname>" for 1st of the month, "<day> di <monthname>" for months star...
timeanddate( $ts, $adj=false, $format=true, $tc=false)
string