You are here

function CurrentTime::getDateFormatted in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Condition/CurrentTime.php \Drupal\rng\Plugin\Condition\CurrentTime::getDateFormatted()
  2. 3.x src/Plugin/Condition/CurrentTime.php \Drupal\rng\Plugin\Condition\CurrentTime::getDateFormatted()

Formats the date for display.

File

src/Plugin/Condition/CurrentTime.php, line 109

Class

CurrentTime
Evaluates if the current date is before or after the the configured date.

Namespace

Drupal\rng\Plugin\Condition

Code

function getDateFormatted() {
  return is_numeric($this
    ->getDate()) ? DrupalDateTime::createFromTimestamp($this
    ->getDate()) : $this
    ->t('Not configured');
}