A value formatter that creates a basic, single-line HTML representation of a TimeValue's date, time and calendar model.
More...
A value formatter that creates a basic, single-line HTML representation of a TimeValue's date, time and calendar model.
The calendar model is added in superscript when needed, as determined by the ShowCalendarModelDecider
(taking the options into account).
- See also
- \Wikibase\Lib\Formatters\TimeDetailsFormatter
- Copyright
- GPL-2.0-or-later
- Author
- Adrian Heine adria.nosp@m.n.he.nosp@m.ine@w.nosp@m.ikim.nosp@m.edia..nosp@m.de
-
Thiemo Kreuz
-
Daniel Kinzler
◆ __construct()
Wikibase\Lib\Formatters\HtmlTimeFormatter::__construct |
( |
?FormatterOptions | $options, |
|
|
ValueFormatter | $dateTimeFormatter, |
|
|
ShowCalendarModelDecider | $decider ) |
- Parameters
-
FormatterOptions | null | $options | |
ValueFormatter | $dateTimeFormatter | A value formatter that accepts TimeValue objects and returns the formatted date and time, but not the calendar model. The formatter is assumed to return plain text (its output will be HTML-escaped). |
ShowCalendarModelDecider | $decider | |
◆ format()
Wikibase\Lib\Formatters\HtmlTimeFormatter::format |
( |
| $value | ) |
|
- See also
- ValueFormatter::format
- Parameters
-
- Exceptions
-
- Returns
- string HTML
◆ formatCalendarName()
Wikibase\Lib\Formatters\HtmlTimeFormatter::formatCalendarName |
( |
| $calendarModel | ) |
|
|
private |
- Parameters
-
- Returns
- string HTML
◆ $dateTimeFormatter
Wikibase\Lib\Formatters\HtmlTimeFormatter::$dateTimeFormatter |
|
private |
◆ $decider
◆ $options
Wikibase\Lib\Formatters\HtmlTimeFormatter::$options |
|
private |
◆ CALENDAR_KEYS
const Wikibase\Lib\Formatters\HtmlTimeFormatter::CALENDAR_KEYS |
|
private |
Initial value:= [
TimeValue::CALENDAR_GREGORIAN => 'wikibase-time-calendar-gregorian',
TimeValue::CALENDAR_JULIAN => 'wikibase-time-calendar-julian',
]
The documentation for this class was generated from the following file: