From 9f4eb6347845d126853b248088c75b793ed84a2a Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Sat, 2 Sep 2023 21:03:20 +0200 Subject: [PATCH] Re-enable recurring events for Fall 2023 --- inc/include.php | 6 +++--- src/pvv/side/social/brettspillactivity.php | 4 ++-- src/pvv/side/social/driftkveldactivity.php | 4 ++-- src/pvv/side/social/hackekveldactivity.php | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/inc/include.php b/inc/include.php index a2b55db..81185b7 100644 --- a/inc/include.php +++ b/inc/include.php @@ -27,9 +27,9 @@ use \pvv\side\Agenda; $agenda = new \pvv\side\Agenda([ // new \pvv\side\social\NerdepitsaActivity, // new \pvv\side\social\AnimekveldActivity, - // new \pvv\side\social\HackekveldActivity, - // new \pvv\side\social\BrettspillActivity, - // new \pvv\side\social\DriftkveldActivity, + new \pvv\side\social\HackekveldActivity, + new \pvv\side\social\BrettspillActivity, + new \pvv\side\social\DriftkveldActivity, new \pvv\side\DBActivity($pdo), ]); diff --git a/src/pvv/side/social/brettspillactivity.php b/src/pvv/side/social/brettspillactivity.php index 55c7fb5..7dd2c1b 100644 --- a/src/pvv/side/social/brettspillactivity.php +++ b/src/pvv/side/social/brettspillactivity.php @@ -13,7 +13,7 @@ class BrettspillActivity implements Activity { $date = $date->setTime(16, 15, 0); if ($date->format('N') != 7) return $this->nextDate($date->add(new DateInterval('P1D'))); - if ($date->format('W') % 2) + if ($date->format('W') % 2 - 1) return $this->nextDate($date->add(new DateInterval('P7D'))); return $date; } @@ -24,7 +24,7 @@ class BrettspillActivity implements Activity { $date = $date->setTime(16, 15, 0); if ($date->format('N') != 7) return $this->prevDate($date->sub(new DateInterval('P1D'))); - if ($date->format('W') % 2) + if ($date->format('W') % 2 - 1) return $this->prevDate($date->sub(new DateInterval('P7D'))); return $date; diff --git a/src/pvv/side/social/driftkveldactivity.php b/src/pvv/side/social/driftkveldactivity.php index 9627723..dd1a367 100644 --- a/src/pvv/side/social/driftkveldactivity.php +++ b/src/pvv/side/social/driftkveldactivity.php @@ -13,7 +13,7 @@ class DriftkveldActivity implements Activity { $date = $date->setTime(18, 15, 0); if ($date->format('N') != 6) return $this->nextDate($date->add(new DateInterval('P1D'))); - if ($date->format('W') % 2) + if ($date->format('W') % 2 - 1) return $this->nextDate($date->add(new DateInterval('P7D'))); return $date; } @@ -24,7 +24,7 @@ class DriftkveldActivity implements Activity { $date = $date->setTime(18, 15, 0); if ($date->format('N') != 6) return $this->prevDate($date->sub(new DateInterval('P1D'))); - if ($date->format('W') % 2) + if ($date->format('W') % 2 - 1) return $this->prevDate($date->sub(new DateInterval('P7D'))); return $date; } diff --git a/src/pvv/side/social/hackekveldactivity.php b/src/pvv/side/social/hackekveldactivity.php index c317d99..7b27319 100644 --- a/src/pvv/side/social/hackekveldactivity.php +++ b/src/pvv/side/social/hackekveldactivity.php @@ -13,7 +13,7 @@ class HackekveldActivity implements Activity { $date = $date->setTime(16, 15, 0); if ($date->format('N') != 6) return $this->nextDate($date->add(new DateInterval('P1D'))); - if ($date->format('W') % 2 - 1) + if ($date->format('W') % 2) return $this->nextDate($date->add(new DateInterval('P7D'))); return $date; } @@ -24,7 +24,7 @@ class HackekveldActivity implements Activity { $date = $date->setTime(18, 15, 0); if ($date->format('N') != 6) return $this->prevDate($date->sub(new DateInterval('P1D'))); - if ($date->format('W') % 2 - 1) + if ($date->format('W') % 2) return $this->prevDate($date->sub(new DateInterval('P7D'))); return $date; }