<?php
-/**
- * Date formatter, recognises dates in plain text and formats them accoding to user preferences.
- *
- * @package MediaWiki
- * @subpackage Parser
- */
/**
+ * Date formatter, recognises dates in plain text and formats them accoding to user preferences.
* @todo preferences, OutputPage
- * @package MediaWiki
- * @subpackage Parser
+ * @addtogroup Parser
*/
class DateFormatter
{
var $regexes, $pDays, $pMonths, $pYears;
var $rules, $xMonths, $preferences;
-
+
const ALL = -1;
const NONE = 0;
const MDY = 1;
}
for ( $i=1; $i<=self::LAST; $i++ ) {
$this->mSource = $i;
- if ( @$this->rules[$preference][$i] ) {
+ if ( isset ( $this->rules[$preference][$i] ) ) {
# Specific rules
$this->mTarget = $this->rules[$preference][$i];
- } elseif ( @$this->rules[self::ALL][$i] ) {
+ } elseif ( isset ( $this->rules[self::ALL][$i] ) ) {
# General rules
$this->mTarget = $this->rules[self::ALL][$i];
} elseif ( $preference ) {
return $text;
}
}
-
-?>