@@ 859-860 (lines=2) @@ | ||
856 | ||
857 | if (!isset($non_twelve_hour)) |
|
858 | $non_twelve_hour = trim(strftime('%p')) === ''; |
|
859 | if ($non_twelve_hour && strpos($str, '%p') !== false) |
|
860 | $str = str_replace('%p', (strftime('%H', $time) < 12 ? $txt['time_am'] : $txt['time_pm']), $str); |
|
861 | ||
862 | foreach (array('%a', '%A', '%b', '%B') as $token) |
|
863 | if (strpos($str, $token) !== false) |
|
@@ 873-874 (lines=2) @@ | ||
870 | if (strpos($str, $token) !== false) |
|
871 | $str = str_replace($token, $txt[$text_label][(int) strftime($token === '%a' || $token === '%A' ? '%w' : '%m', $time)], $str); |
|
872 | ||
873 | if (strpos($str, '%p') !== false) |
|
874 | $str = str_replace('%p', (strftime('%H', $time) < 12 ? $txt['time_am'] : $txt['time_pm']), $str); |
|
875 | } |
|
876 | ||
877 | // Format the time and then restore any literal percent characters |