diff --git a/Sources/Actions/Calendar.php b/Sources/Actions/Calendar.php index 2372fa8436..fb8c9be708 100644 --- a/Sources/Actions/Calendar.php +++ b/Sources/Actions/Calendar.php @@ -1802,6 +1802,12 @@ public static function convertDateToEnglish(string $date): string $replacements += array_combine(array_map('strtolower', Lang::$txt['days_short']), [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', ]); + + // Fix for languages those do not use AM/PM + if (trim(Lang::$txt['time_am']) === '' && trim(Lang::$txt['time_pm']) === '') { + return strtr(strtolower($date), $replacements); + } + // Find all possible variants of AM and PM for this language. $replacements[strtolower(Lang::$txt['time_am'])] = 'AM'; $replacements[strtolower(Lang::$txt['time_pm'])] = 'PM'; diff --git a/Themes/default/Calendar.template.php b/Themes/default/Calendar.template.php index 326e0e7cb7..aefd22972d 100644 --- a/Themes/default/Calendar.template.php +++ b/Themes/default/Calendar.template.php @@ -849,12 +849,12 @@ function template_event_post()
diff --git a/Themes/default/Post.template.php b/Themes/default/Post.template.php index 55f3df464a..7a37c2445c 100644 --- a/Themes/default/Post.template.php +++ b/Themes/default/Post.template.php @@ -159,12 +159,12 @@ function addPollOption()