WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#23918 closed defect (bug) (invalid)

Twenty Thirteen: Date i18n for daily archive h1 header

Reported by: Nao Owned by:
Milestone: Priority: normal
Severity: minor Version:
Component: Bundled Theme Keywords: close
Focuses: Cc:

Description

Archive title h1 is missing date_i18n.
This patch simply replaces get_the_date() with date_i18n( get_option( 'date_format' ) ) .

Attachments (1)

23918.diff (719 bytes) - added by Nao 2 years ago.
date i18n for archive.php in Twenty Thirteen

Download all attachments as: .zip

Change History (8)

@Nao2 years ago

date i18n for archive.php in Twenty Thirteen

comment:1 @SergeyBiryukov2 years ago

  • Component changed from Themes to Bundled Theme

comment:2 @obenland2 years ago

  • Keywords close added

The purpose of the daily archive is not to show a list of posts for the current day (which date_i18n() returns), but for a specific day. The use of get_the_date() is correct for that purpose.

comment:3 follow-up: @nacin2 years ago

  • Keywords close removed
  • Milestone changed from Awaiting Review to 3.6

Interesting. get_the_date() does not actually use date_i18n() — I would have assumed it would. This ticket is valid, though the patch is not yet ready, as obenland points out.

comment:4 @lancewillett2 years ago

@nacin I don't understand what is needed next, patch get_the_date()? That should be a different ticket, right? Not theme-related.

comment:5 @lancewillett2 years ago

  • Keywords dev-feedback added

comment:6 in reply to: ↑ 3 @SergeyBiryukov2 years ago

  • Keywords close added; dev-feedback removed

Replying to nacin:

get_the_date() does not actually use date_i18n() — I would have assumed it would.

It does, via mysql2date():
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/functions.php#L10

$translate is true by default, and get_the_date() leaves it that way by omitting:
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/general-template.php#L1379

The ticket seems invalid.

comment:7 @lancewillett2 years ago

  • Keywords has-patch removed
  • Milestone 3.6 deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.