A value formatter that formats a time value as plain text, including the calendar model if necessary or specified by the formatter options.
More...
A value formatter that formats a time value as plain text, including the calendar model if necessary or specified by the formatter options.
The calendar model is added in parentheses when needed, as determined by the ShowCalendarModelDecider
(taking the options into account).
- Copyright
- GPL-2.0-or-later
◆ __construct()
Wikibase\Lib\Formatters\PlaintextTimeFormatter::__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. |
ShowCalendarModelDecider | $decider | |
◆ format()
Wikibase\Lib\Formatters\PlaintextTimeFormatter::format |
( |
| $value | ) |
|
◆ formatCalendarName()
Wikibase\Lib\Formatters\PlaintextTimeFormatter::formatCalendarName |
( |
string | $calendarModel | ) |
|
|
private |
◆ $dateTimeFormatter
ValueFormatter Wikibase\Lib\Formatters\PlaintextTimeFormatter::$dateTimeFormatter |
|
private |
◆ $decider
◆ $options
FormatterOptions Wikibase\Lib\Formatters\PlaintextTimeFormatter::$options |
|
private |
◆ CALENDAR_KEYS
const Wikibase\Lib\Formatters\PlaintextTimeFormatter::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: