diff options
author | Minteck <contact@minteck.org> | 2022-10-18 08:59:09 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-10-18 08:59:09 +0200 |
commit | 2c4ae43e688a9873e86211ea0e7aeb9ba770dd77 (patch) | |
tree | 17848d95522dab25d3cdeb9c4a6450e2a234861f /includes/planner.inc | |
parent | 108525534c28013cfe1897c30e4565f9893f3766 (diff) | |
download | pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.tar.gz pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.tar.bz2 pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.zip |
Update
Diffstat (limited to 'includes/planner.inc')
-rw-r--r-- | includes/planner.inc | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/includes/planner.inc b/includes/planner.inc index da25770..69e0331 100644 --- a/includes/planner.inc +++ b/includes/planner.inc @@ -194,24 +194,12 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis <?php day("Yesterday", -1) ?> <?php day("Today", 0) ?> <?php day("Tomorrow", 1) ?> - <?php - - $factor = 1; - $lastDay = time() + 86400; - $lastDayWeek = date('W', $lastDay); - $tomorrowWeek = date('W', time() + 86400); - - while ($lastDayWeek === $tomorrowWeek) { - $factor++; - $lastDay = time() + (86400 * $factor); - $lastDayWeek = date('W', $lastDay); - - if ($lastDayWeek === $tomorrowWeek) { - day(null, $factor); - } - } - - ?> + <?php day(date('l', time() + 86400 * 2), 2) ?> + <?php day(date('l', time() + 86400 * 3), 3) ?> + <?php day(date('l', time() + 86400 * 4), 4) ?> + <?php day(date('l', time() + 86400 * 5), 5) ?> + <?php day(date('l', time() + 86400 * 6), 6) ?> + <?php day(date('l', time() + 86400 * 7), 7) ?> </tbody> </table> |