Fix Grand Mother day's calculation

master
Julien Rosset 2 years ago
parent f05c41b675
commit 2f65a54adb

@ -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) {
}

Loading…
Cancel
Save