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 Ukrainian holidays #112

Merged
merged 6 commits into from
Jan 23, 2024
Merged

Add Ukrainian holidays #112

merged 6 commits into from
Jan 23, 2024

Conversation

kapi14
Copy link
Contributor

@kapi14 kapi14 commented Jan 19, 2024

Hi Spatie!

There is one extra function for calculating the correct Eastern date due to the Meeus Julian algorithm or Revised Julian calendar

@Nielsvanpach
Copy link
Member

Could you look at the failing tests? Thanks!

@kapi14
Copy link
Contributor Author

kapi14 commented Jan 20, 2024

Hi @Nielsvanpach,

Sure, should be good now.

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!

}


protected function orthodox_eastern($year): string
Copy link
Member

Choose a reason for hiding this comment

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

In Country.php we already have a orthodox calculation. Could you verify if that works?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perfect, yes this is working correctly!

/** @return array<string, CarbonImmutable> */
protected function variableHolidays(int $year): array
{
$easter = CarbonImmutable::createFromTimestamp($this->orthodox_eastern($year))
Copy link
Member

Choose a reason for hiding this comment

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

You can use $this->easter($year) instead


class Ukraine extends Country
{
protected function __construct(
Copy link
Member

Choose a reason for hiding this comment

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

If you don't need the constructor, you can remove it

@Nielsvanpach
Copy link
Member

PR looks good! 👍 I'll leave this one open until I've seen some approvals!

@kapi14
Copy link
Contributor Author

kapi14 commented Jan 20, 2024

Thanks for reviewing.

Copy link

@esurov esurov left a comment

Choose a reason for hiding this comment

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

lgtm

@Nielsvanpach
Copy link
Member

Thanks!

@Nielsvanpach Nielsvanpach merged commit 437a90a into spatie:main Jan 23, 2024
7 of 8 checks passed
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