@@ 2237-2244 (lines=8) @@ | ||
2234 | * validateTimeZone() in Special:Preferences |
|
2235 | * @return string |
|
2236 | */ |
|
2237 | public function date( $ts, $adj = false, $format = true, $timecorrection = false ) { |
|
2238 | $ts = wfTimestamp( TS_MW, $ts ); |
|
2239 | if ( $adj ) { |
|
2240 | $ts = $this->userAdjust( $ts, $timecorrection ); |
|
2241 | } |
|
2242 | $df = $this->getDateFormatString( 'date', $this->dateFormat( $format ) ); |
|
2243 | return $this->sprintfDate( $df, $ts ); |
|
2244 | } |
|
2245 | ||
2246 | /** |
|
2247 | * @param string $ts The time format which needs to be turned into a |
|
@@ 2256-2263 (lines=8) @@ | ||
2253 | * validateTimeZone() in Special:Preferences |
|
2254 | * @return string |
|
2255 | */ |
|
2256 | public function time( $ts, $adj = false, $format = true, $timecorrection = false ) { |
|
2257 | $ts = wfTimestamp( TS_MW, $ts ); |
|
2258 | if ( $adj ) { |
|
2259 | $ts = $this->userAdjust( $ts, $timecorrection ); |
|
2260 | } |
|
2261 | $df = $this->getDateFormatString( 'time', $this->dateFormat( $format ) ); |
|
2262 | return $this->sprintfDate( $df, $ts ); |
|
2263 | } |
|
2264 | ||
2265 | /** |
|
2266 | * @param string $ts The time format which needs to be turned into a |
|
@@ 2276-2283 (lines=8) @@ | ||
2273 | * validateTimeZone() in Special:Preferences |
|
2274 | * @return string |
|
2275 | */ |
|
2276 | public function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false ) { |
|
2277 | $ts = wfTimestamp( TS_MW, $ts ); |
|
2278 | if ( $adj ) { |
|
2279 | $ts = $this->userAdjust( $ts, $timecorrection ); |
|
2280 | } |
|
2281 | $df = $this->getDateFormatString( 'both', $this->dateFormat( $format ) ); |
|
2282 | return $this->sprintfDate( $df, $ts ); |
|
2283 | } |
|
2284 | ||
2285 | /** |
|
2286 | * Takes a number of seconds and turns it into a text using values such as hours and minutes. |