[wp-trac] [WordPress Trac] #48934: Rework genitive month names in date output
WordPress Trac
noreply at wordpress.org
Wed Jan 15 16:06:19 UTC 2020
#48934: Rework genitive month names in date output
--------------------------------------+---------------------
Reporter: Rarst | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 5.4
Component: Date/Time | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------
Changes (by SergeyBiryukov):
* keywords: needs-patch needs-unit-tests => has-patch has-unit-tests
* milestone: Awaiting Review => 5.4
Comment:
As previously noted in comment:14:ticket:48606, the current implementation
fails on formats like `F y`, where `Май 19` ("May 19" in Russian) is
assumed to be 19th day of May and declined, while it's actually the 19th
year (as in 2019).
Since `wp_maybe_decline_date()` is no longer just a filter on `date_i18n`
and is now called directly from `wp_date()` as a result of [45901], we can
pass the date format to it to determine the necessity of replacement,
instead of trying to guess the format without any context.
[attachment:"48934.diff"] implements that and adds a new test case.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48934#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list