|
@@ 770-771 (lines=2) @@
|
| 767 |
|
{ |
| 768 |
|
if (!isset($non_twelve_hour)) |
| 769 |
|
$non_twelve_hour = trim(strftime('%p')) === ''; |
| 770 |
|
if ($non_twelve_hour && strpos($str, '%p') !== false) |
| 771 |
|
$str = str_replace('%p', (strftime('%H', $time) < 12 ? $txt['time_am'] : $txt['time_pm']), $str); |
| 772 |
|
|
| 773 |
|
foreach (array('%a', '%A', '%b', '%B') as $token) |
| 774 |
|
if (strpos($str, $token) !== false) |
|
@@ 784-785 (lines=2) @@
|
| 781 |
|
if (strpos($str, $token) !== false) |
| 782 |
|
$str = str_replace($token, $txt[$text_label][(int) strftime($token === '%a' || $token === '%A' ? '%w' : '%m', $time)], $str); |
| 783 |
|
|
| 784 |
|
if (strpos($str, '%p') !== false) |
| 785 |
|
$str = str_replace('%p', (strftime('%H', $time) < 12 ? $txt['time_am'] : $txt['time_pm']), $str); |
| 786 |
|
} |
| 787 |
|
|
| 788 |
|
// Windows doesn't support %e; on some versions, strftime fails altogether if used, so let's prevent that. |