Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#23918 closed defect (bug) (invalid)

Twenty Thirteen: Date i18n for daily archive h1 header

Reported by: nao's profile 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 12 years ago.
date i18n for archive.php in Twenty Thirteen

Download all attachments as: .zip

Change History (8)

@Nao
12 years ago

date i18n for archive.php in Twenty Thirteen

#1 @SergeyBiryukov
12 years ago

  • Component changed from Themes to Bundled Theme

#2 @obenland
12 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.

#3 follow-up: @nacin
12 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.

#4 @lancewillett
12 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.

#5 @lancewillett
11 years ago

  • Keywords dev-feedback added

#6 in reply to: ↑ 3 @SergeyBiryukov
11 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.

#7 @lancewillett
11 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.