Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add holidays for Sweden #137

Closed
wants to merge 2 commits into from
Closed

Add holidays for Sweden #137

wants to merge 2 commits into from

Conversation

robost
Copy link

@robost robost commented Jan 19, 2024

Re-opening #31 as it was closed by mistake.

@robost
Copy link
Author

robost commented Jan 19, 2024

Here you go @riasvdv :)

Copy link
Member

@Nielsvanpach Nielsvanpach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Could you look at the phpstan errors?

protected function allHolidays(int $year): array
{
return array_merge([
'Nyårsdagen' => CarbonImmutable::create($year, 1, 1),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use the same format for fixed holidays, as in other Country classes?

Comment on lines +29 to +30
$easter = CarbonImmutable::createFromTimestamp(easter_date($year))
->setTimezone('Europe/Stockholm');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$easter = CarbonImmutable::createFromTimestamp(easter_date($year))
->setTimezone('Europe/Stockholm');
$easter = $this->easter($year);

@Nielsvanpach
Copy link
Member

Closing as another PR for Sweden has been merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants