|
| __construct (LanguageFactory $languageFactory, FormatterOptions $options=null) |
|
| format ( $value) |
|
- Copyright
- GPL-2.0-or-later
- Author
- H. Snater < media.nosp@m.wiki.nosp@m.@snat.nosp@m.er.c.nosp@m.om >
-
Addshore
-
Thiemo Kreuz
- Todo
- move me to DataValues-time
◆ __construct()
Wikibase\Lib\Formatters\MwTimeIsoFormatter::__construct |
( |
LanguageFactory | $languageFactory, |
|
|
FormatterOptions | $options = null ) |
- Parameters
-
LanguageFactory | $languageFactory | |
FormatterOptions | null | $options | |
◆ format()
Wikibase\Lib\Formatters\MwTimeIsoFormatter::format |
( |
| $value | ) |
|
- See also
- ValueFormatter::format
- Parameters
-
- Exceptions
-
- Returns
- string Text
◆ formatTimeValue()
Wikibase\Lib\Formatters\MwTimeIsoFormatter::formatTimeValue |
( |
TimeValue | $timeValue | ) |
|
|
private |
- Parameters
-
- Returns
- string Text
◆ getDateFormat()
Wikibase\Lib\Formatters\MwTimeIsoFormatter::getDateFormat |
( |
| $precision | ) |
|
|
private |
- Parameters
-
- Exceptions
-
- Returns
- string Date format string to be used by Language::sprintfDate
◆ getDayFormat()
Wikibase\Lib\Formatters\MwTimeIsoFormatter::getDayFormat |
( |
| $dateFormat | ) |
|
|
private |
- See also
- Language::sprintfDate
- Parameters
-
- Returns
- string A date format for the day that roundtrips the Wikibase TimeParsers.
◆ getLocalizedDate()
Wikibase\Lib\Formatters\MwTimeIsoFormatter::getLocalizedDate |
( |
| $isoTimestamp, |
|
|
| $precision ) |
|
private |
- Parameters
-
string | $isoTimestamp | |
int | $precision | |
- Exceptions
-
- Returns
- string Formatted date
◆ getLocalizedYear()
Wikibase\Lib\Formatters\MwTimeIsoFormatter::getLocalizedYear |
( |
| $isoTimestamp, |
|
|
| $precision ) |
|
private |
- Parameters
-
string | $isoTimestamp | |
int | $precision | |
- Returns
- string
◆ getMonthFormat()
Wikibase\Lib\Formatters\MwTimeIsoFormatter::getMonthFormat |
( |
| $dateFormat | ) |
|
|
private |
- See also
- Language::sprintfDate
- Parameters
-
- Returns
- string A date format for the month that roundtrips the Wikibase TimeParsers.
◆ getMwTimestamp()
Wikibase\Lib\Formatters\MwTimeIsoFormatter::getMwTimestamp |
( |
| $isoTimestamp, |
|
|
| $precision ) |
|
private |
- Parameters
-
string | $isoTimestamp | |
int | $precision | |
- Exceptions
-
- Returns
- string MediaWiki time stamp in the format YYYYMMDDHHMMSS
◆ shiftNumber()
Wikibase\Lib\Formatters\MwTimeIsoFormatter::shiftNumber |
( |
| $number, |
|
|
| $function, |
|
|
| $shift, |
|
|
| $unshift ) |
|
private |
- Parameters
-
string | $number | |
string | $function | |
float | $shift | |
float | $unshift | |
- Returns
- string
◆ splitIsoTimestamp()
Wikibase\Lib\Formatters\MwTimeIsoFormatter::splitIsoTimestamp |
( |
| $isoTimestamp, |
|
|
| $precision ) |
|
private |
- Parameters
-
string | $isoTimestamp | |
int | $precision | |
- Exceptions
-
- Returns
- string[] Year, month, day, hour, minute, second
◆ $language
Wikibase\Lib\Formatters\MwTimeIsoFormatter::$language |
|
private |
◆ $options
Wikibase\Lib\Formatters\MwTimeIsoFormatter::$options |
|
private |
The documentation for this class was generated from the following file: