Ticket #1200: date_i18n.2.patch
File date_i18n.2.patch, 1.4 KB (added by , 19 years ago) |
---|
-
wp-includes/functions.php
59 59 } 60 60 61 61 function date_i18n($dateformatstring, $unixtimestamp) { 62 global $month, $weekday ;62 global $month, $weekday, $month_abbrev, $weekday_abbrev; 63 63 $i = $unixtimestamp; 64 64 if ((!empty($month)) && (!empty($weekday))) { 65 65 $datemonth = $month[date('m', $i)]; 66 $datemonth_abbrev = $month_abbrev[$datemonth]; 66 67 $dateweekday = $weekday[date('w', $i)]; 68 $dateweekday_abbrev = $weekday_abbrev[$dateweekday]; 67 69 $dateformatstring = ' '.$dateformatstring; 68 $dateformatstring = preg_replace("/([^\\\])D/", "\\1".backslashit( substr($dateweekday, 0, 3)), $dateformatstring);70 $dateformatstring = preg_replace("/([^\\\])D/", "\\1".backslashit($dateweekday_abbrev), $dateformatstring); 69 71 $dateformatstring = preg_replace("/([^\\\])F/", "\\1".backslashit($datemonth), $dateformatstring); 70 72 $dateformatstring = preg_replace("/([^\\\])l/", "\\1".backslashit($dateweekday), $dateformatstring); 71 $dateformatstring = preg_replace("/([^\\\])M/", "\\1".backslashit( substr($datemonth, 0, 3)), $dateformatstring);73 $dateformatstring = preg_replace("/([^\\\])M/", "\\1".backslashit($datemonth_abbrev), $dateformatstring); 72 74 $dateformatstring = substr($dateformatstring, 1, strlen($dateformatstring)-1); 73 75 } 74 76 $j = @date($dateformatstring, $i);