-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Added support for Greece #10
Conversation
* @link http://php.net/manual/en/function.easter-date.php#83794 | ||
* @link https://en.wikipedia.org/wiki/Computus#Adaptation_for_Western_Easter_of_Meeus.27_Julian_algorithm | ||
*/ | ||
public function calculateEaster($year, $timezone) |
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.
Perhaps renaming this to 'calculateOrthodoxEaster' to avoid confusion with the common Christian Easter?
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.
Yes that's a good point but this way I would have to override the other holidays that depend on orthodox easter, right? E.g. Easter Monday, Pentecost, etc.
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.
I haven't looked into it yet, but do Easter Monday, Pentecost then rely also on the Orthodox Easter? Let me investigate a bit further.
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.
Indeed, for every holiday that relies on the common Christian Easter, in Greece it relies on the Orthodox Easter. By overriding calculateEaster
there's no need to change the related holiday functions. If I had to use a calculateOrthodoxEaster
, then each holiday that is calling calculateEaster
would have to be overridden to use calculateOrthodoxEaster
.
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.
Ah, thanks! That makes sense indeed. Let me check your PR a little bit further and then I will merge it.
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.
As a sidenote, even the catholic church of Greece celebrates Easter on the same date as the Orthodox Easter in Greece, for convenience.
Thanks for the PR! I have left a few comments on there. Once you have adjusted the PR I will merge it. Thanks again for the contribution! |
Some holidays did not exist back in 1945, so 1985 covers that issue.
$this->calculateCleanMonday(); | ||
$this->calculateIndependenceDay(); | ||
$this->calculateOhiDay(); | ||
$this->calculatePolytechnio(); |
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.
Are Ochi-Day and Polytechnio official national holidays/non-working days? From Wikipedia I couldn't see these as non-workingdays.
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.
Ochi day is a national non-working holiday. Polytechnio as well as The Three Hierarchs are working days, but schools and universities are closed.
I cannot yet merge this PR as there are some conflicts. I guess because there are some commits done after you have created the PR. Could you check the PR? I think you can do it quicker than me :) |
Sure, I'll pull the latest commits and resolve the merge conflicts. :) |
* 'master' of https://github.com/azuyalabs/yasumi: Updated documentation, included a section regarding contributing to Yasumi. Adjusted the year for testing in the Germany Unit test as it was causing false errors. Removed state holidays Revert "Revert "Added local holidays according to http://www.schulferien.org/Feiertage/2016/feiertage_2016.html"" Revert "Added local holidays according to http://www.schulferien.org/Feiertage/2016/feiertage_2016.html" Added local holidays according to http://www.schulferien.org/Feiertage/2016/feiertage_2016.html Setting Norway timezone to Europe/Oslo Updated documentation. Fixed issue for Finland as Midsummer's Day (st. Johns Day) was calculated to be on June 24th. However since 1955, the holiday has always been on a Saturday (between June 20 and June 26). Imported DateTimeZone using its fully qualified name in stead of per global namespace. Added support for Germany
Thank for merging the PR! (I just noticed I didn't add anything to the readme.md) |
No worries. I just updated the docs :) |
No description provided.