From e827119e886fbf53882a23fd4f255f59ed64ff02 Mon Sep 17 00:00:00 2001 From: Sebastian Seidel Date: Fri, 21 Apr 2023 10:13:02 +0200 Subject: [PATCH 1/2] Update CarbonGermanHolidays.php Since 2023 "Internationaler Frauentag" is holiday as well -> https://www.ndr.de/nachrichten/mecklenburg-vorpommern/Frauentag-in-MV-Landtag-beschliesst-neuen-Feiertag,frauentag370.html --- src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php b/src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php index 1644fa8..0c1e844 100644 --- a/src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php +++ b/src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php @@ -153,7 +153,7 @@ public static function getHolidays($year, $states = self::ALL_STATES) $holidays['1. Weihnachtstag'] = mktime(0, 0, 0, 12, 25, $year); $holidays['2. Weihnachtstag'] = mktime(0, 0, 0, 12, 26, $year); - if (in_array(self::BERLIN, $states)) { + if (in_array(self::BERLIN, self::MECKLENBURG_VORPOMMERN, $states)) { $holidays['Internationaler Frauentag'] = mktime(0, 0, 0, 3, 8, $year); } From bedbb65e1be1ab5a5b36f772ab3b3748bf1eec01 Mon Sep 17 00:00:00 2001 From: Sebastian Seidel Date: Fri, 21 Apr 2023 10:16:13 +0200 Subject: [PATCH 2/2] Update CarbonGermanHolidays.php Sorry - I was a bit too quick here. Now it should be fine. --- src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php b/src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php index 0c1e844..b144be2 100644 --- a/src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php +++ b/src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php @@ -153,10 +153,10 @@ public static function getHolidays($year, $states = self::ALL_STATES) $holidays['1. Weihnachtstag'] = mktime(0, 0, 0, 12, 25, $year); $holidays['2. Weihnachtstag'] = mktime(0, 0, 0, 12, 26, $year); - if (in_array(self::BERLIN, self::MECKLENBURG_VORPOMMERN, $states)) { + if (array_intersect([self::BERLIN, self::MECKLENBURG_VORPOMMERN], $states)) { $holidays['Internationaler Frauentag'] = mktime(0, 0, 0, 3, 8, $year); } - + if (in_array(self::BRANDENBURG, $states)) { $holidays['Ostersonntag'] = $easterSunday; $holidays['Pfingstsonntag'] = strtotime('+49 days', $easterSunday);