fixing date issues and contextually language: this should make it work finally both on windows and linux, yay!

This commit is contained in:
real_nowhereman 2008-02-19 20:33:25 +00:00
parent 12ef0a7ecf
commit 3f6242c9d0
2 changed files with 8 additions and 6 deletions

View File

@ -350,12 +350,12 @@
// D l day // D l day
if ( strpos($format, '%a') !== false ) { if ( strpos($format, '%a') !== false ) {
$i = strftime('%u', $timestamp); $i = strftime('%w', $timestamp);
$format = str_replace('%a', $lang['date']['weekday_abbr'][$i], $format); $format = str_replace('%a', $lang['date']['weekday_abbr'][$i], $format);
} }
if ( strpos($format, '%A') !== false ) { if ( strpos($format, '%A') !== false ) {
$i = strftime('%u', $timestamp); $i = strftime('%w', $timestamp);
$format = str_replace('%A', $lang['date']['weekday'][$i], $format); $format = str_replace('%A', $lang['date']['weekday'][$i], $format);
} }

View File

@ -174,24 +174,26 @@
$lang['date']['weekday'] = array( $lang['date']['weekday'] = array(
1=>'Monday', 'Sunday',
'Monday',
'Tuesday', 'Tuesday',
'Wednesday', 'Wednesday',
'Thursday', 'Thursday',
'Friday', 'Friday',
'Saturday', 'Saturday',
'Sunday'
); );
$lang['date']['weekday_abbr'] = array( $lang['date']['weekday_abbr'] = array(
1=>'Mon', 'Sun',
'Mon',
'Tue', 'Tue',
'Wed', 'Wed',
'Thu', 'Thu',
'Fri', 'Fri',
'Sat', 'Sat',
'Sun'
); );