Skip to content

adds Baal Hatanya zmanim#127

Merged
KosherJava merged 4 commits intoKosherJava:masterfrom
yparitcher:master
Jun 19, 2018
Merged

adds Baal Hatanya zmanim#127
KosherJava merged 4 commits intoKosherJava:masterfrom
yparitcher:master

Conversation

@yparitcher
Copy link
Copy Markdown
Contributor

adds methods to calculate zmanim per most chabad rabbonim based on the Baal Hatanya. the computed zmanim are like https://www.chabad.org/calendar/zmanim_cdo/aid/143790/jewish/Zmanim-Halachic-Times.htm

the sunrise and sunset methods were added as private methods, as they are not published in calendars and are only used to calculate the other zmanim

* there is at least one day where the sun does not rise, and one where it does not set, a null will be
* returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
*/
public Date getChatzosBaalHatanya() {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yparitcher
This method is not needed. Since the sunrise and sunset offset are identical, chatzos will be at the exact same time as the regular chatzos method.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i originaly thought the same, however when i tested it, the chatzos times are between 200 ms and one second apart depending on location, date, and which calculator is used. therefore i added it for complete acuracy, although you are right that most users will never tell the difference.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yparitcher the minor differences for getChatzosBaalHatanya is due to rounding and are really irrelevant. They will only confuse. Please also update the minor conflict (due to a recent change that I introduced - sorry).
Thanks

* JavaScript / TypeScript - https://github.com/BehindTheMath/KosherZmanim
* Ruby - https://github.com/pinnymz/ruby-zmanim
* Scala - https://github.com/nafg/jewish-date
* C - https://github.com/yparitcher/libzmanim
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yparitcher very cool and thanks. I will hopefully merge this later.

@yparitcher
Copy link
Copy Markdown
Contributor Author

fixed

Copy link
Copy Markdown
Owner

@KosherJava KosherJava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @yparitcher for this work that will be appreciated by many users. A special thanks for porting this to C as well.

@KosherJava KosherJava merged commit fb1d64c into KosherJava:master Jun 19, 2018
BehindTheMath added a commit to BehindTheMath/KosherZmanim that referenced this pull request Sep 22, 2019
Adjusts for edge cases where the location crosses the antimeridian
to the east (and the theoretical cross to the west).

Mirrors KosherJava/zmanim#127
BehindTheMath added a commit to BehindTheMath/KosherZmanim that referenced this pull request Sep 22, 2019
Removed getChatzosBaalHatanya()

Mirrors KosherJava/zmanim#127
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants