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

Additional Hebrew Calendar Holidays #25

Open
eyammer opened this issue Apr 10, 2020 · 2 comments
Open

Additional Hebrew Calendar Holidays #25

eyammer opened this issue Apr 10, 2020 · 2 comments

Comments

@eyammer
Copy link

eyammer commented Apr 10, 2020

I would like to add some additional Hebrew calendar holidays but I don't know how to initiate that. I wrote the code, but I don't know the process for initiating the feature and making the pull request.

def shemini_azeret(year, eve=None):
    year, month, day = hebrew.to_jd_gregorianyear(year, hebrew.TISHRI, 22)
    if eve:
        day = day - 1
    return year, month, day


def lag_baomer(year, eve=None):
    year, month, day = hebrew.to_jd_gregorianyear(year, hebrew.IYYAR, 18)
    if eve:
        day = day - 1
    return year, month, day


def tu_beshvat(year, eve=None):
    year, month, day = hebrew.to_jd_gregorianyear(year, hebrew.SHEVAT, 15)
    if eve:
        day = day - 1
    return year, month, day


def ninth_av(year, eve=None):
    year, month, day = hebrew.to_jd_gregorianyear(year, hebrew.AV, 9)
    if eve:
        day = day - 1
    return year, month, day
      
@property
    def tu_beshvat(self):
        return tu_beshvat(self.year, eve=False)

    @property
    def shemini_azeret(self):
        return shemini_azeret(self.year, eve=False)

    @property
    def lag_baomer(self):
        return lag_baomer(self.year, eve=False)

    @property
    def ninth_av(self):
        return ninth_av(self.year, eve=False)```
@ohadeytan
Copy link
Contributor

ohadeytan commented Apr 10, 2020

It is great to see new contributions :)

You can look at my old pull request as an example.
Notice that Tisha B'Av could be postponed, you should handle that.

@eyammer
Copy link
Author

eyammer commented Apr 10, 2020

Will do. Also, good call about Tish B'Av

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

No branches or pull requests

3 participants