Skip to content

Commit

Permalink
switch to easter method
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonBarrettACT committed Jan 21, 2024
1 parent f4fce73 commit 7557596
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 42 deletions.
3 changes: 1 addition & 2 deletions src/Countries/NorthernIreland.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ protected function allHolidays(int $year): array
/** @return array<string, CarbonImmutable> */
protected function variableHolidays(int $year): array
{
$easterSunday = CarbonImmutable::createFromTimestamp(easter_date($year))
->setTimezone('Europe/London');
$easterSunday = $this->easter($year);

$goodFriday = $easterSunday->subDays(2);
$easterMonday = $easterSunday->addDay();
Expand Down
3 changes: 1 addition & 2 deletions src/Countries/Scotland.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ protected function allHolidays(int $year): array
/** @return array<string, CarbonImmutable> */
protected function variableHolidays(int $year): array
{
$easterSunday = CarbonImmutable::createFromTimestamp(easter_date($year))
->setTimezone('Europe/London');
$easterSunday = $this->easter($year);

$goodFriday = $easterSunday->subDays(2);

Expand Down
3 changes: 1 addition & 2 deletions src/Countries/Wales.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ protected function allHolidays(int $year): array
/** @return array<string, CarbonImmutable> */
protected function variableHolidays(int $year): array
{
$easterSunday = CarbonImmutable::createFromTimestamp(easter_date($year))
->setTimezone('Europe/London');
$easterSunday = $this->easter($year);

$goodFriday = $easterSunday->subDays(2);
$easterMonday = $easterSunday->addDay();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[
{
"name": "Good Friday",
"date": "1969-12-30"
"name": "New Year's Day",
"date": "2020-01-01"
},
{
"name": "Easter Monday",
"date": "1970-01-02"
"name": "Good Friday",
"date": "2020-04-10"
},
{
"name": "New Year's Day",
"date": "2020-01-01"
"name": "Easter Monday",
"date": "2020-04-13"
},
{
"name": "Early May bank holiday (VE day)",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[
{
"name": "Good Friday",
"date": "1969-12-30"
"name": "New Year's Day",
"date": "2024-01-01"
},
{
"name": "Easter Monday",
"date": "1970-01-02"
"name": "Good Friday",
"date": "2024-03-29"
},
{
"name": "New Year's Day",
"date": "2024-01-01"
"name": "Easter Monday",
"date": "2024-04-01"
},
{
"name": "Early May bank holiday",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[
{
"name": "Good Friday",
"date": "1969-12-30"
"name": "New Year's Day",
"date": "2020-01-01"
},
{
"name": "Easter Monday",
"date": "1970-01-02"
"name": "Good Friday",
"date": "2020-04-10"
},
{
"name": "New Year's Day",
"date": "2020-01-01"
"name": "Easter Monday",
"date": "2020-04-13"
},
{
"name": "Early May bank holiday (VE day)",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[
{
"name": "Good Friday",
"date": "1969-12-30"
"name": "New Year's Day",
"date": "2021-01-01"
},
{
"name": "Easter Monday",
"date": "1970-01-02"
"name": "Good Friday",
"date": "2021-04-02"
},
{
"name": "New Year's Day",
"date": "2021-01-01"
"name": "Easter Monday",
"date": "2021-04-05"
},
{
"name": "Early May bank holiday",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[
{
"name": "Good Friday",
"date": "1969-12-30"
"name": "New Year's Day (substitute day)",
"date": "2022-01-03"
},
{
"name": "Easter Monday",
"date": "1970-01-02"
"name": "Good Friday",
"date": "2022-04-15"
},
{
"name": "New Year's Day (substitute day)",
"date": "2022-01-03"
"name": "Easter Monday",
"date": "2022-04-18"
},
{
"name": "Early May bank holiday",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[
{
"name": "Good Friday",
"date": "1969-12-30"
"name": "New Year's Day (substitute day)",
"date": "2033-01-03"
},
{
"name": "Easter Monday",
"date": "1970-01-02"
"name": "Good Friday",
"date": "2033-04-15"
},
{
"name": "New Year's Day (substitute day)",
"date": "2033-01-03"
"name": "Easter Monday",
"date": "2033-04-18"
},
{
"name": "Early May bank holiday",
Expand Down

0 comments on commit 7557596

Please sign in to comment.