[wp-trac] [WordPress Trac] #48934: Rework genitive month names in date output

WordPress Trac noreply at wordpress.org
Wed Dec 11 12:51:19 UTC 2019


#48934: Rework genitive month names in date output
-------------------------+------------------------------------------
 Reporter:  Rarst        |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Date/Time    |    Version:
 Severity:  normal       |   Keywords:  needs-patch needs-unit-tests
  Focuses:               |
-------------------------+------------------------------------------
 WP historically does some post-processing on date output for locales that
 have genitive month names. This is implemented in
 `wp_maybe_decline_date()`.

 The standing implementation is quite brittle since it tried to guess
 necessary modifications from the output string. So, for example, digits
 representing year might be confused with digits representing day of
 months. There is no context to disambiguate.

 Likely this needs to be reworked altogether.

 The possible approaches are tentatively:
 1. Use the date ''format'' being processed to determine necessity of
 replacement.
 2. Work the logic into parser code that walks through the format and
 replaces formats with localized values.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48934>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list