Skip to content

Commit

Permalink
Remove timezones
Browse files Browse the repository at this point in the history
  • Loading branch information
adevade committed Feb 1, 2024
1 parent 60168bb commit 44669f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Countries/Sweden.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ protected function allHolidays(int $year): array
/** @return array<string, CarbonImmutable> */
protected function variableHolidays(int $year): array
{
$easter = $this->easter($year)->setTimezone('Europe/Stockholm');
$easter = $this->easter($year);

/** @var CarbonImmutable $midsummerDay */
$midsummerDay = CarbonImmutable::createFromFormat('Y-m-d', "{$year}-06-20", 'Europe/Stockholm');
$midsummerDay = CarbonImmutable::createFromFormat('Y-m-d', "{$year}-06-20");

if (! $midsummerDay->isSaturday()) {
$midsummerDay = $midsummerDay->next(CarbonImmutable::SATURDAY);
}

/** @var CarbonImmutable $halloween */
$halloween = CarbonImmutable::createFromFormat('Y-m-d', "{$year}-10-31", 'Europe/Stockholm');
$halloween = CarbonImmutable::createFromFormat('Y-m-d', "{$year}-10-31");

if (! $halloween->isSaturday()) {
$halloween = $halloween->next(CarbonImmutable::SATURDAY);
Expand Down

0 comments on commit 44669f8

Please sign in to comment.