public function Twig_Extension_Core::setDateFormat

Sets the default format to be used by the date filter.

Parameters

string $format The default date format string:

string $dateIntervalFormat The default date interval format string:

File

drupal/core/vendor/twig/twig/lib/Twig/Extension/Core.php, line 27

Class

Twig_Extension_Core

Code

public function setDateFormat($format = null, $dateIntervalFormat = null) {
  if (null !== $format) {
    $this->dateFormats[0] = $format;
  }
  if (null !== $dateIntervalFormat) {
    $this->dateFormats[1] = $dateIntervalFormat;
  }
}