This factory creates a parser that accepts most outputs of MediaWiki's Language::sprintfDate formatting.
More...
|
| getMwDateFormatParser ( $languageCode='en', $dateFormatPreference='dmy', $dateFormatType='date', ParserOptions $options=null) |
|
This factory creates a parser that accepts most outputs of MediaWiki's Language::sprintfDate formatting.
- Copyright
- GPL-2.0-or-later
- Author
- Thiemo Kreuz
◆ getCachedMonthNames()
Wikibase\Repo\Parsers\MwDateFormatParserFactory::getCachedMonthNames |
( |
Language |
$language | ) |
|
|
private |
- Parameters
-
- Returns
- array[]
◆ getMwDateFormatParser()
Wikibase\Repo\Parsers\MwDateFormatParserFactory::getMwDateFormatParser |
( |
|
$languageCode = 'en' , |
|
|
|
$dateFormatPreference = 'dmy' , |
|
|
|
$dateFormatType = 'date' , |
|
|
ParserOptions |
$options = null |
|
) |
| |
- Parameters
-
string | $languageCode | |
string | $dateFormatPreference | Typically "dmy", "mdy", "ISO 8601" or "default", but this depends heavily on the actual MessagesXx.php file. |
string | $dateFormatType | Either "date", "both" (date and time) or "monthonly". |
ParserOptions | null | $options | |
- Exceptions
-
- Returns
- ValueParser
◆ getMwMonthNames()
Wikibase\Repo\Parsers\MwDateFormatParserFactory::getMwMonthNames |
( |
Language |
$language | ) |
|
|
private |
- Parameters
-
- Returns
- array[]
◆ trim()
Wikibase\Repo\Parsers\MwDateFormatParserFactory::trim |
( |
|
$string | ) |
|
|
private |
◆ $monthNamesCache
Wikibase\Repo\Parsers\MwDateFormatParserFactory::$monthNamesCache = [] |
|
staticprivate |
The documentation for this class was generated from the following file: