WordPress.org

Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#492 closed defect (bug) (fixed)

mysql2date does not get weekday/month abbreviations from locale

Reported by: nbachiyski Owned by: ryan
Milestone: Priority: normal
Severity: trivial Version:
Component: General Keywords:
Focuses: Cc:

Description

The mysql2date function (wp-includes/functions.php) does not use the $month_abbrev and $weekday_abbrev arrays, but instead gets the first 3 characters of the day/month name. In English, of course, it works quite perfectly, but when using localized month/date names there are two problems:

1) In some languages the abbreviations are much or less different (not exactly 3 symbols, not exactly the first three and so on)

2) substr is not unicode safe. As a result we get the first three bytes but, when the string is in utf8 I get the first character and a half :)

Attachments (1)

mysql2date-using-abrrevs.diff (1.6 KB) - added by nbachiyski 17 years ago.

Download all attachments as: .zip

Change History (3)

#2 @ryan
17 years ago

  • Owner changed from anonymous to rboren
  • Resolution changed from 10 to 20
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.