You are here

public function SearchApiDate::getDateFormatter in Search API 8

Retrieves the date formatter.

Return value

\Drupal\Core\Datetime\DateFormatterInterface The date formatter.

File

src/Plugin/views/argument/SearchApiDate.php, line 43

Class

SearchApiDate
Defines a contextual filter for conditions on date fields.

Namespace

Drupal\search_api\Plugin\views\argument

Code

public function getDateFormatter() {
  return $this->dateFormatter ?: \Drupal::service('date.formatter');
}