abstract protected function DateTimeFormatterBase::formatDate in Drupal 9
Same name and namespace in other branches
- 8 core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeFormatterBase.php \Drupal\datetime\Plugin\Field\FieldFormatter\DateTimeFormatterBase::formatDate()
Creates a formatted date value as a string.
Parameters
object $date: A date object.
Return value
string A formatted date string using the chosen format.
2 calls to DateTimeFormatterBase::formatDate()
- DateTimeFormatterBase::buildDate in core/
modules/ datetime/ src/ Plugin/ Field/ FieldFormatter/ DateTimeFormatterBase.php - Creates a render array from a date object.
- DateTimeFormatterBase::buildDateWithIsoAttribute in core/
modules/ datetime/ src/ Plugin/ Field/ FieldFormatter/ DateTimeFormatterBase.php - Creates a render array from a date object with ISO date attribute.
3 methods override DateTimeFormatterBase::formatDate()
- DateTimeCustomFormatter::formatDate in core/
modules/ datetime/ src/ Plugin/ Field/ FieldFormatter/ DateTimeCustomFormatter.php - Creates a formatted date value as a string.
- DateTimeDefaultFormatter::formatDate in core/
modules/ datetime/ src/ Plugin/ Field/ FieldFormatter/ DateTimeDefaultFormatter.php - Creates a formatted date value as a string.
- DateTimePlainFormatter::formatDate in core/
modules/ datetime/ src/ Plugin/ Field/ FieldFormatter/ DateTimePlainFormatter.php - Creates a formatted date value as a string.
File
- core/
modules/ datetime/ src/ Plugin/ Field/ FieldFormatter/ DateTimeFormatterBase.php, line 153
Class
- DateTimeFormatterBase
- Base class for 'DateTime Field formatter' plugin implementations.
Namespace
Drupal\datetime\Plugin\Field\FieldFormatterCode
protected abstract function formatDate($date);