diff --git a/src/pvv/side/agenda.php b/src/pvv/side/agenda.php
index cfecdd1..f1edaca 100644
--- a/src/pvv/side/agenda.php
+++ b/src/pvv/side/agenda.php
@@ -6,6 +6,8 @@ use \DateInterval;
class Agenda {
+ private $activities;
+
const TODAY = 0;
const TOMORROW = 1;
const THIS_WEEK = 2;
@@ -18,7 +20,7 @@ class Agenda {
}
public static function getFormattedDate($date) {
- return trim(strftime('%A %e. %b %H.%M', $date->getTimeStamp()));
+ return $date->format("l j. M H.i");
}
public function getEventsBetween(DateTimeImmutable $from, DateTimeImmutable $to) {
diff --git a/src/pvv/side/dbactivity.php b/src/pvv/side/dbactivity.php
index 0f3677d..142cff6 100644
--- a/src/pvv/side/dbactivity.php
+++ b/src/pvv/side/dbactivity.php
@@ -5,6 +5,7 @@ use \DateTimeImmutable;
use \PDO;
class DBActivity implements Activity {
+ private $pdo;
public function __construct(PDO $pdo) {
$this->pdo = $pdo;
diff --git a/src/pvv/side/event.php b/src/pvv/side/event.php
index 05f7c5f..fbf9b37 100644
--- a/src/pvv/side/event.php
+++ b/src/pvv/side/event.php
@@ -24,7 +24,7 @@ abstract class Event {
return 'i morgen';
}
if (Agenda::isThisWeek($this->getStart()) || $this->getStart()->sub(new DateInterval('P4D'))->getTimestamp() < time()) {
- return strftime('%A', $this->getStart()->getTimestamp());
+ return $this->getStart()->format("l");
}
if (Agenda::isNextWeek($this->getStart())) {
return 'neste uke';
@@ -32,7 +32,7 @@ abstract class Event {
if (Agenda::isThisMonth($this->getStart())) {
return 'denne måneden';
}
- return trim(strftime('%e. %B', $this->getStart()->getTimestamp()));
+ return $this->getStart()->format("j. F");
}
public abstract function getStop(); /* : DateTimeImmutable */
diff --git a/src/pvv/side/simpleevent.php b/src/pvv/side/simpleevent.php
index 10fd006..8316588 100644
--- a/src/pvv/side/simpleevent.php
+++ b/src/pvv/side/simpleevent.php
@@ -3,7 +3,7 @@ namespace pvv\side;
class SimpleEvent extends Event {
- private $id, $name, $descr, $start, $end, $org, $loc;
+ private $id, $name, $descr, $start, $end, $org, $loc, $isDBEvent;
public function __construct($id, $name,\DateTimeImmutable $start,\DateTimeImmutable $end,$org, $loc, $descr, $isDBEvent = false){
$this->id = $id;
@@ -52,9 +52,9 @@ class SimpleEvent extends Event {
return $this->descr;
}
- public function isDBEvent() {
- return $this->isDBEvent;
- }
+ /* public function getIsDBEvent() { */
+ /* return $this->isDBEvent; */
+ /* } */
public function getColor() {
return "#3b7";
diff --git a/www/css/landing.css b/www/css/landing.css
index 35734c2..5e64a84 100644
--- a/www/css/landing.css
+++ b/www/css/landing.css
@@ -72,6 +72,7 @@ img.float-right {
overflow: hidden;
text-overflow: ellipsis;
}
+
.calendar-events ul .date {
color: rgba(0, 0, 0, 0.5);
font-size: 0.8em;
@@ -87,11 +88,14 @@ img.float-right {
padding: 0;
}
-.calendar-events a,
+.calendar-events a {
+ color: rgba(0,0,0, 0.85);
+}
.calendar-events ul .time {
color: rgba(0, 0, 0, 0.5);
float: right;
+ margin-left: 0.2em;
}
.calendar-events ul .icon,
diff --git a/www/index.php b/www/index.php
index 11adae9..ea45fab 100644
--- a/www/index.php
+++ b/www/index.php
@@ -77,18 +77,17 @@ $doorTime = date("H:i", $doorEntry->time);
= $event->getName(); ?>
- + */ ?>
- ' . $event->getStart()->format('H:i') . '';
- if (\pvv\side\Agenda::isThisWeek($event->getStart()) || $event->getStart()->sub(new DateInterval('P3D'))->getTimestamp() < time()) {
- echo '' . strftime('%a', $event->getStart()->getTimestamp()) . '';
- } else {
- echo '' . strftime('%e. %b', $event->getStart()->getTimestamp()) . '';
- }
- } else {
- echo '' . $event->getStart()->format('H:i') . '';
- }
- ?>
+ ' . $event->getStart()->format('H:i') . ' ';
+ if (\pvv\side\Agenda::isThisWeek($event->getStart()) || $event->getStart()->sub(new DateInterval('P3D'))->getTimestamp() < time()) {
+ echo '' . $event->getStart()->format('D') . '';
+ } else {
+ echo '' . $event->getStart()->format('j. F') . '';
+ }
+ } else {
+ echo '' . $event->getStart()->format('H:i') . '';
+ }
+ ?>
@@ -108,7 +107,7 @@ $doorTime = date("H:i", $doorEntry->time);
echo $title;
}
echo "";
-
+
$Parsedown = new Parsedown();
echo $Parsedown->text(implode("\n", $motd["content"]));
?>