From fb2865dd2928d874f1d7040b8e5665cbebaff73b Mon Sep 17 00:00:00 2001 From: Fabian Golle Date: Mon, 17 Apr 2023 22:14:24 +0200 Subject: [PATCH] Fix calculation of penance day --- 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 bde4ea4..81ba4b1 100644 --- a/src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php +++ b/src/Fgits/CarbonGermanHolidays/CarbonGermanHolidays.php @@ -140,7 +140,7 @@ public static function getHolidays($year, $states = self::ALL_STATES) $states = [$states]; } - $penanceDay = mktime(0, 0, 0, 11, 22 - ($year - 1 + ((int)((int)($year / 4)) % 7)), $year); + $penanceDay = date('Y-m-d', strtotime("-40 days", $easterSunday)); // For all states