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 Bosnia And Herzegovina #203

Merged
merged 2 commits into from
Mar 22, 2024

Conversation

DesaBL
Copy link
Contributor

@DesaBL DesaBL commented Feb 6, 2024

Contributing a new country ?

  • Have you checked to ensure there aren't other open Pull Requests for the same country?
  1. Create a new class in the Countries directory. It should extend the Country class.
  2. Add a test for the new country in the tests directory.
  3. Run the tests so a snapshot gets created.
  4. Verify the result in the newly created snapshot is correct.

src/Countries/BosniaAndHerzegovina.php Show resolved Hide resolved
src/Countries/BosniaAndHerzegovina.php Outdated Show resolved Hide resolved
src/Countries/BosniaAndHerzegovina.php Outdated Show resolved Hide resolved
/** @return array<string, CarbonImmutable> */
public function variableHolidays(int $year): array
{
// Orthodox Easter calculation needs to be in the same timezone as the country
Copy link
Member

Choose a reason for hiding this comment

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

What do you mean with this comment? Is $this->orthodoxEaster($year) giving a bad result for you?

use Carbon\CarbonImmutable;
use Spatie\Holidays\Holidays;

it('can calculate bosnia and herzegovina holidays', function () {
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 also add a test case with a region?

@DesaBL DesaBL requested a review from Nielsvanpach March 7, 2024 07:30
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!

@Nielsvanpach Nielsvanpach merged commit 6ce8f02 into spatie:main Mar 22, 2024
2 of 14 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.

2 participants