Global date formatting function

This commit is contained in:
2016-08-26 23:14:46 +02:00
parent a4787387dd
commit f39389ead4
4 changed files with 10 additions and 3 deletions

View File

@@ -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++) {