Provide day of the week
authorJoey Schulze <joey@infodrom.org>
Tue, 13 Aug 2019 19:08:24 +0000 (21:08 +0200)
committerJoey Schulze <joey@infodrom.org>
Tue, 13 Aug 2019 19:08:24 +0000 (21:08 +0200)
src/InfoCon/stempel/status.wml

index 3308c9a..76b9ca3 100644 (file)
@@ -17,6 +17,7 @@
     global $status;
     global $dbh;
     global $stati;
     global $status;
     global $dbh;
     global $stati;
+    $wdays = array('So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa');
 
     $name = load_customers();
 
 
     $name = load_customers();
 
@@ -90,7 +91,8 @@
                       $fieldnr++,
                       $row['id'],
                       $form);
                       $fieldnr++,
                       $row['id'],
                       $form);
-      $date = sprintf('<span onclick="toggle_checkbox(%d,this)">%s</span>', $form, $d[0]);
+      $dt = new Datetime($d[0]);
+      $date = sprintf('<span onclick="toggle_checkbox(%d,this)">%s, %s</span>', $form, $wdays[$dt->format('w')], $d[0]);
       printf($table_row, $color, $row['status'], $check.$date, $form, min2hour($row['time']), $form, $row['kurz'],
             $row['id'],
             htmlspecialchars($row['task'], ENT_COMPAT | ENT_HTML401, 'ISO-8859-1'));
       printf($table_row, $color, $row['status'], $check.$date, $form, min2hour($row['time']), $form, $row['kurz'],
             $row['id'],
             htmlspecialchars($row['task'], ENT_COMPAT | ENT_HTML401, 'ISO-8859-1'));