Skip to content

Commit

Permalink
Use $this->easter factory and remoce comments on allHolidays method
Browse files Browse the repository at this point in the history
  • Loading branch information
dlopez525 committed Jan 19, 2024
1 parent 10a90d4 commit 742a996
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Countries/Peru.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public function countryCode(): string
return 'pe';
}

/** @return array<string, CarbonImmutable> */
protected function allHolidays(int $year): array
{
return array_merge([
Expand All @@ -35,8 +34,7 @@ protected function allHolidays(int $year): array
/** @return array<string, CarbonImmutable> */
protected function variableHolidays(int $year): array
{
$easter = CarbonImmutable::createFromTimestamp(easter_date($year))
->setTimezone('America/Lima');
$easter = $this->easter($year);

return [
'Jueves Santo' => $easter->subDays(3),
Expand Down

0 comments on commit 742a996

Please sign in to comment.