Closed bchurchill closed 5 years ago
This looks fairly good. I'll need a little time to review. My first inclination is to generalize the solstice-finding function and move it out of bahai.py
Thanks! Yeah, take your time. The solstice finding function actually belongs to a dependency (pymeeus). The only reason bahai.py has some special logic for that is because in the Baha'i calendar, the date of Naw Ruz can be a day before/after the spring equinox depending on when sunset is in Tehran.
I've collapsed your changes into one commit and merged the results. This is now published in v2.2.0
In 2014 the governing authority for the Baha'is, the Universal House of Justice, decided to implement previously unspecified details for the Baha'i (Badi) calendar. As a result, the date for Naw Ruz changed, and is now based on the moment of the Spring equinox in combination with the time of sunset in Tehran. This PR implements:
For reference, the following specifications were used:
https://www.bahai.org/library/authoritative-texts/the-universal-house-of-justice/messages/20140710_001/1#174438046 https://www.bahai.us/events/holy-days/