Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 300833

Complete the deprecation of format_date()

$
0
0

Problem/Motivation

As part of #2999721: [META] Deprecate the legacy include files , deprecate format_date()

Proposed resolution

Replace with calls to DateFormatterInterface::format().

  • In tests, replace all format_date() calls with $this->container->get('date.formatter')->format() calls.
  • In procedural code, replace all format_date() calls with \Drupal::service('date.formatter')->format() calls.
  • In classes, inject the date formatter service from the container, and use it.

Remaining tasks

None.

User interface changes

None.

API changes

Where necessary constructors are changed.

Data model changes

None.


Viewing all articles
Browse latest Browse all 300833

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>