diff --git a/core/includes/batch.inc b/core/includes/batch.inc
index 049b3fb..b9e527d 100644
--- a/core/includes/batch.inc
+++ b/core/includes/batch.inc
@@ -298,9 +298,9 @@ function _batch_process() {
       '@total'      => $total,
       '@current'    => floor($current),
       '@percentage' => $percentage,
-      '@elapsed'    => format_interval($elapsed / 1000),
+      '@elapsed'    => \Drupal::service('date')->formatInterval($elapsed / 1000),
       // If possible, estimate remaining processing time.
-      '@estimate'   => ($current > 0) ? format_interval(($elapsed * ($total - $current) / $current) / 1000) : '-',
+      '@estimate'   => ($current > 0) ? \Drupal::service('date')->formatInterval(($elapsed * ($total - $current) / $current) / 1000) : '-',
     );
     $message = strtr($progress_message, $values);
     if (!empty($task_message)) {
@@ -389,7 +389,7 @@ function _batch_finished() {
       if (function_exists($batch_set['finished'])) {
         $queue = _batch_queue($batch_set);
         $operations = $queue->getAllItems();
-        $batch_set['finished']($batch_set['success'], $batch_set['results'], $operations, format_interval($batch_set['elapsed'] / 1000));
+        $batch_set['finished']($batch_set['success'], $batch_set['results'], $operations, \Drupal::service('date')->formatInterval($batch_set['elapsed'] / 1000));
       }
     }
   }
diff --git a/core/modules/aggregator/aggregator.pages.inc b/core/modules/aggregator/aggregator.pages.inc
index 75e4997..dc8dc73 100644
--- a/core/modules/aggregator/aggregator.pages.inc
+++ b/core/modules/aggregator/aggregator.pages.inc
@@ -66,7 +66,7 @@ function template_preprocess_aggregator_item(&$variables) {
     $variables['source_title'] = check_plain($item->ftitle);
   }
   if (date('Ymd', $item->getPostedTime()) == date('Ymd')) {
-    $variables['source_date'] = t('%ago ago', array('%ago' => format_interval(REQUEST_TIME - $item->getPostedTime())));
+    $variables['source_date'] = t('%ago ago', array('%ago' => \Drupal::service('date')->formatInterval(REQUEST_TIME - $item->getPostedTime())));
   }
   else {
     $variables['source_date'] = format_date($item->getPostedTime(), 'medium');
@@ -154,7 +154,7 @@ function template_preprocess_aggregator_summary_item(&$variables) {
       'datetime' => format_date($item->getPostedTime(), 'html_datetime', '', 'UTC'),
       'class' => array('feed-item-age',),
     ),
-    '#text' => t('%age old', array('%age' => format_interval(REQUEST_TIME - $item->getPostedTime()))),
+    '#text' => t('%age old', array('%age' => \Drupal::service('date')->formatInterval(REQUEST_TIME - $item->getPostedTime()))),
     '#html' => TRUE,
   );
 }
@@ -194,7 +194,7 @@ function template_preprocess_aggregator_feed_source(&$variables) {
   $variables['source_url'] = check_url(url($feed->link->value, array('absolute' => TRUE)));
 
   if ($feed->checked) {
-    $variables['last_checked'] = t('@time ago', array('@time' => format_interval(REQUEST_TIME - $feed->checked->value)));
+    $variables['last_checked'] = t('@time ago', array('@time' => \Drupal::service('date')->formatInterval(REQUEST_TIME - $feed->checked->value)));
   }
   else {
     $variables['last_checked'] = t('never');
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php
index d75a28a..17c63b6 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php
@@ -9,6 +9,7 @@
 
 use Drupal\Component\Utility\Xss;
 use Drupal\Core\Controller\ControllerBase;
+use Drupal\Core\Datetime\Date as DateService;
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
 use Drupal\aggregator\FeedInterface;
 use Drupal\aggregator\ItemInterface;
@@ -31,13 +32,23 @@ class AggregatorController extends ControllerBase implements ContainerInjectionI
   protected $database;
 
   /**
+   * The date service.
+   *
+   * @var \Drupal\Core\Datetime\Date
+   */
+  protected $dateService;
+
+  /**
    * Constructs a \Drupal\aggregator\Controller\AggregatorController object.
    *
    * @param \Drupal\Core\Database\Connection $database
    *   The database connection.
+   * @param \Drupal\Core\Datetime\Date $date_service
+   *    The date service.
    */
-  public function __construct(Connection $database) {
+  public function __construct(Connection $database, DateService $date_service) {
     $this->database = $database;
+    $this->dateService = $date_service;
   }
 
   /**
@@ -45,7 +56,8 @@ public function __construct(Connection $database) {
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('database')
+      $container->get('database'),
+      $container->get('date')
     );
   }
 
@@ -143,8 +155,8 @@ public function adminOverview() {
       $row = array();
       $row[] = l($feed->title, "aggregator/sources/$feed->fid");
       $row[] = format_plural($feed->items, '1 item', '@count items');
-      $row[] = ($feed->checked ? $this->t('@time ago', array('@time' => format_interval(REQUEST_TIME - $feed->checked))) : $this->t('never'));
-      $row[] = ($feed->checked && $feed->refresh ? $this->t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - REQUEST_TIME))) : $this->t('never'));
+      $row[] = ($feed->checked ? $this->t('@time ago', array('@time' => $this->dateService->formatInterval(REQUEST_TIME - $feed->checked))) : $this->t('never'));
+      $row[] = ($feed->checked && $feed->refresh ? $this->t('%time left', array('%time' => $this->dateService->formatInterval($feed->checked + $feed->refresh - REQUEST_TIME))) : $this->t('never'));
       $links = array();
       $links['edit'] = array(
         'title' => $this->t('Edit'),
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/FeedFormController.php b/core/modules/aggregator/lib/Drupal/aggregator/FeedFormController.php
index fd95205..08dbf6a 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/FeedFormController.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/FeedFormController.php
@@ -23,7 +23,7 @@ class FeedFormController extends ContentEntityFormController {
    */
   public function form(array $form, array &$form_state) {
     $feed = $this->entity;
-    $period = drupal_map_assoc(array(900, 1800, 3600, 7200, 10800, 21600, 32400, 43200, 64800, 86400, 172800, 259200, 604800, 1209600, 2419200), 'format_interval');
+    $period = drupal_map_assoc(array(900, 1800, 3600, 7200, 10800, 21600, 32400, 43200, 64800, 86400, 172800, 259200, 604800, 1209600, 2419200), array(\Drupal::service('date'), 'formatInterval'));
     $period[AGGREGATOR_CLEAR_NEVER] = $this->t('Never');
 
     $form['title'] = array(
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php b/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php
index 8aec75b..0fad5e3 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php
@@ -81,7 +81,7 @@ public function getFormId() {
    */
   public function buildForm(array $form, array &$form_state) {
     $period = drupal_map_assoc(array(900, 1800, 3600, 7200, 10800, 21600, 32400, 43200,
-      64800, 86400, 172800, 259200, 604800, 1209600, 2419200), 'format_interval');
+      64800, 86400, 172800, 259200, 604800, 1209600, 2419200), array(\Drupal::service('date'), 'formatInterval'));
 
     $form['upload'] = array(
       '#type' => 'file',
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php
index 94a3da5..ba65d10 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php
@@ -73,7 +73,7 @@ public function buildConfigurationForm(array $form, array &$form_state) {
     $processors = $this->configuration['processors'];
     $info = $this->getPluginDefinition();
     $items = drupal_map_assoc(array(3, 5, 10, 15, 20, 25), array($this, 'formatItems'));
-    $period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 9676800), 'format_interval');
+    $period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 9676800), array(\Drupal::service('date'), 'formatInterval'));
     $period[AGGREGATOR_CLEAR_NEVER] = t('Never');
 
     $form['processors'][$info['id']] = array();
diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentTokenReplaceTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentTokenReplaceTest.php
index 7b9b9ff..5ba68b0 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentTokenReplaceTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentTokenReplaceTest.php
@@ -61,8 +61,8 @@ function testCommentTokenReplacement() {
     $tests['[comment:body]'] = $comment->comment_body->processed;
     $tests['[comment:url]'] = url('comment/' . $comment->id(), $url_options + array('fragment' => 'comment-' . $comment->id()));
     $tests['[comment:edit-url]'] = url('comment/' . $comment->id() . '/edit', $url_options);
-    $tests['[comment:created:since]'] = format_interval(REQUEST_TIME - $comment->created->value, 2, $language_interface->id);
-    $tests['[comment:changed:since]'] = format_interval(REQUEST_TIME - $comment->changed->value, 2, $language_interface->id);
+    $tests['[comment:created:since]'] = \Drupal::service('date')->formatInterval(REQUEST_TIME - $comment->created->value, 2, $language_interface->id);
+    $tests['[comment:changed:since]'] = \Drupal::service('date')->formatInterval(REQUEST_TIME - $comment->changed->value, 2, $language_interface->id);
     $tests['[comment:parent:cid]'] = $comment->pid->target_id;
     $tests['[comment:parent:title]'] = check_plain($parent_comment->subject->value);
     $tests['[comment:node:nid]'] = $comment->entity_id->value;
diff --git a/core/modules/contact/lib/Drupal/contact/Controller/ContactController.php b/core/modules/contact/lib/Drupal/contact/Controller/ContactController.php
index ff5f71d..9dda5ec 100644
--- a/core/modules/contact/lib/Drupal/contact/Controller/ContactController.php
+++ b/core/modules/contact/lib/Drupal/contact/Controller/ContactController.php
@@ -13,6 +13,7 @@
 use Drupal\contact\CategoryInterface;
 use Drupal\user\UserInterface;
 use Drupal\Component\Utility\String;
+use Drupal\Core\Datetime\Date as DateService;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -30,13 +31,23 @@ class ContactController extends ControllerBase implements ContainerInjectionInte
   protected $flood;
 
   /**
+   * The date service.
+   *
+   * @var \Drupal\Core\Datetime\Date
+   */
+  protected $dateService;
+
+  /**
    * Constructs a ContactController object.
    *
    * @param \Drupal\Core\Flood\FloodInterface $flood
    *   The flood service.
+   * @param \Drupal\Core\Datetime\Date $date_service
+   *   The date service.
    */
-  public function __construct(FloodInterface $flood) {
+  public function __construct(FloodInterface $flood, DateService $date_service) {
     $this->flood = $flood;
+    $this->dateService = $date_service;
   }
 
   /**
@@ -44,7 +55,8 @@ public function __construct(FloodInterface $flood) {
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('flood')
+      $container->get('flood'),
+      $container->get('date')
     );
   }
 
@@ -132,7 +144,7 @@ protected function contactFloodControl() {
     if (!$this->flood->isAllowed('contact', $limit, $interval)) {
       drupal_set_message($this->t('You cannot send more than %limit messages in @interval. Try again later.', array(
         '%limit' => $limit,
-        '@interval' => format_interval($interval),
+        '@interval' => $this->dateService->formatInterval($interval),
       )), 'error');
       throw new AccessDeniedHttpException();
     }
diff --git a/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php b/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php
index a6ca7f9..c7c9066 100644
--- a/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php
+++ b/core/modules/contact/lib/Drupal/contact/Tests/ContactPersonalTest.php
@@ -200,7 +200,7 @@ function testPersonalContactFlood() {
 
     // Submit contact form one over limit.
     $this->drupalGet('user/' . $this->contact_user->id(). '/contact');
-    $this->assertRaw(t('You cannot send more than %number messages in @interval. Try again later.', array('%number' => $flood_limit, '@interval' => format_interval(\Drupal::config('contact.settings')->get('flood.interval')))), 'Normal user denied access to flooded contact form.');
+    $this->assertRaw(t('You cannot send more than %number messages in @interval. Try again later.', array('%number' => $flood_limit, '@interval' => \Drupal::service('date')->formatInterval(\Drupal::config('contact.settings')->get('flood.interval')))), 'Normal user denied access to flooded contact form.');
 
     // Test that the admin user can still access the contact form even though
     // the flood limit was reached.
diff --git a/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php b/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php
index b8ae287..333d927 100644
--- a/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php
+++ b/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php
@@ -209,7 +209,7 @@ function testSiteWideContact() {
     // Submit contact form one over limit.
     $this->drupalGet('contact');
     $this->assertResponse(403);
-    $this->assertRaw(t('You cannot send more than %number messages in @interval. Try again later.', array('%number' => \Drupal::config('contact.settings')->get('flood.limit'), '@interval' => format_interval(600))));
+    $this->assertRaw(t('You cannot send more than %number messages in @interval. Try again later.', array('%number' => \Drupal::config('contact.settings')->get('flood.limit'), '@interval' => \Drupal::service('date')->formatInterval(600))));
 
     // Test listing controller.
     $this->drupalLogin($admin_user);
diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Routing/ContentTranslationRouteSubscriber.php b/core/modules/content_translation/lib/Drupal/content_translation/Routing/ContentTranslationRouteSubscriber.php
index 2390090..7a8f9be 100644
--- a/core/modules/content_translation/lib/Drupal/content_translation/Routing/ContentTranslationRouteSubscriber.php
+++ b/core/modules/content_translation/lib/Drupal/content_translation/Routing/ContentTranslationRouteSubscriber.php
@@ -89,6 +89,12 @@ protected function alterRoutes(RouteCollection $collection, $provider) {
             'entity' => array(
               'type' => 'entity:' . $entity_type,
             ),
+            'source' => array(
+              'type' => 'language',
+            ),
+            'target' => array(
+              'type' => 'language',
+            ),
           ),
         )
       );
@@ -112,6 +118,9 @@ protected function alterRoutes(RouteCollection $collection, $provider) {
             'entity' => array(
               'type' => 'entity:' . $entity_type,
             ),
+            'language' => array(
+              'type' => 'language',
+            ),
           ),
         )
       );
@@ -134,6 +143,9 @@ protected function alterRoutes(RouteCollection $collection, $provider) {
             'entity' => array(
               'type' => 'entity:' . $entity_type,
             ),
+            'language' => array(
+              'type' => 'language',
+            ),
           ),
           '_access_mode' => 'ANY',
         )
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index 95ebe76..fd123ca 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -858,7 +858,7 @@ function template_preprocess_forum_submitted(&$variables) {
     $username = array('#theme' => 'username', '#account' => user_load($variables['topic']->uid));
     $variables['author'] = drupal_render($username);
   }
-  $variables['time'] = isset($variables['topic']->created) ? format_interval(REQUEST_TIME - $variables['topic']->created) : '';
+  $variables['time'] = isset($variables['topic']->created) ? \Drupal::service('date')->formatInterval(REQUEST_TIME - $variables['topic']->created) : '';
 }
 
 /**
diff --git a/core/modules/locale/locale.pages.inc b/core/modules/locale/locale.pages.inc
index 462f6fa..b83c5ff 100644
--- a/core/modules/locale/locale.pages.inc
+++ b/core/modules/locale/locale.pages.inc
@@ -384,6 +384,6 @@ function template_preprocess_locale_translation_update_info(&$variables) {
 function template_preprocess_locale_translation_last_check(&$variables) {
   $last = $variables['last'];
   $variables['last_checked'] = ($last != NULL);
-  $variables['time'] = format_interval(REQUEST_TIME - $last);
+  $variables['time'] = \Drupal::service('date')->formatInterval(REQUEST_TIME - $last);
   $variables['link'] = l(t('Check manually'), 'admin/reports/translations/check', array('query' => drupal_get_destination()));
 }
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTokenReplaceTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTokenReplaceTest.php
index 0834116..d6080aa 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeTokenReplaceTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeTokenReplaceTest.php
@@ -61,8 +61,8 @@ function testNodeTokenReplacement() {
     $tests['[node:author]'] = check_plain(user_format_name($account));
     $tests['[node:author:uid]'] = $node->getAuthorId();
     $tests['[node:author:name]'] = check_plain(user_format_name($account));
-    $tests['[node:created:since]'] = format_interval(REQUEST_TIME - $node->getCreatedTime(), 2, $language_interface->id);
-    $tests['[node:changed:since]'] = format_interval(REQUEST_TIME - $node->getChangedTime(), 2, $language_interface->id);
+    $tests['[node:created:since]'] = \Drupal::service('date')->formatInterval(REQUEST_TIME - $node->getCreatedTime(), 2, $language_interface->id);
+    $tests['[node:changed:since]'] = \Drupal::service('date')->formatInterval(REQUEST_TIME - $node->getChangedTime(), 2, $language_interface->id);
 
     // Test to make sure that we generated something for each token.
     $this->assertFalse(in_array(0, array_map('strlen', $tests)), 'No empty tokens generated.');
diff --git a/core/modules/system/lib/Drupal/system/Form/CronForm.php b/core/modules/system/lib/Drupal/system/Form/CronForm.php
index 5d94762..6ff7b92 100644
--- a/core/modules/system/lib/Drupal/system/Form/CronForm.php
+++ b/core/modules/system/lib/Drupal/system/Form/CronForm.php
@@ -9,6 +9,7 @@
 
 use Drupal\Core\Config\ConfigFactory;
 use Drupal\Core\Config\Context\ContextInterface;
+use Drupal\Core\Datetime\Date as DateService;
 use Drupal\Core\KeyValueStore\StateInterface;
 use Drupal\Core\Form\ConfigFormBase;
 use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -27,6 +28,13 @@ class CronForm extends ConfigFormBase {
   protected $state;
 
   /**
+   * The date service.
+   *
+   * @var \Drupal\Core\Datetime\Date
+   */
+  protected $dateService;
+
+  /**
    * Constructs a CronForm object.
    *
    * @param \Drupal\Core\Config\ConfigFactory $config_factory
@@ -35,10 +43,13 @@ class CronForm extends ConfigFormBase {
    *   The configuration context used for this configuration object.
    * @param \Drupal\Core\KeyValueStore\StateInterface $state
    *   The state key value store.
+   * @param \Drupal\Core\Datetime\Date $date_service
+   *    The date service.
    */
-  public function __construct(ConfigFactory $config_factory, ContextInterface $context, StateInterface $state) {
+  public function __construct(ConfigFactory $config_factory, ContextInterface $context, StateInterface $state, DateService $date_service) {
     parent::__construct($config_factory, $context);
     $this->state = $state;
+    $this->dateService = $date_service;
   }
 
   /**
@@ -48,7 +59,8 @@ public static function create(ContainerInterface $container) {
     return new static(
       $container->get('config.factory'),
       $container->get('config.context.free'),
-      $container->get('state')
+      $container->get('state'),
+      $container->get('date')
     );
   }
 
@@ -74,7 +86,7 @@ public function buildForm(array $form, array &$form_state) {
       '#submit' => array(array($this, 'submitCron')),
     );
 
-    $status = '<p>' . t('Last run: %cron-last ago.', array('%cron-last' => format_interval(REQUEST_TIME - $this->state->get('system.cron_last')))) . '</p>';
+    $status = '<p>' . t('Last run: %cron-last ago.', array('%cron-last' => $this->dateService->formatInterval(REQUEST_TIME - $this->state->get('system.cron_last')))) . '</p>';
     $form['status'] = array(
       '#markup' => $status,
     );
@@ -92,7 +104,7 @@ public function buildForm(array $form, array &$form_state) {
       '#title' => t('Run cron every'),
       '#description' => t('More information about setting up scheduled tasks can be found by <a href="@url">reading the cron tutorial on drupal.org</a>.', array('@url' => url('http://drupal.org/cron'))),
       '#default_value' => $config->get('threshold.autorun'),
-      '#options' => array(0 => t('Never')) + drupal_map_assoc(array(3600, 10800, 21600, 43200, 86400, 604800), 'format_interval'),
+      '#options' => array(0 => t('Never')) + drupal_map_assoc(array(3600, 10800, 21600, 43200, 86400, 604800), array(\Drupal::service('date'), 'formatInterval')),
     );
 
     return parent::buildForm($form, $form_state);
diff --git a/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php b/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php
index f596078..db85ed7 100644
--- a/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php
+++ b/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php
@@ -82,7 +82,7 @@ public function buildForm(array $form, array &$form_state) {
       '#title' => t('Caching'),
     );
 
-    $period = drupal_map_assoc(array(0, 60, 180, 300, 600, 900, 1800, 2700, 3600, 10800, 21600, 32400, 43200, 86400), 'format_interval');
+    $period = drupal_map_assoc(array(0, 60, 180, 300, 600, 900, 1800, 2700, 3600, 10800, 21600, 32400, 43200, 86400), array(\Drupal::service('date'), 'formatInterval'));
     $period[0] = '<' . t('none') . '>';
     $form['caching']['page_cache_maximum_age'] = array(
       '#type' => 'select',
diff --git a/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php b/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php
index 4344801..a10b230 100644
--- a/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php
@@ -45,7 +45,7 @@ function testTokenReplacement() {
 
     $target  = check_plain($node->getTitle());
     $target .= check_plain($account->getUsername());
-    $target .= format_interval(REQUEST_TIME - $node->getCreatedTime(), 2, $language_interface->id);
+    $target .= \Drupal::service('date')->formatInterval(REQUEST_TIME - $node->getCreatedTime(), 2, $language_interface->id);
     $target .= check_plain($user->getUsername());
     $target .= format_date(REQUEST_TIME, 'short', '', NULL, $language_interface->id);
 
@@ -164,7 +164,7 @@ function testSystemDateTokenReplacement() {
     $tests['[date:medium]'] = format_date($date, 'medium', '', NULL, $language_interface->id);
     $tests['[date:long]'] = format_date($date, 'long', '', NULL, $language_interface->id);
     $tests['[date:custom:m/j/Y]'] = format_date($date, 'custom', 'm/j/Y', NULL, $language_interface->id);
-    $tests['[date:since]'] = format_interval((REQUEST_TIME - $date), 2, $language_interface->id);
+    $tests['[date:since]'] = \Drupal::service('date')->formatInterval((REQUEST_TIME - $date), 2, $language_interface->id);
     $tests['[date:raw]'] = filter_xss($date);
 
     // Test to make sure that we generated something for each token.
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index cabea75..8c0c2a5 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -1946,7 +1946,7 @@ function hook_requirements($phase) {
     $cron_last = \Drupal::state()->get('system.cron_last');
 
     if (is_numeric($cron_last)) {
-      $requirements['cron']['value'] = t('Last run !time ago', array('!time' => format_interval(REQUEST_TIME - $cron_last)));
+      $requirements['cron']['value'] = t('Last run !time ago', array('!time' => \Drupal::service('date')->formatInterval(REQUEST_TIME - $cron_last)));
     }
     else {
       $requirements['cron'] = array(
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 14153a0..0ab2549 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -290,7 +290,7 @@ function system_requirements($phase) {
     }
 
     // Set summary and description based on values determined above.
-    $summary = t('Last run !time ago', array('!time' => format_interval(REQUEST_TIME - $cron_last)));
+    $summary = t('Last run !time ago', array('!time' => \Drupal::service('date')->formatInterval(REQUEST_TIME - $cron_last)));
     $description = '';
     if ($severity != REQUIREMENT_INFO) {
       $description = t('Cron has not run recently.') . ' ' . $help;
diff --git a/core/modules/system/system.tokens.inc b/core/modules/system/system.tokens.inc
index 4c27e2c..662e7d3 100644
--- a/core/modules/system/system.tokens.inc
+++ b/core/modules/system/system.tokens.inc
@@ -65,7 +65,7 @@ function system_token_info() {
   );
   $date['since'] = array(
     'name' => t("Time-since"),
-    'description' => t("A date in 'time-since' format. (%date)", array('%date' => format_interval(REQUEST_TIME - 360, 2))),
+    'description' => t("A date in 'time-since' format. (%date)", array('%date' => \Drupal::service('date')->formatInterval(REQUEST_TIME - 360, 2))),
   );
   $date['raw'] = array(
     'name' => t("Raw timestamp"),
@@ -154,7 +154,7 @@ function system_tokens($type, $tokens, array $data = array(), array $options = a
           break;
 
         case 'since':
-          $replacements[$original] = format_interval((REQUEST_TIME - $date), 2, $langcode);
+          $replacements[$original] = \Drupal::service('date')->formatInterval((REQUEST_TIME - $date), 2, $langcode);
           break;
 
         case 'raw':
diff --git a/core/modules/tracker/tracker.pages.inc b/core/modules/tracker/tracker.pages.inc
index 332d9ac..4d3a08f 100644
--- a/core/modules/tracker/tracker.pages.inc
+++ b/core/modules/tracker/tracker.pages.inc
@@ -90,7 +90,7 @@ function tracker_page($account = NULL) {
         'title' => array('data' => l($node->getTitle(), 'node/' . $node->id()) . ' ' . drupal_render($mark_build)),
         'author' => array('data' => array('#theme' => 'username', '#account' => $node->getAuthor())),
         'replies' => array('class' => array('replies'), 'data' => $comments),
-        'last updated' => array('data' => t('!time ago', array('!time' => format_interval(REQUEST_TIME - $node->last_activity)))),
+        'last updated' => array('data' => t('!time ago', array('!time' => \Drupal::service('date')->formatInterval(REQUEST_TIME - $node->last_activity)))),
       );
 
       // Adds extra RDFa markup to the $row array if the RDF module is enabled.
diff --git a/core/modules/update/update.module b/core/modules/update/update.module
index af8143b..80874ec 100644
--- a/core/modules/update/update.module
+++ b/core/modules/update/update.module
@@ -572,7 +572,7 @@ function _update_project_status_sort($a, $b) {
 function theme_update_last_check($variables) {
   $last = $variables['last'];
   $output = '<div class="update checked">';
-  $output .= $last ? t('Last checked: @time ago', array('@time' => format_interval(REQUEST_TIME - $last))) : t('Last checked: never');
+  $output .= $last ? t('Last checked: @time ago', array('@time' => \Drupal::service('date')->formatInterval(REQUEST_TIME - $last))) : t('Last checked: never');
   $output .= ' <span class="check-manually">(' . l(t('Check manually'), 'admin/reports/updates/check', array('query' => drupal_get_destination())) . ')</span>';
   $output .= "</div>\n";
   return $output;
diff --git a/core/modules/user/lib/Drupal/user/Controller/UserListController.php b/core/modules/user/lib/Drupal/user/Controller/UserListController.php
index 7f8da1d..16558f8 100644
--- a/core/modules/user/lib/Drupal/user/Controller/UserListController.php
+++ b/core/modules/user/lib/Drupal/user/Controller/UserListController.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\user\Controller;
 
+use Drupal\Core\Datetime\Date as DateService;
 use Drupal\Core\Entity\EntityControllerInterface;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityListController;
@@ -30,6 +31,13 @@ class UserListController extends EntityListController implements EntityControlle
   protected $queryFactory;
 
   /**
+   * The date service.
+   *
+   * @var \Drupal\Core\Datetime\Date
+   */
+  protected $dateService;
+
+  /**
    * Constructs a new UserListController object.
    *
    * @param string $entity_type
@@ -42,10 +50,13 @@ class UserListController extends EntityListController implements EntityControlle
    *   The module handler to invoke hooks on.
    * @param \Drupal\Core\Entity\Query\QueryFactory $query_factory
    *   The entity query factory.
+   * @param \Drupal\Core\Datetime\Date $date_service
+   *    The date service.
    */
-  public function __construct($entity_type, array $entity_info, EntityStorageControllerInterface $storage, ModuleHandlerInterface $module_handler, QueryFactory $query_factory) {
+  public function __construct($entity_type, array $entity_info, EntityStorageControllerInterface $storage, ModuleHandlerInterface $module_handler, QueryFactory $query_factory, DateService $date_service) {
     parent::__construct($entity_type, $entity_info, $storage, $module_handler);
     $this->queryFactory = $query_factory;
+    $this->dateService = $date_service;
   }
 
   /**
@@ -57,7 +68,8 @@ public static function createInstance(ContainerInterface $container, $entity_typ
       $entity_info,
       $container->get('entity.manager')->getStorageController($entity_type),
       $container->get('module_handler'),
-      $container->get('entity.query')
+      $container->get('entity.query'),
+      $container->get('date')
     );
   }
 
@@ -134,9 +146,9 @@ public function buildRow(EntityInterface $entity) {
       '#theme' => 'item_list',
       '#items' => $users_roles,
     );
-    $row['member_for'] = format_interval(REQUEST_TIME - $entity->getCreatedTime());
+    $row['member_for'] = $this->dateService->formatInterval(REQUEST_TIME - $entity->getCreatedTime());
     $row['access'] = $entity->access ? $this->t('@time ago', array(
-      '@time' => format_interval(REQUEST_TIME - $entity->getLastAccessedTime()),
+      '@time' => $this->dateService->formatInterval(REQUEST_TIME - $entity->getLastAccessedTime()),
     )) : t('never');
     return $row + parent::buildRow($entity);
   }
diff --git a/core/modules/user/lib/Drupal/user/Tests/UserAdminListingTest.php b/core/modules/user/lib/Drupal/user/Tests/UserAdminListingTest.php
index 182812d..7f0d13b 100644
--- a/core/modules/user/lib/Drupal/user/Tests/UserAdminListingTest.php
+++ b/core/modules/user/lib/Drupal/user/Tests/UserAdminListingTest.php
@@ -97,7 +97,7 @@ public function testUserListing() {
     $expected_roles = array('custom_role_1', 'custom_role_2');
     $this->assertEqual($result_accounts[$role_account_name]['roles'], $expected_roles, 'Ensure roles are listed properly.');
 
-    $this->assertEqual($result_accounts[$timestamp_user]['member_for'], format_interval(REQUEST_TIME - $accounts[$timestamp_user]->created->value), 'Ensure the right member time is displayed.');
+    $this->assertEqual($result_accounts[$timestamp_user]['member_for'], \Drupal::service('date')->formatInterval(REQUEST_TIME - $accounts[$timestamp_user]->created->value), 'Ensure the right member time is displayed.');
   }
 
 }
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index cfb48f8..db86029 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -503,7 +503,7 @@ function user_user_view(UserInterface $account, EntityViewDisplayInterface $disp
     $account->content['member_for'] = array(
       '#type' => 'item',
       '#title' => t('Member for'),
-      '#markup' => format_interval(REQUEST_TIME - $account->getCreatedTime()),
+      '#markup' => \Drupal::service('date')->formatInterval(REQUEST_TIME - $account->getCreatedTime()),
     );
   }
 }
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/cache/Time.php b/core/modules/views/lib/Drupal/views/Plugin/views/cache/Time.php
index 009a178..10ba927 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/cache/Time.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/cache/Time.php
@@ -8,6 +8,8 @@
 namespace Drupal\views\Plugin\views\cache;
 
 use Drupal\Core\Cache\CacheBackendInterface;
+use Drupal\Core\Datetime\Date as DateService;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * Simple caching of query results for Views displays.
@@ -23,10 +25,42 @@
 class Time extends CachePluginBase {
 
   /**
+   * The date service.
+   *
+   * @var \Drupal\Core\Datetime\Date
+   */
+  protected $dateService;
+
+  /**
    * Overrides Drupal\views\Plugin\Plugin::$usesOptions.
    */
   protected $usesOptions = TRUE;
 
+  /**
+   * Constructs a new Time object.
+   *
+   * @param array $configuration
+   *   A configuration array containing information about the plugin instance.
+   * @param string $plugin_id
+   *   The plugin_id for the plugin instance.
+   * @param array $plugin_definition
+   *   The plugin implementation definition.
+   * @param \Drupal\Core\Datetime\Date $date_service
+   *   The date service.
+   */
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, DateService $date_service) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition);
+
+    $this->dateService = $date_service;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, array $plugin_definition) {
+    return new static($configuration, $plugin_id, $plugin_definition, $container->get('date'));
+  }
+
   protected function defineOptions() {
     $options = parent::defineOptions();
     $options['results_lifespan'] = array('default' => 3600);
@@ -40,7 +74,7 @@ protected function defineOptions() {
   public function buildOptionsForm(&$form, &$form_state) {
     parent::buildOptionsForm($form, $form_state);
     $options = array(60, 300, 1800, 3600, 21600, 518400);
-    $options = drupal_map_assoc($options, 'format_interval');
+    $options = drupal_map_assoc($options, array(\Drupal::service('date'), 'formatInterval'));
     $options = array(-1 => t('Never cache')) + $options + array('custom' => t('Custom'));
 
     $form['results_lifespan'] = array(
@@ -97,7 +131,7 @@ public function validateOptionsForm(&$form, &$form_state) {
   public function summaryTitle() {
     $results_lifespan = $this->getLifespan('results');
     $output_lifespan = $this->getLifespan('output');
-    return format_interval($results_lifespan, 1) . '/' . format_interval($output_lifespan, 1);
+    return $this->dateService->formatInterval($results_lifespan, 1) . '/' . $this->dateService->formatInterval($output_lifespan, 1);
   }
 
   protected function getLifespan($type) {
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/Date.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/Date.php
index 7ae6005..4ecb912 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/field/Date.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/Date.php
@@ -7,10 +7,10 @@
 
 namespace Drupal\views\Plugin\views\field;
 
+use Drupal\Core\Datetime\Date as DateService;
 use Drupal\Core\Entity\EntityStorageControllerInterface;
 use Drupal\views\ResultRow;
 use Symfony\Component\DependencyInjection\ContainerInterface;
-use Drupal\Core\Datetime\Date as DateService;
 
 /**
  * A handler to provide proper displays for dates.
@@ -144,19 +144,19 @@ public function render(ResultRow $values) {
       $time_diff = REQUEST_TIME - $value; // will be positive for a datetime in the past (ago), and negative for a datetime in the future (hence)
       switch ($format) {
         case 'raw time ago':
-          return format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2);
+          return $this->dateService->formatInterval($time_diff, is_numeric($custom_format) ? $custom_format : 2);
         case 'time ago':
-          return t('%time ago', array('%time' => format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2)));
+          return t('%time ago', array('%time' => $this->dateService->formatInterval($time_diff, is_numeric($custom_format) ? $custom_format : 2)));
         case 'raw time hence':
-          return format_interval(-$time_diff, is_numeric($custom_format) ? $custom_format : 2);
+          return $this->dateService->formatInterval(-$time_diff, is_numeric($custom_format) ? $custom_format : 2);
         case 'time hence':
-          return t('%time hence', array('%time' => format_interval(-$time_diff, is_numeric($custom_format) ? $custom_format : 2)));
+          return t('%time hence', array('%time' => $this->dateService->formatInterval(-$time_diff, is_numeric($custom_format) ? $custom_format : 2)));
         case 'raw time span':
-          return ($time_diff < 0 ? '-' : '') . format_interval(abs($time_diff), is_numeric($custom_format) ? $custom_format : 2);
+          return ($time_diff < 0 ? '-' : '') . $this->dateService->formatInterval(abs($time_diff), is_numeric($custom_format) ? $custom_format : 2);
         case 'inverse time span':
-          return ($time_diff > 0 ? '-' : '') . format_interval(abs($time_diff), is_numeric($custom_format) ? $custom_format : 2);
+          return ($time_diff > 0 ? '-' : '') . $this->dateService->formatInterval(abs($time_diff), is_numeric($custom_format) ? $custom_format : 2);
         case 'time span':
-          return t(($time_diff < 0 ? '%time hence' : '%time ago'), array('%time' => format_interval(abs($time_diff), is_numeric($custom_format) ? $custom_format : 2)));
+          return t(($time_diff < 0 ? '%time hence' : '%time ago'), array('%time' => $this->dateService->formatInterval(abs($time_diff), is_numeric($custom_format) ? $custom_format : 2)));
         case 'custom':
           if ($custom_format == 'r') {
             return format_date($value, $format, $custom_format, $timezone, 'en');
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/TimeInterval.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/TimeInterval.php
index 3074ffd..712995f 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/field/TimeInterval.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/TimeInterval.php
@@ -7,7 +7,9 @@
 
 namespace Drupal\views\Plugin\views\field;
 
+use Drupal\Core\Datetime\Date as DateService;
 use Drupal\views\ResultRow;
+use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
  * A handler to provide proper displays for time intervals.
@@ -18,6 +20,43 @@
  */
 class TimeInterval extends FieldPluginBase {
 
+  /**
+   * The date service.
+   *
+   * @var \Drupal\Core\Datetime\Date
+   */
+  protected $dateService;
+
+  /**
+   * Constructs a new Date object.
+   *
+   * @param array $configuration
+   *   A configuration array containing information about the plugin instance.
+   * @param string $plugin_id
+   *   The plugin ID for the plugin instance.
+   * @param array $plugin_definition
+   *   The plugin implementation definition.
+   * @param \Drupal\Core\Datetime\Date $date_service
+   *   The date service.
+   */
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, DateService $date_service) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition);
+
+    $this->dateService = $date_service;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, array $plugin_definition) {
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $container->get('date')
+    );
+  }
+
   protected function defineOptions() {
     $options = parent::defineOptions();
 
@@ -42,7 +81,7 @@ public function buildOptionsForm(&$form, &$form_state) {
    */
   public function render(ResultRow $values) {
     $value = $values->{$this->field_alias};
-    return format_interval($value, isset($this->options['granularity']) ? $this->options['granularity'] : 2);
+    return $this->dateService->formatInterval($value, isset($this->options['granularity']) ? $this->options['granularity'] : 2);
   }
 
 }
diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDateTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDateTest.php
index cfa1270..1a98c88 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDateTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldDateTest.php
@@ -69,11 +69,11 @@ public function testFieldDate() {
     }
 
     $intervals = array(
-      'raw time ago' => format_interval(REQUEST_TIME - $time, 2),
-      'time ago' => t('%time ago', array('%time' => format_interval(REQUEST_TIME - $time, 2))),
+      'raw time ago' => \Drupal::service('date')->formatInterval(REQUEST_TIME - $time, 2),
+      'time ago' => t('%time ago', array('%time' => \Drupal::service('date')->formatInterval(REQUEST_TIME - $time, 2))),
       // TODO write tests for them
-//       'raw time span' => format_interval(REQUEST_TIME - $time, 2),
-//       'time span' => t('%time hence', array('%time' => format_interval(REQUEST_TIME - $time, 2))),
+//       'raw time span' => \Drupal::service('date')->formatInterval(REQUEST_TIME - $time, 2),
+//       'time span' => t('%time hence', array('%time' => \Drupal::service('date')->formatInterval(REQUEST_TIME - $time, 2))),
     );
     $this->assertRenderedDatesEqual($view, $intervals);
   }
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
index 84df38e..e11a2c0 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php
@@ -10,6 +10,7 @@
 use Drupal\Core\Ajax\AjaxResponse;
 use Drupal\Core\Ajax\HtmlCommand;
 use Drupal\Core\Ajax\ReplaceCommand;
+use Drupal\Core\Datetime\Date as DateService;
 use Drupal\Component\Utility\NestedArray;
 use Drupal\user\TempStoreFactory;
 use Symfony\Component\HttpFoundation\Request;
@@ -35,16 +36,26 @@ class ViewEditFormController extends ViewFormControllerBase {
   protected $request;
 
   /**
+   * The date service.
+   *
+   * @var \Drupal\Core\Datetime\Date
+   */
+  protected $dateService;
+
+  /**
    * Constructs a new ViewEditFormController object.
    *
    * @param \Drupal\user\TempStoreFactory $temp_store_factory
    *   The factory for the temp store object.
    * @param \Symfony\Component\HttpFoundation\Request $request
    *   The request object.
+   * @param \Drupal\Core\Datetime\Date $date_service
+   *   The date service.
    */
-  public function __construct(TempStoreFactory $temp_store_factory, Request $request) {
+  public function __construct(TempStoreFactory $temp_store_factory, Request $request, DateService $date_service) {
     $this->tempStore = $temp_store_factory->get('views');
     $this->request = $request;
+    $this->dateService = $date_service;
   }
 
   /**
@@ -53,7 +64,8 @@ public function __construct(TempStoreFactory $temp_store_factory, Request $reque
   public static function create(ContainerInterface $container) {
     return new static(
       $container->get('user.tempstore'),
-      $container->get('request')
+      $container->get('request'),
+      $container->get('date')
     );
   }
 
@@ -121,7 +133,7 @@ public function form(array $form, array &$form_state) {
       );
       $lock_message_substitutions = array(
         '!user' => drupal_render($username),
-        '!age' => format_interval(REQUEST_TIME - $view->lock->updated),
+        '!age' => $this->dateService->formatInterval(REQUEST_TIME - $view->lock->updated),
         '!break' => url('admin/structure/views/view/' . $view->id() . '/break-lock'),
       );
       $form['locked'] = array(
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index e9f0ffe..dc4bab3 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -808,7 +808,7 @@ function simpletest_script_reporter_write_xml_results() {
 function simpletest_script_reporter_timer_stop() {
   echo "\n";
   $end = timer_stop('run-tests');
-  echo "Test run duration: " . format_interval($end['time'] / 1000);
+  echo "Test run duration: " . \Drupal::service('date')->formatInterval($end['time'] / 1000);
   echo "\n\n";
 }
 
