r86805 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86804‎ | r86805 | r86806 >
Date:01:10, 24 April 2011
Author:kaldari
Status:ok
Tags:
Comment:
fix for bug 28655 - #time interpreting years incorrectly
Modified paths:
  • /trunk/extensions/ParserFunctions/ParserFunctions_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ParserFunctions/ParserFunctions_body.php
@@ -449,6 +449,11 @@
450450 # if local time was not requested, convert to UTC
451451 $tz = new DateTimeZone( 'UTC' );
452452 }
 453+
 454+ # Correct for DateTime interpreting 'XXXX' as XX:XX o'clock
 455+ if ( preg_match( '/^[0-9]{4}$/', $date ) ) {
 456+ $date = '00:00 '.$date;
 457+ }
453458
454459 # Parse date
455460 if ( $date !== '' ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r86927adding language support to #time parser function, per bug 28655kaldari00:26, 26 April 2011
r871701.17: MFT r85546, r86450, r86625, r86805, r86841, r86904, r86973, r87030catrope16:57, 30 April 2011
r873531.17wmf1: MFT r85546, r86409, r86450, r86625, r86788, r86805, r86841, r86904,...catrope20:27, 3 May 2011
r106987Add test and output for {{#time:d F Y|1988-02-28|nl}}. This test should pass....siebrand21:59, 21 December 2011

Status & tagging log