You are here

protected function DateRecurDefaultRSet::formatDateForDisplay in Recurring Dates Field 8

1 call to DateRecurDefaultRSet::formatDateForDisplay()
DateRecurDefaultRSet::humanReadable in src/DateRecurDefaultRSet.php

File

src/DateRecurDefaultRSet.php, line 87

Class

DateRecurDefaultRSet

Namespace

Drupal\date_recur

Code

protected function formatDateForDisplay(\DateTime $date, $format = 'd.m.Y') {
  if (empty($this
    ->getTimezone())) {
    return $date
      ->format($format);
  }
  return $date
    ->setTimezone(new \DateTimeZone($this
    ->getTimezone()))
    ->format($format);
}