r99677 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99676‎ | r99677 | r99678 >
Date:11:32, 13 October 2011
Author:ialex
Status:deferred
Tags:
Comment:
Simplify by using Language::sprintfDate()
Modified paths:
  • /trunk/extensions/RecordAdmin/RecordAdmin_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php
@@ -513,8 +513,7 @@
514514 */
515515 function formatDate( $ts ) {
516516 global $wgLang;
517 - $ts = preg_replace( "|^(....)(..)(..)(..)(..)(..)|", "$1-$2-$3 $4:$5:$6", $wgLang->userAdjust( $ts ) );
518 - return date( 'd M Y, H:i', strtotime( $ts ) );
 517+ return $wgLang->sprintfDate( 'd M Y, H:i', $wgLang->userAdjust( $ts ) );
519518 }
520519
521520

Status & tagging log