diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php index 711028b..a20a5ee 100644 --- a/core/lib/Drupal.php +++ b/core/lib/Drupal.php @@ -693,4 +693,14 @@ public static function entityDefinitionUpdateManager() { return static::getContainer()->get('entity.definition_update_manager'); } + /** + * Returns the date formatter service. + * + * @return \Drupal\Core\Datetime\DateFormatterInterface + * The date formatter service. + */ + public static function dateFormatter() { + return static::getContainer()->get('date.formatter'); + } + }