diff --git a/index.php b/index.php index f427938..c5cf771 100755 --- a/index.php +++ b/index.php @@ -6,9 +6,9 @@ include('inc/db.php'); $current_week = date('W'); // SQL-Abfrage mit JOIN zwischen meetings und colors -$sql = "SELECT * FROM meetings - JOIN colors ON meetings.color_id = colors.id - WHERE WEEK(meeting_date, 1) = $current_week +$sql = "SELECT * FROM meetings + JOIN colors ON meetings.color_id = colors.id + WHERE WEEK(meeting_date, 1) = $current_week ORDER BY meeting_date DESC LIMIT 1"; $result = mysqli_query($conn, $sql); @@ -44,6 +44,16 @@ function get_readable_text_color($hex_code) include('inc/header.php'); +// Wochentags-Übersetzung +$german_weekdays = [ + 'Mon' => 'Mo.', + 'Tue' => 'Di.', + 'Wed' => 'Mi.', + 'Thu' => 'Do.', + 'Fri' => 'Fr.', + 'Sat' => 'Sa.', + 'Sun' => 'So.', +]; ?>
nächster Termin:
-= date('d.m.Y', strtotime($row['meeting_date'])) ?>
+= $german_weekday . ' ' . date('d.m.Y H:i', strtotime($row['meeting_date'])) ?>
+