Commit 744514b9 authored by alexpott's avatar alexpott
Browse files

Issue #2457345 by vijaycs85: Remove unnecessary format lookup in...

Issue #2457345 by vijaycs85: Remove unnecessary format lookup in \Drupal\Core\Datetime\DateFormatter::dateFormat for 'custom' format
parent bc23d011
......@@ -144,7 +144,7 @@ public function format($timestamp, $type = 'medium', $format = '', $timezone = N
$date = DrupalDateTime::createFromTimestamp($timestamp, $this->timezones[$timezone], $create_settings);
// If we have a non-custom date format use the provided date format pattern.
if ($date_format = $this->dateFormat($type, $langcode)) {
if ($format !== 'custom' && $date_format = $this->dateFormat($type, $langcode)) {
$format = $date_format->getPattern();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment