[wp-trac] [WordPress Trac] #48606: Some date formats get incorrectly output in Italian

WordPress Trac noreply at wordpress.org
Thu Nov 14 14:10:49 UTC 2019


#48606: Some date formats get incorrectly output in Italian
--------------------------+---------------------
 Reporter:  Clorith       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.3.1
Component:  Date/Time     |     Version:  5.3
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+---------------------

Comment (by Rarst):

 Yeah, it's broken in Russian as well.

 So we start with "Thursday 14 November 2019" (I'll do this in English for
 clarity) and have two steps in the logic here:

 1. First we have quick check for non-digits followed by 1-2 digits and
 optionally ordinal suffix (e.g. Foo 1st, Bar 22nd). In this case this is
 actually matching "Thursday 14" while we were kinda looking for the month,
 not day of the week.
 2. We are trying to replace any name of the month, followed by same 1-2
 digits + optional suffix by those digits, followed by genitive name of the
 month. But! Here name of the month followed by 1-2 digits is actually
 (November 20)19, which replacements turns into '20 November19'

 Possible fixes:

 1. Replace if followed by 1-2 digits, but ''no more'' digits than that.
 2. Make ordinal suffix mandatory for replacement and leave it alone
 otherwise.

 Pinging @SergeyBiryukov who wrote original patch for opinion.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48606#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list