Skip to content

Commit

Permalink
Update Slovakia.php (#228)
Browse files Browse the repository at this point in the history
* Update Slovakia.php

Add support for historical holidays, pls.

* Update src/Countries/Slovakia.php

* Update src/Countries/Slovakia.php

---------

Co-authored-by: Niels Vanpachtenbeke <[email protected]>
  • Loading branch information
hamrak and Nielsvanpach committed Jun 13, 2024
1 parent 7b15433 commit 6d896f7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Countries/Slovakia.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function countryCode(): string

protected function allHolidays(int $year): array
{
return array_merge([
$holidays = array_merge([
'Deň vzniku Slovenskej republiky' => '01-01',
'Zjavenie Pána (Traja králi)' => '01-06',
'Sviatok práce' => '05-01',
Expand All @@ -27,6 +27,16 @@ protected function allHolidays(int $year): array
'Prvý sviatok vianočný' => '12-25',
'Druhý sviatok vianočný' => '12-26',
], $this->variableHolidays($year));

if ($year === 2018) {
$holidays['Výročie Deklarácie slovenského národa'] = '10-30';
}

if ($year < 2024) {
$holidays['Sedembolestná Panna Mária'] = '09-01';
}

return $holidays;
}

/** @return array<string, CarbonImmutable> */
Expand Down

0 comments on commit 6d896f7

Please sign in to comment.