[wp-trac] [WordPress Trac] #37034: Fix filter for genitive case of months

WordPress Trac noreply at wordpress.org
Sun Jun 5 21:28:30 UTC 2016


#37034: Fix filter for genitive case of months
--------------------------+------------------------------
 Reporter:  semil         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Date/Time     |     Version:  4.5.2
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by swissspidy):

 * component:  General => Date/Time


Old description:

> Hello there,
>
> I'm new here so I hope I'm doing ticket rightly ;)
> I would like to notice bug in function wp_maybe_decline_date for
> preg_replace pattern.
> In our czech language we have 2 months with similar root word so it
> detects previous month and replace this root word.
>
> Solutions is update pattern for preg_replace from
>
> {{{
> '#' . $month . '#'
> }}}
>
>  to
>
> {{{
> '/\b' . $month . '\b/u'
> }}}
>
> Best regards,
> Jan

New description:

 Hello there,

 I'm new here so I hope I'm doing ticket rightly ;)
 I would like to notice bug in function wp_maybe_decline_date for
 preg_replace pattern.
 In our czech language we have 2 months with similar root word so it
 detects previous month and replace this root word.

 Solutions is update pattern for preg_replace from

 {{{
 '#' . $month . '#'
 }}}

 to

 {{{
 '/\b' . $month . '\b/u'
 }}}

 Best regards,
 Jan

--

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


More information about the wp-trac mailing list