From 1dcc2fbf5f0a4ad45230b37c08bf652fd0626796 Mon Sep 17 00:00:00 2001 From: Steffen Lange Date: Fri, 26 Feb 2021 10:04:24 +0100 Subject: [PATCH] Default format for GetDatum method --- feiertage.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/feiertage.php b/feiertage.php index 9b14b3a..09bc102 100644 --- a/feiertage.php +++ b/feiertage.php @@ -49,7 +49,7 @@ class Feiertag { return $this->name; } - public function GetDatum(string $format) { + public function GetDatum(string $format = 'Ymd') { return date($format, $this->datum); } @@ -85,8 +85,8 @@ class Feiertag { $s = "BEGIN:VEVENT\r\n" . 'UID:' . uniqid(get_class()) . "\r\n" . "DTSTAMP:{$this->GetDatum('Ymd\THis\Z')}\r\n" - . "DTSTART;VALUE=DATE:{$this->GetDatum('Ymd')}\r\n" - . "DTEND;VALUE=DATE:{$this->GetDatum('Ymd')}\r\n" + . "DTSTART;VALUE=DATE:{$this->GetDatum()}\r\n" + . "DTEND;VALUE=DATE:{$this->GetDatum()}\r\n" . 'SUMMARY:' . addcslashes($this->name, ',\\;') . "\r\n" . 'TRANSP:TRANSPARENT' . "\r\n"; if ($this->IsGesetzlich()) {