diff --git a/src/Countries/Egypt.php b/src/Countries/Egypt.php index c0ff6d1a6..21ee998f0 100644 --- a/src/Countries/Egypt.php +++ b/src/Countries/Egypt.php @@ -117,13 +117,13 @@ private function convertHijriToGregorianHolidays(array $hijriHolidays, int $year private function getGregorianDateForHijriHoliday(string $hijriDate, int $hijriYear, int $gregorianYear): ?CarbonImmutable { [$month, $day] = explode('-', $hijriDate); - $currentYearDate = Hijri::convertToGregorian((int) $day, (int) $month, $hijriYear); /** * Converts a Hijri date to a Gregorian date and checks its alignment with the Gregorian year. * Since a Hijri year is about 11 days shorter than a Gregorian year, we're checking * if the converted date falls within the specified Gregorian year. */ + $currentYearDate = Hijri::convertToGregorian((int) $day, (int) $month, $hijriYear); if ($currentYearDate->format('Y') == $gregorianYear) { return $currentYearDate->toImmutable(); }