Problem/Motivation

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

Proposed resolution

Replace with calls to DateFormatterInterface::format().

In classes, inject the date formatter service from the container, and use it.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

jcnventura created an issue. See original summary.

jcnventura’s picture

Status: Active » Needs review
StatusFileSize
new22.75 KB

Status: Needs review » Needs work

The last submitted patch, 2: byebye-format-date-classes-3008493-2.patch, failed testing. View results

jcnventura’s picture

Status: Needs work » Needs review
StatusFileSize
new685 bytes
new23.1 KB

It seems one line got lost between my tests and when I created the patch.

Status: Needs review » Needs work

The last submitted patch, 4: byebye-format-date-classes-3008493-4.patch, failed testing. View results

jcnventura’s picture

Status: Needs work » Needs review
StatusFileSize
new1.23 KB
new24.33 KB
fenstrat’s picture

Status: Needs review » Reviewed & tested by the community

This looks good, manually applied at it looks to cover all instances of format_date in classes.

alexpott’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

The splitting of issues like

is against the advice of our scoping recommendations. Let's not do this. See https://www.drupal.org/core/scope

I'm going to combine all the issues to the earliest issue - #3008446: Complete the deprecation of format_date()