-
-
Notifications
You must be signed in to change notification settings - Fork 198
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 Egyptian holidays #155
Conversation
ec4826d
to
5e5fc8e
Compare
6a33c92
to
005220e
Compare
Underlying package is abandoned and also doesn't have any tests -- would be very skeptical to depend on it. It is also restricted to Carbon v1 & v2, which is preparing to have a new v3 release soon, so this package will be incompatible with Laravel 11: laravel/framework#49764 |
Thanks. I'm working together with a few other PR authors to come up with a way to centralize this logic in the |
@Nielsvanpach I understand your hesitance to rely on an outdated package (one without tests, as well). So I adopted the Turkey approach in #70 and added those holidays statically. But I couldn't find a source that has been reliably tracking these holidays in Egypt prior to 2005. I double checked with Google Calendar and a few other sources, but the information on Wikipedia is incorrect. You might know by now that there's no way to accurately predict when these holidays will be observed because of the variance involved, but this provides as good an approach as any (to my knowledge, anyway. I'd welcome anyone to correct this). Maybe this can be maintained in the future to add any drastic changes. But apart from Islamic holidays, everything else can be precisely calculated. I also found conflicts on the main branch with the holidays/src/Countries/Country.php Line 57 in 6b35af7
Other than that, I found the existing lang translations a bit too Google translate-ish so I replaced them with more sensible, true-to-life translations and added missing ones: ...and used the Egyptian Presidency's calendar for reference. I kept the original snapshot to keep myself honest. All tests still pass. |
Thanks! |
Public holidays in Egypt, both observed and national holidays, including checks for whether or not a holiday falls on a weekday/weekend and when it should be observed. This is synced with the way Google Calendar does it.
As noted in #56 and #90, the use of
geniusts/hijri-dates
is necessary to (pretty much) accurately calculate when Islamic holidays will be observed during a given year. When they're observed differs from one country to another, even if they're all celebrated concurrently.All tests pass.