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);
- Tid:
- = $nextEvent->getStart()->format('Y-m-d H:i');?>
+ = Agenda::getFormattedDate($nextEvent->getStart());?>
- Sted:
diff --git a/www/brettspill/index.php b/www/brettspill/index.php
index 2d83adf..2f20890 100755
--- a/www/brettspill/index.php
+++ b/www/brettspill/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
@@ -36,7 +37,7 @@ $nextEvent = $activity->getNextEventFrom(new DateTimeImmutable);
- Tid:
- = $nextEvent->getStart()->format('Y-m-d H:i');?>
+ = Agenda::getFormattedDate($nextEvent->getStart());?>
- Sted:
diff --git a/www/nerdepitsa/index.php b/www/nerdepitsa/index.php
index 12daa53..884af35 100755
--- a/www/nerdepitsa/index.php
+++ b/www/nerdepitsa/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
@@ -37,7 +38,7 @@ $nextEvent = $activity->getNextEventFrom(new DateTimeImmutable);
- Tid:
- = $nextEvent->getStart()->format('Y-m-d H:i');?>
+ = Agenda::getFormattedDate($nextEvent->getStart());?>
- Sted: