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 Tunisia Holidays #109

Merged
merged 31 commits into from
Apr 3, 2024
Merged

add Tunisia Holidays #109

merged 31 commits into from
Apr 3, 2024

Conversation

mr-wolf-gb
Copy link
Contributor

@mr-wolf-gb mr-wolf-gb commented Jan 18, 2024

i think we need to use other packages to calculate Hijri holidays like this package hijri-dates, when this package added, i will add the Hijri holidays

@Nielsvanpach
Copy link
Member

* @var array<int, array<int, array{name: string,date: string,slug: string}>> $hijriHolidays
*/
protected array $hijriHolidays = [
"1970" => [
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@mr-wolf-gb mr-wolf-gb Jan 31, 2024

Choose a reason for hiding this comment

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

It's the same logic like turkey code but more simple but for turkey only 2 Hijri holidays added but in my Hijri array I added all Hijri holidays for Tunisia

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can use an external hijri converter package

Copy link
Contributor Author

Choose a reason for hiding this comment

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

isn't a solution like Turkey possible here?

https://github.com/spatie/holidays/blob/main/src/Countries/Turkey.php#L11

Tomorrow I will apply the same Turkey code with more holidays

@mr-wolf-gb
Copy link
Contributor Author

@Nielsvanpach i think these changes not viewed 😅

src/Calendars/HijriCalendar.php Outdated Show resolved Hide resolved
src/Countries/Tunisia.php Show resolved Hide resolved
src/Countries/Tunisia.php Outdated Show resolved Hide resolved
src/Countries/Tunisia.php Outdated Show resolved Hide resolved
tests/Countries/TunisiaTest.php Outdated Show resolved Hide resolved
tests/Countries/TunisiaTest.php Outdated Show resolved Hide resolved
mr-wolf-gb and others added 5 commits February 12, 2024 09:57
@Nielsvanpach
Copy link
Member

Can you have a look at the failing phpstan errors?

@mr-wolf-gb
Copy link
Contributor Author

Can you have a look at the failing phpstan errors?

Done

@mr-wolf-gb
Copy link
Contributor Author

@Nielsvanpach any suggestions here !

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.

Looks good!

mr-wolf-gb and others added 2 commits April 3, 2024 07:43
add Araft day
fix totalDays for tunisia
@mr-wolf-gb mr-wolf-gb requested a review from Nielsvanpach April 3, 2024 07:32
@Nielsvanpach
Copy link
Member

Thanks for your work on this!

@Nielsvanpach Nielsvanpach merged commit c081087 into spatie:main Apr 3, 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