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

Added support for Greece #10

Merged
merged 3 commits into from
Apr 7, 2016
Merged

Added support for Greece #10

merged 3 commits into from
Apr 7, 2016

Conversation

sebdesign
Copy link
Contributor

No description provided.

* @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)
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

@stelgenhof
Copy link
Member

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();
Copy link
Member

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.

Copy link
Contributor Author

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.

@stelgenhof stelgenhof added this to the 1.3.0 milestone Apr 6, 2016
@stelgenhof
Copy link
Member

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 :)

@sebdesign
Copy link
Contributor Author

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
@stelgenhof stelgenhof merged commit 96321dd into azuyalabs:master Apr 7, 2016
@sebdesign
Copy link
Contributor Author

Thank for merging the PR! (I just noticed I didn't add anything to the readme.md)

@stelgenhof
Copy link
Member

No worries. I just updated the docs :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants