|
@@ 842-843 (lines=2) @@
|
| 839 |
|
|
| 840 |
|
if (!isset($non_twelve_hour)) |
| 841 |
|
$non_twelve_hour = trim(strftime('%p')) === ''; |
| 842 |
|
if ($non_twelve_hour && strpos($str, '%p') !== false) |
| 843 |
|
$str = str_replace('%p', (strftime('%H', $time) < 12 ? $txt['time_am'] : $txt['time_pm']), $str); |
| 844 |
|
|
| 845 |
|
foreach (array('%a', '%A', '%b', '%B') as $token) |
| 846 |
|
if (strpos($str, $token) !== false) |
|
@@ 856-857 (lines=2) @@
|
| 853 |
|
if (strpos($str, $token) !== false) |
| 854 |
|
$str = str_replace($token, $txt[$text_label][(int) strftime($token === '%a' || $token === '%A' ? '%w' : '%m', $time)], $str); |
| 855 |
|
|
| 856 |
|
if (strpos($str, '%p') !== false) |
| 857 |
|
$str = str_replace('%p', (strftime('%H', $time) < 12 ? $txt['time_am'] : $txt['time_pm']), $str); |
| 858 |
|
} |
| 859 |
|
|
| 860 |
|
// Format the time and then restore any literal percent characters |