diff --git a/src/Countries/Ecuador.php b/src/Countries/Ecuador.php index 36b7f418..40735238 100644 --- a/src/Countries/Ecuador.php +++ b/src/Countries/Ecuador.php @@ -37,6 +37,17 @@ public function nearestDay(int $year, int $month, int $day) return $date; } + public function getChristmasHoliday(int $year) + { + $date = CarbonImmutable::createFromDate($year, 12, 25); + + if($year === 2022) { + return $date->addDay(); + } + + return $date; + } + /** @return array */ protected function variableHolidays(int $year): array { @@ -55,7 +66,7 @@ protected function variableHolidays(int $year): array 'Independencia de Guayaquil' => $this->nearestDay($year, 10, 9), 'Día de Los Difuntos' => $this->nearestDay($year, 11, 2), 'Independencia de Cuenca' => $this->nearestDay($year, 11, 3), - 'Navidad' => $this->nearestDay($year, 12, 25), + 'Navidad' => $this->getChristmasHoliday($year), ]; } } \ No newline at end of file