-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
add Tunisia Holidays #109
Conversation
Reasons to not use that package: |
src/Countries/Tunisia.php
Outdated
* @var array<int, array<int, array{name: string,date: string,slug: string}>> $hijriHolidays | ||
*/ | ||
protected array $hijriHolidays = [ | ||
"1970" => [ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
@Nielsvanpach i think these changes not viewed 😅 |
Co-authored-by: Niels Vanpachtenbeke <[email protected]>
Co-authored-by: Niels Vanpachtenbeke <[email protected]>
Co-authored-by: Niels Vanpachtenbeke <[email protected]>
Co-authored-by: Niels Vanpachtenbeke <[email protected]>
Can you have a look at the failing phpstan errors? |
Done |
@Nielsvanpach any suggestions here ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
...s/Countries/TunisiaTest/it_can_calculate_tunisia_holidays_with_data_set___2024____2024_.snap
Outdated
Show resolved
Hide resolved
add Araft day fix totalDays for tunisia
Thanks for your work on this! |
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