|
@@ 2219-2226 (lines=8) @@
|
| 2216 |
|
* validateTimeZone() in Special:Preferences |
| 2217 |
|
* @return string |
| 2218 |
|
*/ |
| 2219 |
|
function date( $ts, $adj = false, $format = true, $timecorrection = false ) { |
| 2220 |
|
$ts = wfTimestamp( TS_MW, $ts ); |
| 2221 |
|
if ( $adj ) { |
| 2222 |
|
$ts = $this->userAdjust( $ts, $timecorrection ); |
| 2223 |
|
} |
| 2224 |
|
$df = $this->getDateFormatString( 'date', $this->dateFormat( $format ) ); |
| 2225 |
|
return $this->sprintfDate( $df, $ts ); |
| 2226 |
|
} |
| 2227 |
|
|
| 2228 |
|
/** |
| 2229 |
|
* @param string $ts The time format which needs to be turned into a |
|
@@ 2238-2245 (lines=8) @@
|
| 2235 |
|
* validateTimeZone() in Special:Preferences |
| 2236 |
|
* @return string |
| 2237 |
|
*/ |
| 2238 |
|
function time( $ts, $adj = false, $format = true, $timecorrection = false ) { |
| 2239 |
|
$ts = wfTimestamp( TS_MW, $ts ); |
| 2240 |
|
if ( $adj ) { |
| 2241 |
|
$ts = $this->userAdjust( $ts, $timecorrection ); |
| 2242 |
|
} |
| 2243 |
|
$df = $this->getDateFormatString( 'time', $this->dateFormat( $format ) ); |
| 2244 |
|
return $this->sprintfDate( $df, $ts ); |
| 2245 |
|
} |
| 2246 |
|
|
| 2247 |
|
/** |
| 2248 |
|
* @param string $ts The time format which needs to be turned into a |
|
@@ 2258-2265 (lines=8) @@
|
| 2255 |
|
* validateTimeZone() in Special:Preferences |
| 2256 |
|
* @return string |
| 2257 |
|
*/ |
| 2258 |
|
function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false ) { |
| 2259 |
|
$ts = wfTimestamp( TS_MW, $ts ); |
| 2260 |
|
if ( $adj ) { |
| 2261 |
|
$ts = $this->userAdjust( $ts, $timecorrection ); |
| 2262 |
|
} |
| 2263 |
|
$df = $this->getDateFormatString( 'both', $this->dateFormat( $format ) ); |
| 2264 |
|
return $this->sprintfDate( $df, $ts ); |
| 2265 |
|
} |
| 2266 |
|
|
| 2267 |
|
/** |
| 2268 |
|
* Takes a number of seconds and turns it into a text using values such as hours and minutes. |