From 934f63116f220ab02552d464ed67786ec0669946 Mon Sep 17 00:00:00 2001 From: Ely Date: Thu, 11 Jan 2024 00:15:20 -0700 Subject: [PATCH] add methods for 13.5 minute tzait and plag hamincha based on that zman --- .../zmanim/ComplexZmanimCalendar.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/main/java/com/kosherjava/zmanim/ComplexZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComplexZmanimCalendar.java index 1adca8f2..3e0d6605 100644 --- a/src/main/java/com/kosherjava/zmanim/ComplexZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComplexZmanimCalendar.java @@ -2597,6 +2597,22 @@ public Date getBainHashmashosYereim2Point1Degrees() { public Date getBainHasmashosYereim2Point1Degrees() { return getBainHashmashosYereim2Point1Degrees(); } + + /** + * This method returns the time for tzait hacochavim (nightfall) calculated according to the opinion of the + * Geonim. This is calculated as 13.5 zmaniyot minutes after elevated sunset. This is a very early zman, and it + * should not be used without halachic guidance! It certainly should not be used for ending Shabbat, even unintentionally! + * + * @return the Date of the time of tzais. If the calculation can't be computed such as + * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where + * the sun may not reach low enough below the horizon for this calculation, a null will be + * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. + */ + private Date getTzaisGeonim13AndAHalfMinutesZmanis() { + long shaahZmanit = getTemporalHour(getElevationAdjustedSunrise(), getElevationAdjustedSunset()); + long dakahZmanit = shaahZmanit / 60; + return getTimeOffset(getElevationAdjustedSunset(),(13 * dakahZmanit) + (dakahZmanit / 2)); + } /** * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the @@ -3086,6 +3102,25 @@ public Date getPlagHaminchaAteretTorah() { return getPlagHamincha(getAlos72Zmanis(), getTzaisAteretTorah(), false); } + /** + * This method returns the time of plag hamincha based on the calculation of the Yalkut Yosef, that the + * day starts {@link #getSunrise() at sunrise} and is calculated as ending at {@link #getSunset() sunset}. + * shaos zmaniyos are calculated based on this day and + * removed from {@link #getTzaisGeonim13AndAHalfMinutesZmanis() tzais} to reach this time. This time is 1.25 + * {@link #getShaahZmanisGra() shaos zmaniyos} (temporal hours) before {@link #getTzaisGeonim13AndAHalfMinutesZmanis() tzais} + * + * @return the Date of the plag. If the calculation can't be computed such as in the Arctic Circle + * where there is at least one day a year 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. + * @see #getTzaisGeonim13AndAHalfMinutesZmanis() + * @see #getShaahZmanisGra() + */ + public Date getPlagHaminchaYalkutYosef() { + long shaahZmanit = getTemporalHour(getElevationAdjustedSunrise(), getElevationAdjustedSunset()); + long dakahZmanit = shaahZmanit / 60; + return getTimeOffset(getTzaisGeonim13AndAHalfMinutesZmanis(), -(shaahZmanit + (15 * dakahZmanit))); + } + /** * Method to return tzais (dusk) calculated as 72 minutes zmaniyos, or 1/10th of the day after * {@link #getSeaLevelSunset() sea level sunset}. This is the way that the