Make WordPress Core

Opened 8 years ago

Closed 6 years ago

#37411 closed defect (bug) (fixed)

Add more formats to wp_maybe_decline_date()

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version: 4.4
Component: Date/Time Keywords: has-patch has-unit-tests
Focuses: Cc:

Description (last modified by SergeyBiryukov)

In some themes, date format is not localized (see an example in Sadakalo theme).

Formats like 'F jS Y' don't make a lot of sense for languages with declensions, which generally use 'j F Y' (where F requires genitive case).

We could improve the situation by adding more formats to wp_maybe_decline_date() introduced in #11226.

Attachments (2)

37411.patch (1.4 KB) - added by SergeyBiryukov 8 years ago.
wp-maybe-decline-date.patch (2.5 KB) - added by Rarst 6 years ago.

Download all attachments as: .zip

Change History (19)

#1 @SergeyBiryukov
8 years ago

  • Keywords 4.7-early added

#2 @SergeyBiryukov
8 years ago

  • Keywords needs-patch added; has-patch removed

j F, Y should be handled as well.

#3 @SergeyBiryukov
8 years ago

  • Description modified (diff)

This ticket was mentioned in Slack in #core by helen. View the logs.


8 years ago

#5 @SergeyBiryukov
8 years ago

  • Keywords 4.7-early removed
  • Milestone changed from Awaiting Review to 4.7
  • Owner set to SergeyBiryukov
  • Status changed from new to accepted

This ticket was mentioned in Slack in #core by desrosj. View the logs.


8 years ago

#7 @desrosj
8 years ago

  • Keywords has-patch added; needs-patch removed

#8 @desrosj
8 years ago

  • Keywords needs-testing added; needs-unit-tests removed

@SergeyBiryukov This looks like it just needs testing?

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


8 years ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


8 years ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


8 years ago

#13 @helen
8 years ago

  • Milestone changed from 4.7 to Future Release

No activity, punting. If it's a bug we need to fix for 4.7 (it feels more like an enhancement in some ways), you know how to bring it back.

#16 @Rarst
6 years ago

  • Keywords has-unit-tests added; needs-testing needs-unit-tests removed

Added unit test cases.

This ticket was mentioned in Slack in #core-datetime by rarst. View the logs.


6 years ago

#18 @SergeyBiryukov
6 years ago

  • Milestone set to 5.3

#19 @SergeyBiryukov
6 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 45555:

Date/Time: Add more supported formats to wp_maybe_decline_date().

Props SergeyBiryukov, Rarst.
Fixes #37411.

Note: See TracTickets for help on using tickets.