fixing date issues and contextually language: this should make it work finally both on windows and linux, yay!
This commit is contained in:
parent
12ef0a7ecf
commit
3f6242c9d0
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user