diff --git a/core/core.services.yml b/core/core.services.yml index c1fd559..e9b63fb 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -427,6 +427,6 @@ services: batch.storage: class: Drupal\Core\Utility\BatchStorage arguments: ['@database'] - format_date: - class: Drupal\Core\Datetime\DateFormats + date: + class: Drupal\Core\Datetime\Date arguments: ['@config.factory'] diff --git a/core/includes/common.inc b/core/includes/common.inc index 08c0ad0..a22ff19 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -1290,6 +1290,8 @@ function format_interval($interval, $granularity = 2, $langcode = NULL) { * * @return * A translated date string in the requested format. + * + * @see \Drupal\Component\Datetime\Date::format() */ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NULL, $langcode = NULL) { return Drupal::service('format_date')->format($timestamp, $type, $format, $timezone, $langcode);