diff --git a/feiertage.php b/feiertage.php index b769f01..f0d30a8 100644 --- a/feiertage.php +++ b/feiertage.php @@ -1,11 +1,11 @@ = 0 && $land < self::Count()) - return self::$Namen[$land]; + return ($code) ? self::$Namen[$land][1] : self::$Namen[$land][0]; else return ''; } @@ -73,12 +73,12 @@ class Feiertag { return in_array($land, $this->laender); } - public function GetBundeslaender() { + public function GetBundeslaender(bool $code = false) { $s = ''; for ($i = 0; $i < count($this->laender); $i++) { if (strlen($s) > 0) $s .= ', '; - $s .= Bundesland::GetName($this->laender[$i]); + $s .= Bundesland::GetName($this->laender[$i], $code); } return $s; } @@ -102,7 +102,7 @@ class Feiertag { } public function __toString() { - return date('Y-m-d', $this->datum) . ' ' . $this->name; + return date('Y-m-d', $this->datum) . "\t" . $this->name . "\t" . $this->GetBundeslaender(true); } }