From 2f65a54adb00d01888019d7e1d67c0c33c18d950 Mon Sep 17 00:00:00 2001 From: Julien Rosset Date: Sun, 26 Feb 2023 13:50:20 +0100 Subject: [PATCH] Fix Grand Mother day's calculation --- php/PublicHolidayCalendar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/PublicHolidayCalendar.php b/php/PublicHolidayCalendar.php index e853f1a..c1adcfb 100644 --- a/php/PublicHolidayCalendar.php +++ b/php/PublicHolidayCalendar.php @@ -295,7 +295,7 @@ class PublicHolidayCalendar { private static function calculateGrandMotherDay (int $year): DateTimeImmutable { $grandMotherDay = static::createDate($year, 3, 1); try { - $grandMotherDay = $grandMotherDay->sub(new DateInterval('P' . (7 - (int)$grandMotherDay->format('N')) . 'D')); + $grandMotherDay = $grandMotherDay->add(new DateInterval('P' . (7 - (int)$grandMotherDay->format('N')) . 'D')); } catch (Exception) { }