|
MediaWiki
REL1_19
|
Date formatter, recognises dates in plain text and formats them accoding to user preferences. More...
Public Member Functions | |
| __construct () | |
| formatDate ($bits, $link=true) | |
| getMonthRegex () | |
| makeIsoMonth ($monthName) | |
| Makes an ISO month, e.g. | |
| makeIsoYear ($year) | |
| makeNormalYear ($iso) | |
| reformat ($preference, $text, $options=array('linked')) | |
| replace ($matches) | |
Static Public Member Functions | |
| static & | getInstance () |
| Get a DateFormatter object. | |
Public Attributes | |
| $monthNames = '' | |
| $mSource | |
| $mTarget | |
| $pDays | |
| $pMonths | |
| $preferences | |
| $pYears | |
| $regexes | |
| $rules | |
| $rxDM | |
| $rxDMY | |
| $rxMD | |
| $rxMDY | |
| $rxYDM | |
| $rxYMD | |
| $xMonths | |
| const | ALL = -1 |
| const | DM = 7 |
| const | DMY = 2 |
| const | ISO1 = 4 |
| const | ISO2 = 5 |
| const | LAST = 8 |
| const | LASTPREF = 4 |
| const | MD = 8 |
| const | MDY = 1 |
| const | NONE = 0 |
| const | YDM = 6 |
| const | YMD = 3 |
Date formatter, recognises dates in plain text and formats them accoding to user preferences.
Definition at line 13 of file DateFormatter.php.
Definition at line 37 of file DateFormatter.php.
References $wgContLang, ALL, DM, DMY, getMonthRegex(), ISO1, ISO2, MD, MDY, NONE, YDM, and YMD.

| DateFormatter::formatDate | ( | $ | bits, |
| $ | link = true |
||
| ) |
Definition at line 193 of file DateFormatter.php.
References $matches, $wgContLang, makeIsoMonth(), makeIsoYear(), makeNormalYear(), and Html\rawElement().
Referenced by replace().


| static& DateFormatter::getInstance | ( | ) | [static] |
Get a DateFormatter object.
Definition at line 108 of file DateFormatter.php.
References $wgMemc, and wfMemcKey().
Referenced by CoreParserFunctions\formatDate(), and Parser\internalParse().


Definition at line 286 of file DateFormatter.php.
References $wgContLang.
Referenced by __construct().

| DateFormatter::makeIsoMonth | ( | $ | monthName | ) |
Makes an ISO month, e.g.
02, from a month name
| $monthName | String: month name |
Definition at line 301 of file DateFormatter.php.
References $n, and $wgContLang.
Referenced by formatDate().

| DateFormatter::makeIsoYear | ( | $ | year | ) |
| $year | String: Year name |
Definition at line 313 of file DateFormatter.php.
Referenced by formatDate().

| DateFormatter::makeNormalYear | ( | $ | iso | ) |
Definition at line 329 of file DateFormatter.php.
Referenced by formatDate().

| DateFormatter::reformat | ( | $ | preference, |
| $ | text, | ||
| $ | options = array('linked') |
||
| ) |
| DateFormatter::replace | ( | $ | matches | ) |
| $matches |
Definition at line 176 of file DateFormatter.php.
References $matches, and formatDate().

| DateFormatter::$monthNames = '' |
Definition at line 16 of file DateFormatter.php.
| DateFormatter::$mSource |
Definition at line 15 of file DateFormatter.php.
| DateFormatter::$mTarget |
Definition at line 15 of file DateFormatter.php.
| DateFormatter::$pDays |
Definition at line 18 of file DateFormatter.php.
| DateFormatter::$pMonths |
Definition at line 18 of file DateFormatter.php.
| DateFormatter::$preferences |
Definition at line 19 of file DateFormatter.php.
| DateFormatter::$pYears |
Definition at line 18 of file DateFormatter.php.
| DateFormatter::$regexes |
Definition at line 18 of file DateFormatter.php.
| DateFormatter::$rules |
Definition at line 19 of file DateFormatter.php.
| DateFormatter::$rxDM |
Definition at line 16 of file DateFormatter.php.
| DateFormatter::$rxDMY |
Definition at line 16 of file DateFormatter.php.
| DateFormatter::$rxMD |
Definition at line 16 of file DateFormatter.php.
| DateFormatter::$rxMDY |
Definition at line 16 of file DateFormatter.php.
| DateFormatter::$rxYDM |
Definition at line 16 of file DateFormatter.php.
| DateFormatter::$rxYMD |
Definition at line 16 of file DateFormatter.php.
| DateFormatter::$xMonths |
Definition at line 19 of file DateFormatter.php.
| const DateFormatter::ALL = -1 |
Definition at line 21 of file DateFormatter.php.
Referenced by __construct(), and reformat().
| const DateFormatter::DM = 7 |
Definition at line 30 of file DateFormatter.php.
Referenced by __construct().
| const DateFormatter::DMY = 2 |
Definition at line 24 of file DateFormatter.php.
Referenced by __construct().
| const DateFormatter::ISO1 = 4 |
Definition at line 26 of file DateFormatter.php.
Referenced by __construct().
| const DateFormatter::ISO2 = 5 |
Definition at line 28 of file DateFormatter.php.
Referenced by __construct().
| const DateFormatter::LAST = 8 |
Definition at line 32 of file DateFormatter.php.
Referenced by reformat().
| const DateFormatter::LASTPREF = 4 |
Definition at line 27 of file DateFormatter.php.
| const DateFormatter::MD = 8 |
Definition at line 31 of file DateFormatter.php.
Referenced by __construct().
| const DateFormatter::MDY = 1 |
Definition at line 23 of file DateFormatter.php.
Referenced by __construct().
| const DateFormatter::NONE = 0 |
Definition at line 22 of file DateFormatter.php.
Referenced by __construct(), and reformat().
| const DateFormatter::YDM = 6 |
Definition at line 29 of file DateFormatter.php.
Referenced by __construct().
| const DateFormatter::YMD = 3 |
Definition at line 25 of file DateFormatter.php.
Referenced by __construct().