MediaWiki  1.23.0
LanguageWa.php
Go to the documentation of this file.
1 <?php
32 class LanguageWa extends Language {
33 
45  function date( $ts, $adj = false, $format = true, $tc = false ) {
46  $ts = wfTimestamp( TS_MW, $ts );
47  if ( $adj ) {
48  $ts = $this->userAdjust( $ts, $tc );
49  }
50  $datePreference = $this->dateFormat( $format );
51 
52  # ISO (YYYY-mm-dd) format
53  #
54  # we also output this format for YMD (eg: 2001 January 15)
55  if ( $datePreference == 'ISO 8601' ) {
56  $d = substr( $ts, 0, 4 ) . '-' . substr( $ts, 4, 2 ) . '-' . substr( $ts, 6, 2 );
57  return $d;
58  }
59 
60  # dd/mm/YYYY format
61  if ( $datePreference == 'walloon short' ) {
62  $d = substr( $ts, 6, 2 ) . '/' . substr( $ts, 4, 2 ) . '/' . substr( $ts, 0, 4 );
63  return $d;
64  }
65 
66  # Walloon format
67  #
68  # we output this in all other cases
69  $m = substr( $ts, 4, 2 );
70  $n = substr( $ts, 6, 2 );
71  if ( $n == 1 ) {
72  $d = "1î d' " . $this->getMonthName( $m ) .
73  " " . substr( $ts, 0, 4 );
74  } elseif ( $n == 2 || $n == 3 || $n == 20 || $n == 22 || $n == 23 ) {
75  $d = ( 0 + $n ) . " d' " . $this->getMonthName( $m ) .
76  " " . substr( $ts, 0, 4 );
77  } elseif ( $m == 4 || $m == 8 || $m == 10 ) {
78  $d = ( 0 + $n ) . " d' " . $this->getMonthName( $m ) .
79  " " . substr( $ts, 0, 4 );
80  } else {
81  $d = ( 0 + $n ) . " di " . $this->getMonthName( $m ) .
82  " " . substr( $ts, 0, 4 );
83  }
84  return $d;
85  }
86 
94  function timeanddate( $ts, $adj = false, $format = true, $tc = false ) {
95  if ( $adj ) {
96  $ts = $this->userAdjust( $ts, $tc );
97  }
98  $datePreference = $this->dateFormat( $format );
99  if ( $datePreference == 'ISO 8601' ) {
100  return parent::timeanddate( $ts, $adj, $format, $tc );
101  } else {
102  return $this->date( $ts, $adj, $format, $tc ) . ' a ' .
103  $this->time( $ts, $adj, $format, $tc );
104  }
105  }
106 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
wfTimestamp
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Definition: GlobalFunctions.php:2483
$n
$n
Definition: RandomTest.php:76
LanguageWa
Walloon (Walon)
Definition: LanguageWa.php:32
LanguageWa\timeanddate
timeanddate( $ts, $adj=false, $format=true, $tc=false)
Definition: LanguageWa.php:94
Language\getMonthName
getMonthName( $key)
Definition: Language.php:967
TS_MW
const TS_MW
MediaWiki concatenated string timestamp (YYYYMMDDHHMMSS)
Definition: GlobalFunctions.php:2431
LanguageWa\date
date( $ts, $adj=false, $format=true, $tc=false)
Dates in Walloon are "1î d' <monthname>" for 1st of the month, "<day> di <monthname>" for months star...
Definition: LanguageWa.php:45
Language\dateFormat
dateFormat( $usePrefs=true)
This is meant to be used by time(), date(), and timeanddate() to get the date preference they're supp...
Definition: Language.php:1983
Language\userAdjust
userAdjust( $ts, $tz=false)
Used by date() and time() to adjust the time output.
Definition: Language.php:1898
Language\time
time( $ts, $adj=false, $format=true, $timecorrection=false)
Definition: Language.php:2064
Language
Internationalisation code.
Definition: Language.php:74