#36790 closed defect (bug) (fixed)
Wrong month name declension
| Reported by: | pavelevap | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.6 |
| Component: | I18N | Version: | 4.4 |
| Severity: | normal | Keywords: | needs-unit-tests |
| Cc: | Focuses: |
Description
Previously #11226.
Czech month names:
June - Červen - června (declension)
July - Červenec - července (declension)
When I use j. F Y date format, website displays for example 10/7/2015 as 10. červnaec 2015 instead of 10. července 2015.
You can try to Google červnaec, there are many results for this wrong declension.
Attachments (3)
Change History (16)
#3
@
10 years ago
@SergeyBiryukov: Hi, there are many reports related to this problem and July is slowly coming :-( All websites with particular date format are affected in our language. Should I create plugin for filtering date or localization cs_CZ.php file?
#6
@
10 years ago
- Keywords needs-patch needs-unit-tests added
- Milestone Awaiting Review → 4.6
- Owner removed
- Status assigned → reviewing
#7
@
10 years ago
Hi everyone,
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
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Problem is actually in
preg_replace()function here: https://core.trac.wordpress.org/browser/tags/4.5.2/src/wp-includes/functions.php#L192