You are here

public function CurrentTime::getDateFormatted in RNG - Events and Registrations 8.2

Same name and namespace in other branches
  1. 8 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 118

Class

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

Namespace

Drupal\rng\Plugin\Condition

Code

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