diff --git a/src/pvv/side/agenda.php b/src/pvv/side/agenda.php index 607c0e5..81aa55e 100644 --- a/src/pvv/side/agenda.php +++ b/src/pvv/side/agenda.php @@ -20,6 +20,10 @@ class Agenda { $this->activities = $activities; } + public static function getFormattedDate($date) { + return trim(strftime('%A %e. %b %H.%M', $date->getTimeStamp())); + } + public function getEventsBetween(DateTimeImmutable $from, DateTimeImmutable $to) { $results = []; for($i = 0; $i < sizeof($this->activities); $i++) { diff --git a/www/anime/index.php b/www/anime/index.php index cf3a43a..a63aca4 100755 --- a/www/anime/index.php +++ b/www/anime/index.php @@ -4,6 +4,7 @@ date_default_timezone_set('Europe/Oslo'); setlocale(LC_ALL, 'no_NO'); require __DIR__ . '/../../src/_autoload.php'; require __DIR__ . '/../../sql_config.php'; +use \pvv\side\Agenda; ?> Sosialverkstedet @@ -35,7 +36,7 @@ $nextEvent = $activity->getNextEventFrom(new DateTimeImmutable);