Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#2521 closed defect (bug) (fixed)

DateTime display broken

Reported by: drssay's profile drssay Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0.1
Component: General Keywords: bg|has-patch bg|needs-testing
Focuses: Cc:

Description

In korean, Feburary is "2월".
Display of Date 2006/02/06 is "Feburary 6th, 2006" in English. But "? 6th, 2006" in Korean. This ? is second byte of "월".

/wp-include/function:35

$dateformatstring = preg_replace("/([^\\\])D/", "\\1".backslashit($dateweekday_abbrev), $dateformatstring);
$dateformatstring = preg_replace("/([^\\\])F/", "\\1".backslashit($datemonth), $dateformatstring);
$dateformatstring = preg_replace("/([^\\\])l/", "\\1".backslashit($dateweekday), $dateformatstring);
$dateformatstring = preg_replace("/([^\\\])M/", "\\1".backslashit($datemonth_abbrev), $dateformatstring);

PHP parsed second argument of preg_replace is "
1".backslashit() to "
12월".
reference 1 is changed reference 12. so, result is "월".
Next code trim 1 byte. so, result is ?(second byte of "월").

Finally. I want to changed "
1" to "
1 ".
( One blank appended )

Attachments (2)

wp-datefix.diff (1.3 KB) - added by drssay 18 years ago.
datetime display fix
date_i18n.diff (1.3 KB) - added by ryan 18 years ago.
Isolate $1 back reference.

Download all attachments as: .zip

Change History (9)

@drssay
18 years ago

datetime display fix

#1 @davidhouse
18 years ago

  • Keywords bg|has-patch bg|needs-testing added

#2 @drssay
18 years ago

  • Milestone changed from 2.1 to 2.0.2

@ryan
18 years ago

Isolate $1 back reference.

#3 @ryan
18 years ago

Try this fix. It isolates the back reference without adding extra spaces.

#4 @ryan
18 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3610]) Isolate backref. fixes #2521

#5 @ryan
18 years ago

  • Resolution set to fixed

(In [3611]) Isolate backref. fixes #2521

#6 @drssay
18 years ago

Thanks, ryan.

#7 @(none)
17 years ago

  • Milestone 2.0.2 deleted

Milestone 2.0.2 deleted

Note: See TracTickets for help on using tickets.