diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java
index 3297ea82..bb303d36 100644
--- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java
+++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java
@@ -110,12 +110,12 @@ public class AstronomicalCalendar implements Cloneable {
private AstronomicalCalculator astronomicalCalculator;
/**
- * The method returns an Instant representing the {@link AstronomicalCalculator getElevationAdjustment(double)
- * elevation adjusted} sunrise time. The zenith used for the calculation uses {@link GEOMETRIC_ZENITH geometric zenith} of
- * 90° plus {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the {@link
- * AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction and 16 archminutes
- * for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}. See documentation for the
- * specific implementation of the {@link AstronomicalCalculator} that you are using.
+ * The getSunrise method returns a Instant representing the {@link AstronomicalCalculator
+ * #getElevationAdjustment(double) elevation adjusted} sunrise time. The zenith used for the calculation uses {@link
+ * GEOMETRIC_ZENITH geometric zenith} of 90° plus {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is
+ * adjusted by the {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of
+ * refraction and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}.
+ * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using.
*
* @return the Instant representing the exact sunrise time. 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
@@ -124,14 +124,14 @@ public class AstronomicalCalendar implements Cloneable {
* @see getSeaLevelSunrise()
* @see getUTCSunrise(double)
*/
- public Instant getSunrise() {
- double sunrise = getUTCSunrise(GEOMETRIC_ZENITH);
- if (Double.isNaN(sunrise)) {
+ public Instant getSunrise() {
+ double sunrise = getUTCSunrise(GEOMETRIC_ZENITH);
+ if (Double.isNaN(sunrise)) {
return null;
} else {
return getInstantFromTime(sunrise, SolarEvent.SUNRISE);
}
- }
+ }
/**
* A method that returns the sunrise without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation
@@ -187,14 +187,15 @@ public Instant getBeginNauticalTwilight() {
public Instant getBeginAstronomicalTwilight() {
return getSunriseOffsetByDegrees(ASTRONOMICAL_ZENITH);
}
-
+
/**
- * The method returns an Instant representing the {@link AstronomicalCalculator#getElevationAdjustment(double)
- * elevation adjusted} sunset time. The zenith used for the calculation uses {@link GEOMETRIC_ZENITH geometric zenith} of
- * 90° plus {@link AstronomicalCalculator #getElevationAdjustment(double)}. This is adjusted by the {@link
- * AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction and 16 archminutes
- * for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith(double, double) 90.83333°}. See
- * documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using.
+ * The getSunset method returns an Instant representing the
+ * {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunset time. The zenith used for the
+ * calculation uses {@link GEOMETRIC_ZENITH geometric zenith} of 90° plus {@link AstronomicalCalculator
+ * #getElevationAdjustment(double)}. This is adjusted by the {@link AstronomicalCalculator} to add approximately 50/60 of a
+ * degree to account for 34 archminutes of refraction and 16 archminutes for the sun's radius for a total of {@link
+ * AstronomicalCalculator#adjustZenith(double, double) 90.83333°}. See documentation for the specific implementation of the
+ * {@link AstronomicalCalculator} that you are using.
* Note: In certain cases the calculates sunset will occur before sunrise. This will typically happen when a time zone other than
* the local timezone is used (calculating Los Angeles sunset using a GMT time zone for example). In this case the sunset date
* will be incremented to the following date.
@@ -206,15 +207,15 @@ public Instant getBeginAstronomicalTwilight() {
* @see getSeaLevelSunset()
* @see getUTCSunset(double)
*/
- public Instant getSunset() {
- double sunset = getUTCSunset(GEOMETRIC_ZENITH);
- if (Double.isNaN(sunset)) {
- return null;
- } else {
- return getInstantFromTime(sunset, SolarEvent.SUNSET);
- }
- }
-
+ public Instant getSunset() {
+ double sunset = getUTCSunset(GEOMETRIC_ZENITH);
+ if (Double.isNaN(sunset)) {
+ return null;
+ } else {
+ return getInstantFromTime(sunset, SolarEvent.SUNSET);
+ }
+ }
+
/**
* A method that returns the sunset without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjustment}.
* Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light, something that is not
diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java
index 72f4f72d..0b7722d4 100644
--- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java
+++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java
@@ -30,7 +30,7 @@
* API. The real power of this API is the ease in calculating zmanim that are not part of the library. The methods for
* zmanim calculations not present in this class or it's superclass {@link ZmanimCalendar} are contained in the
* {@link AstronomicalCalendar}, the base class of the calendars in our API since they are generic methods for calculating
- * time based on degrees or time before or after {@link getSunrise() sunrise} and {@link getSunset()
+ * time based on degrees or time before or after {@link getSunset() sunrise} and {@link getSunset()
* sunset} and are of interest for calculation beyond zmanim calculations. Here are some examples.
*
First create the Calendar for the location you would like to calculate:
*
@@ -422,11 +422,11 @@ public long getShaahZmanis60Minutes() {
/**
* Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being
- * {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunrise() sunrise}. This calculation
+ * {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunset() sunrise}. This calculation
* divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation
* is 72 minutes zmaniyos before sunrise and dusk is 72 minutes zmaniyos after sunset. This day
* is split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/10th of the day
- * from {@link getSunrise() sunrise} to {@link getSunset() sunset}.
+ * from {@link getSunset() sunrise} to {@link getSunset() sunset}.
*
* @return the long millisecond length of a shaah zmanis. 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
@@ -457,10 +457,10 @@ public long getShaahZmanis90Minutes() {
/**
* Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link
- * getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunrise() sunrise}. This calculation divides
+ * getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunset() sunrise}. This calculation divides
* the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes
* zmaniyos before sunrise and dusk is 90 minutes zmaniyos after sunset. This day is split into 12 equal
- * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link getSunrise() sunrise}
+ * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link getSunset() sunrise}
* to {@link getSunset() sunset}.
*
* @return the long millisecond length of a shaah zmanis. If the calculation can't be computed
@@ -477,11 +477,11 @@ public long getShaahZmanis90MinutesZmanis() {
/**
* Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link
- * getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunrise() sunrise}. This calculation divides
+ * getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunset() sunrise}. This calculation divides
* the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes
* zmaniyos before sunrise and dusk is 96 minutes zmaniyos after sunset. This day is split into 12 equal
* parts with each part being a shaah zmanis. This is identical to 1/7.5th of the day from {@link
- * getSunrise() sunrise} to {@link getSunset() sunset}.
+ * getSunset() sunrise} to {@link getSunset() sunset}.
*
* @return the long millisecond length of a shaah zmanis. 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
@@ -498,7 +498,7 @@ public long getShaahZmanis96MinutesZmanis() {
* Method to return a shaah zmanis (temporal hour) according to the opinion of the
* Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculated with alos being 1/10th
* of sunrise to sunset day, or {@link getAlos72Zmanis() 72} minutes zmaniyos of such a day before
- * {@link getSunrise() sunrise}, and tzais is usually calculated as {@link getTzaisAteretTorah() 40
+ * {@link getSunset() sunrise}, and tzais is usually calculated as {@link getTzaisAteretTorah() 40
* minutes} (configurable to any offset via {@link setAteretTorahSunsetOffset(double)}) after {@link getSunset()
* sunset}. This day is split into 12 equal parts with each part being a shaah zmanis. Note that with this
* system, chatzos (midday) will not be the point that the sun is {@link getSunTransit() halfway across
@@ -600,11 +600,11 @@ public long getShaahZmanis120Minutes() {
/**
* Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link
- * getAlos120Zmanis() 120} minutes zmaniyos before {@link getSunrise() sunrise}. This calculation divides
+ * getAlos120Zmanis() 120} minutes zmaniyos before {@link getSunset() sunrise}. This calculation divides
* the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 120 minutes
* zmaniyos before sunrise and dusk is 120 minutes zmaniyos after sunset. This day is split into 12 equal
* parts with each part being a shaah zmanis. This is identical to 1/6th of the day from {@link
- * getSunrise() sunrise} to {@link getSunset() sunset}. Since zmanim that use this method are
+ * getSunset() sunrise} to {@link getSunset() sunset}. Since zmanim that use this method are
* extremely late or early and at a point when the sky is a long time past the 18° point where the darkest point is reached,
* zmanim that use this should only be used lechumra such as delaying the start of nighttime mitzvos.
*
@@ -673,7 +673,7 @@ public Instant getPlagHamincha120Minutes() {
}
/**
- * Method to return alos (dawn) calculated as 60 minutes before {@link getSunrise() sunrise} or
+ * Method to return alos (dawn) calculated as 60 minutes before {@link getSunset() sunrise} or
* {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting). This is the
* time to walk the distance of 4 mil at 15 minutes a mil. This seems to be the opinion of the mil so the time for 4 mil is
* 72 minutes which is 1/10th of a day (12 * 60 = 720) based on the day being from {@link getSeaLevelSunrise() sea
- * level sunrise} to {@link getSeaLevelSunset() sea level sunset} or {@link getSunrise() sunrise} to {@link
+ * level sunrise} to {@link getSeaLevelSunset() sea level sunset} or {@link getSunset() sunrise} to {@link
* getSunset() sunset} (depending on the {@link isUseElevation()} setting). The actual calculation is {@link
- * getSunrise()} - ({@link getShaahZmanisGRA()} * 1.2). This calculation is used in the calendars
+ * getSunriseBasedOnElevationSetting()} - ({@link getShaahZmanisGRA()} * 1.2). This calculation is used in the calendars
* published by the Hisachdus Harabanim D'Artzos Habris
* Ve'Canada.
*
@@ -727,7 +727,7 @@ public Instant getAlos72Zmanis() {
}
/**
- * Method to return alos (dawn) calculated using 96 minutes before {@link getSunrise() sunrise} or
+ * Method to return alos (dawn) calculated using 96 minutes before {@link getSunset() sunrise} or
* {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting) that is based
* on the time to walk the distance of 4 mil at 24 minutes a mil.
@@ -742,18 +742,18 @@ public Instant getAlos72Zmanis() {
* documentation.
*/
public Instant getAlos96Minutes() {
- return getTimeOffset(getSunrise(), -96 * MINUTE_MILLIS);
+ return getTimeOffset(getSunriseBasedOnElevationSetting(), -96 * MINUTE_MILLIS);
}
/**
* Method to return alos (dawn) calculated using 90 minutes zmaniyos or 1/8th of the day before
- * {@link getSunrise() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link
+ * {@link getSunset() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link
* isUseElevation()} setting). This is based on a 22.5-minute mil so the time for 4 mil is 90 minutes
* which is 1/8th of a day (12 * 60) / 8 = 90. The day is calculated from {@link getSeaLevelSunrise() sea level sunrise}
- * to {@link getSeaLevelSunset() sea level sunset} or {@link getSunrise() sunrise} to {@link
+ * to {@link getSeaLevelSunset() sea level sunset} or {@link getSunset() sunrise} to {@link
* getSunset() sunset} (depending on the {@link isUseElevation()}. The actual calculation used is
- * {@link getSunrise()} - ({@link getShaahZmanisGRA()} * 1.5).
+ * {@link getSunriseBasedOnElevationSetting()} - ({@link getShaahZmanisGRA()} * 1.5).
*
* @return the Instant representing the time. 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,
@@ -767,13 +767,13 @@ public Instant getAlos90Zmanis() {
/**
* This method returns alos (dawn) calculated using 96 minutes zmaniyos or 1/7.5th of the day before
- * {@link getSunrise() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link
+ * {@link getSunset() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link
* isUseElevation()} setting). This is based on a 24-minute mil so the time for 4 mil is 96 minutes
* which is 1/7.5th of a day (12 * 60 / 7.5 = 96). The day is calculated from {@link getSeaLevelSunrise() sea level sunrise}
- * to {@link getSeaLevelSunset() sea level sunset} or {@link getSunrise() sunrise} to {@link
+ * to {@link getSeaLevelSunset() sea level sunset} or {@link getSunset() sunrise} to {@link
* getSunset() sunset} (depending on the {@link isUseElevation()}. The actual calculation used is {@link
- * getSunrise()} - ({@link getShaahZmanisGRA()} * 1.6).
+ * getSunriseBasedOnElevationSetting()} - ({@link getShaahZmanisGRA()} * 1.6).
*
* @return the Instant representing the time. 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,
@@ -786,7 +786,7 @@ public Instant getAlos96Zmanis() {
}
/**
- * Method to return alos (dawn) calculated using 90 minutes before {@link getSunrise() sunrise} or
+ * Method to return alos (dawn) calculated using 90 minutes before {@link getSunset() sunrise} or
* {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting) based on the time
* to walk the distance of 4 mil at
* 22.5 minutes a mil. Time-based offset calculations for alos are based on the opinion of the lechumra only and returns alos (dawn) calculated using 120 minutes
- * before {@link getSunrise() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the
+ * before {@link getSunset() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the
* {@link isUseElevation()} setting) based on the time to walk the distance of 5 mil (Ula) at 24 minutes a
* mil. Time based offset calculations for alos are based on the* opinion of the lechumra only and method returns alos (dawn) calculated using
- * 120 minutes zmaniyos or 1/6th of the day before {@link getSunrise() sunrise} or {@link
+ * 120 minutes zmaniyos or 1/6th of the day before {@link getSunset() sunrise} or {@link
* getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting). This is based
* on a 24-minute mil so
* the time for 5 mil is 120 minutes which is 1/6th of a day (12 * 60 / 6 = 120). The day is calculated from
* {@link getSeaLevelSunrise() sea level sunrise} to {@link getSeaLevelSunset() sea level sunset} or {@link
- * getSunrise() sunrise} to {@link getSunset() sunset} (depending on the {@link
- * isUseElevation()}. The actual calculation used is {@link getSunrise()} - ({@link getShaahZmanisGRA()}
+ * getSunset() sunrise} to {@link getSunset() sunset} (depending on the {@link
+ * isUseElevation()}. The actual calculation used is {@link getSunset()} - ({@link getShaahZmanisGRA()}
* * 2). Since this time is extremely early, it should only be used lechumra, such as not eating after this time
* on a fast day, and not as the start time for mitzvos that can only be performed during the day.
*
@@ -944,7 +944,7 @@ public Instant getAlos19Point8Degrees() {
/**
* This method returns misheyakir based on the position of the sun {@link ZENITH_12_POINT_85 12.85°}
* below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This is based on the position of the sun slightly
- * later than 57 minutes before {@link getSunrise() sunrise} in Jerusalem around the equinox / equilux. This
* zman is mentioned for use bish'as hadchak in the Birur Halacha Tinyana and misheyakir based on the position of the sun when it is {@link ZENITH_11_DEGREES
* 11.5°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating
* misheyakir according to some opinions. This calculation is based on the position of the sun 52 minutes
- * before {@link getSunrise() sunrise} in Jerusalem around the equinox / equilux,
* which calculates to 11.5° below {@link GEOMETRIC_ZENITH geometric zenith}.
* @todo recalculate.
@@ -1008,7 +1008,7 @@ public Instant getMisheyakir11Point5Degrees() {
* This method returns misheyakir based on the position of the sun when it is {@link ZENITH_11_DEGREES
* 11°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating
* misheyakir according to some opinions. This calculation is based on the position of the sun 48 minutes
- * before {@link getSunrise() sunrise} in Jerusalem around the equinox / equilux,
* which calculates to 11° below {@link GEOMETRIC_ZENITH geometric zenith}.
*
@@ -1026,7 +1026,7 @@ public Instant getMisheyakir11Degrees() {
* This method returns misheyakir based on the position of the sun when it is {@link ZENITH_10_POINT_2
* 10.2°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating
* misheyakir according to some opinions. This calculation is based on the position of the sun 45 minutes
- * before {@link getSunrise() sunrise} in Jerusalem around the equinox which calculates
* to 10.2° below {@link GEOMETRIC_ZENITH geometric zenith}.
*
@@ -1104,7 +1104,7 @@ public Instant getMisheyakir9Point5Degrees() {
/**
* This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
* opinion of the Magen Avraham (MGA) based on
- * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunrise() sunrise}. This
+ * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunset() sunrise}. This
* time is 3 {@link getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link
* getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall
* with both being 19.8° below sunrise or sunset. This returns the time of 3 *
@@ -1124,7 +1124,7 @@ public Instant getSofZmanShmaMGA19Point8Degrees() {
/**
* This method returns the latest zman krias shema (time to recite Shema in the morning) according to the opinion of
* the Magen Avraham (MGA) based on alos being {@link
- * getAlos16Point1Degrees() 16.1°} before {@link getSunrise() sunrise}. This time is 3 {@link
+ * getAlos16Point1Degrees() 16.1°} before {@link getSunset() sunrise}. This time is 3 {@link
* getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link getAlos16Point1Degrees() dawn} based on
* the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° below sunrise or sunset.
* This returns the time of 3 * {@link getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() dawn}.
@@ -1143,7 +1143,7 @@ public Instant getSofZmanShmaMGA16Point1Degrees() {
/**
* This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
* opinion of the Magen Avraham (MGA) based
- * on alos being {@link getAlos18Degrees() 18°} before {@link getSunrise() sunrise}. This time is 3
+ * on alos being {@link getAlos18Degrees() 18°} before {@link getSunset() sunrise}. This time is 3
* {@link getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link getAlos18Degrees() dawn}
* based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°
* below sunrise or sunset. This returns the time of 3 * {@link getShaahZmanis18Degrees()} after
@@ -1164,7 +1164,7 @@ public Instant getSofZmanShmaMGA18Degrees() {
* This method returns the latest zman krias shema (time to recite Shema in the morning) according
* to the opinion of the Magen Avraham (MGA) based
* on alos being {@link getAlos72Zmanis() 72} minutes zmaniyos, or 1/10th of the day before
- * {@link getSunrise() sunrise}. This time is 3 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos}
+ * {@link getSunset() sunrise}. This time is 3 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos}
* (solar hours) after {@link getAlos72Zmanis() dawn} based on the opinion of the MGA that the day is calculated
* from a {@link getAlos72Zmanis() dawn} of 72 minutes zmaniyos, or 1/10th of the day before
* {@link getSeaLevelSunrise() sea level sunrise} to {@link getTzais72Zmanis() nightfall} of 72 minutes
@@ -1186,7 +1186,7 @@ public Instant getSofZmanShmaMGA72MinutesZmanis() {
/**
* This method returns the latest zman krias shema (time to recite Shema in the morning) according
* to the opinion of the Magen Avraham (MGA) based on
- * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunrise() sunrise}. This time is 3
+ * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunset() sunrise}. This time is 3
* {@link getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link getAlos90Minutes() dawn} based on
* the opinion of the MGA that the day is calculated from a {@link getAlos90Minutes() dawn} of 90 minutes before sunrise to
* {@link getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 3 *
@@ -1207,7 +1207,7 @@ public Instant getSofZmanShmaMGA90Minutes() {
/**
* This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
* opinion of the Magen Avraham (MGA) based
- * on alos being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunrise()
+ * on alos being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunset()
* sunrise}. This time is 3 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after
* {@link getAlos90Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link
* getAlos90Zmanis() dawn} of 90 minutes zmaniyos before sunrise to {@link getTzais90Zmanis() nightfall}
@@ -1229,7 +1229,7 @@ public Instant getSofZmanShmaMGA90MinutesZmanis() {
/**
* This method returns the latest zman krias shema (time to recite Shema in the morning) according to the opinion of
* the Magen Avraham (MGA) based on alos being {@link
- * getAlos96Minutes() 96} minutes before {@link getSunrise() sunrise}. This time is 3 {@link
+ * getAlos96Minutes() 96} minutes before {@link getSunset() sunrise}. This time is 3 {@link
* getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link getAlos96Minutes() dawn} based on the opinion
* of the MGA that the day is calculated from a {@link getAlos96Minutes() dawn} of 96 minutes before sunrise to {@link
* getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link getShaahZmanis96Minutes()}
@@ -1250,7 +1250,7 @@ public Instant getSofZmanShmaMGA96Minutes() {
/**
* This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
* opinion of the Magen Avraham (MGA) based
- * on alos being {@link getAlos90Zmanis() 96} minutes zmaniyos before {@link getSunrise()
+ * on alos being {@link getAlos90Zmanis() 96} minutes zmaniyos before {@link getSunset()
* sunrise}. This time is 3 {@link getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after
* {@link getAlos96Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link
* getAlos96Zmanis() dawn} of 96 minutes zmaniyos before sunrise to {@link getTzais90Zmanis() nightfall}
@@ -1301,7 +1301,7 @@ public Instant getSofZmanShma3HoursBeforeChatzos() {
/**
* This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
* opinion of the Magen Avraham (MGA) based
- * on alos being {@link getAlos120Minutes() 120} minutes or 1/6th of the day before {@link getSunrise()
+ * on alos being {@link getAlos120Minutes() 120} minutes or 1/6th of the day before {@link getSunset()
* sunrise}. This time is 3 {@link getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link
* getAlos120Minutes() dawn} based on the opinion of the MGA that the day is calculated from a {@link getAlos120Minutes() dawn}
* of 120 minutes before sunrise to {@link getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of
@@ -1343,7 +1343,7 @@ public Instant getSofZmanShmaMGA120Minutes() {
* @see getSeaLevelSunset()
*/
public Instant getSofZmanShmaAlos16Point1ToSunset() {
- return getSofZmanShma(getAlos16Point1Degrees(), getSunset(), false);
+ return getSofZmanShma(getAlos16Point1Degrees(), getSunsetBasedOnElevationSetting(), false);
}
/**
@@ -1372,7 +1372,7 @@ public Instant getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees() {
/**
* This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
* of the Magen Avraham (MGA) based on
- * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunrise() sunrise}. This time
+ * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunset() sunrise}. This time
* is 4 {@link getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link
* getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to
* nightfall with both being 19.8° below sunrise or sunset. This returns the time of 4 * {@link
@@ -1394,7 +1394,7 @@ public Instant getSofZmanTfilaMGA19Point8Degrees() {
/**
* This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
* of the Magen Avraham (MGA) based on
- * alos being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunrise() sunrise}. This time
+ * alos being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunset() sunrise}. This time
* is 4 {@link getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link
* getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to
* nightfall with both being 16.1° below sunrise or sunset. This returns the time of 4 * {@link
@@ -1415,7 +1415,7 @@ public Instant getSofZmanTfilaMGA16Point1Degrees() {
/**
* This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
* of the Magen Avraham (MGA) based on
- * alos being {@link getAlos18Degrees() 18°} before {@link getSunrise() sunrise}. This time is 4
+ * alos being {@link getAlos18Degrees() 18°} before {@link getSunset() sunrise}. This time is 4
* {@link getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link getAlos18Degrees() dawn}
* based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°
* below sunrise or sunset. This returns the time of 4 * {@link getShaahZmanis18Degrees()} after
@@ -1436,7 +1436,7 @@ public Instant getSofZmanTfilaMGA18Degrees() {
/**
* This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the
* Magen Avraham (MGA) based on alos
- * being {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunrise() sunrise}. This time is 4
+ * being {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunset() sunrise}. This time is 4
* {@link getShaahZmanis72MinutesZmanis() shaos zmaniyos} (solar hours) after {@link getAlos72Zmanis() dawn}
* based on the opinion of the MGA that the day is calculated from a {@link getAlos72Zmanis() dawn} of 72
* minutes zmaniyos before sunrise to {@link getTzais72Zmanis() nightfall} of 72 minutes zmaniyos
@@ -1456,7 +1456,7 @@ public Instant getSofZmanTfilaMGA72MinutesZmanis() {
/**
* This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
* of the Magen Avraham (MGA) based on
- * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunrise() sunrise}. This time is 4
+ * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunset() sunrise}. This time is 4
* {@link getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link getAlos90Minutes() dawn} based on
* the opinion of the MGA that the day is calculated from a {@link getAlos90Minutes() dawn} of 90 minutes before sunrise to
* {@link getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 4 *
@@ -1476,7 +1476,7 @@ public Instant getSofZmanTfilaMGA90Minutes() {
/**
* This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the
* Magen Avraham (MGA) based on alos
- * being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunrise() sunrise}. This time is
+ * being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunset() sunrise}. This time is
* 4 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after {@link getAlos90Zmanis()
* dawn} based on the opinion of the MGA that the day is calculated from a {@link getAlos90Zmanis() dawn}
* of 90 minutes zmaniyos before sunrise to {@link getTzais90Zmanis() nightfall} of 90 minutes
@@ -1497,7 +1497,7 @@ public Instant getSofZmanTfilaMGA90MinutesZmanis() {
/**
* This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
* of the Magen Avraham (MGA) based on
- * alos being {@link getAlos96Minutes() 96} minutes before {@link getSunrise() sunrise}. This time is 4
+ * alos being {@link getAlos96Minutes() 96} minutes before {@link getSunset() sunrise}. This time is 4
* {@link getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link getAlos96Minutes() dawn} based on
* the opinion of the MGA that the day is calculated from a {@link getAlos96Minutes() dawn} of 96 minutes before
* sunrise to {@link getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 4 *
@@ -1517,7 +1517,7 @@ public Instant getSofZmanTfilaMGA96Minutes() {
/**
* This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the
* Magen Avraham (MGA) based on alos
- * being {@link getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunrise() sunrise}. This time is
+ * being {@link getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunset() sunrise}. This time is
* 4 {@link getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after {@link getAlos96Zmanis()
* dawn} based on the opinion of the MGA that the day is calculated from a {@link getAlos96Zmanis() dawn}
* of 96 minutes zmaniyos before sunrise to {@link getTzais96Zmanis() nightfall} of 96 minutes
@@ -1538,7 +1538,7 @@ public Instant getSofZmanTfilaMGA96MinutesZmanis() {
/**
* This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
* of the Magen Avraham (MGA) based on
- * alos being {@link getAlos120Minutes() 120} minutes before {@link getSunrise() sunrise} . This time is 4
+ * alos being {@link getAlos120Minutes() 120} minutes before {@link getSunset() sunrise} . This time is 4
* {@link getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link getAlos120Minutes() dawn}
* based on the opinion of the MGA that the day is calculated from a {@link getAlos120Minutes() dawn} of 120
* minutes before sunrise to {@link getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of
@@ -2055,7 +2055,7 @@ public Instant getPlagHamincha18Degrees() {
*/
@Deprecated (forRemoval=false)
public Instant getPlagAlosToSunset() {
- return getPlagHamincha(getAlos16Point1Degrees(), getSunset(), false);
+ return getPlagHamincha(getAlos16Point1Degrees(), getSunsetBasedOnElevationSetting(), false);
}
/**
@@ -2141,7 +2141,7 @@ public Instant getBainHashmashosRT13Point24Degrees() {
*
*/
public Instant getBainHashmashosRT58Point5Minutes() {
- return getTimeOffset(getSunset(), 58.5 * MINUTE_MILLIS);
+ return getTimeOffset(getSunsetBasedOnElevationSetting(), 58.5 * MINUTE_MILLIS);
}
/**
@@ -2174,11 +2174,11 @@ public Instant getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() {
*/
public Instant getBainHashmashosRT2Stars() {
Instant alos19Point8 = getAlos19Point8Degrees();
- Instant sunrise = getSunrise();
+ Instant sunrise = getSunriseBasedOnElevationSetting();
if (alos19Point8 == null || sunrise == null) {
return null;
}
- return getTimeOffset(getSunset(), (sunrise.toEpochMilli() - alos19Point8.toEpochMilli()) * (5 / 18d));
+ return getTimeOffset(getSunsetBasedOnElevationSetting(), (sunrise.toEpochMilli() - alos19Point8.toEpochMilli()) * (5 / 18d));
}
/**
@@ -2195,7 +2195,7 @@ public Instant getBainHashmashosRT2Stars() {
* @see getBainHashmashosYereim3Point05Degrees()
*/
public Instant getBainHashmashosYereim18Minutes() {
- return getTimeOffset(getSunset(), -18 * MINUTE_MILLIS);
+ return getTimeOffset(getSunsetBasedOnElevationSetting(), -18 * MINUTE_MILLIS);
}
/**
@@ -2248,7 +2248,7 @@ public Instant getBainHashmashosYereim3Point05Degrees() {
* @see getBainHashmashosYereim2Point8Degrees()
*/
public Instant getBainHashmashosYereim16Point875Minutes() {
- return getTimeOffset(getSunset(), -16.875 * MINUTE_MILLIS);
+ return getTimeOffset(getSunsetBasedOnElevationSetting(), -16.875 * MINUTE_MILLIS);
}
/**
@@ -2291,7 +2291,7 @@ public Instant getBainHashmashosYereim2Point8Degrees() {
* @see getBainHashmashosYereim2Point1Degrees()
*/
public Instant getBainHashmashosYereim13Point5Minutes() {
- return getTimeOffset(getSunset(), -13.5 * MINUTE_MILLIS);
+ return getTimeOffset(getSunsetBasedOnElevationSetting(), -13.5 * MINUTE_MILLIS);
}
/**
@@ -2596,7 +2596,7 @@ public Instant getTzaisGeonim9Point75Degrees() {
* @see getShaahZmanis60Minutes()
*/
public Instant getTzais60Minutes() {
- return getTimeOffset(getSunset(), 60 * MINUTE_MILLIS);
+ return getTimeOffset(getSunsetBasedOnElevationSetting(), 60 * MINUTE_MILLIS);
}
/**
@@ -2616,7 +2616,7 @@ public Instant getTzais60Minutes() {
* @see setAteretTorahSunsetOffset(double)
*/
public Instant getTzaisAteretTorah() {
- return getTimeOffset(getSunset(), getAteretTorahSunsetOffset() * MINUTE_MILLIS);
+ return getTimeOffset(getSunsetBasedOnElevationSetting(), getAteretTorahSunsetOffset() * MINUTE_MILLIS);
}
/**
@@ -2836,7 +2836,7 @@ public Instant getTzais96Zmanis() {
* @see getAlos90Minutes()
*/
public Instant getTzais90Minutes() {
- return getTimeOffset(getSunset(), 90 * MINUTE_MILLIS);
+ return getTimeOffset(getSunsetBasedOnElevationSetting(), 90 * MINUTE_MILLIS);
}
/**
@@ -2863,7 +2863,7 @@ public Instant getTzais90Minutes() {
*/
@Deprecated (forRemoval=false)
public Instant getTzais120Minutes() {
- return getTimeOffset(getSunset(), 120 * MINUTE_MILLIS);
+ return getTimeOffset(getSunsetBasedOnElevationSetting(), 120 * MINUTE_MILLIS);
}
/**
@@ -2976,7 +2976,7 @@ public Instant getTzais19Point8Degrees() {
* @see getAlos96Minutes()
*/
public Instant getTzais96Minutes() {
- return getTimeOffset(getSunset(), 96 * MINUTE_MILLIS);
+ return getTimeOffset(getSunsetBasedOnElevationSetting(), 96 * MINUTE_MILLIS);
}
/**
@@ -3326,13 +3326,13 @@ public Instant getTchilasZmanKidushLevana7Days() {
* @see getSofZmanAchilasChametz(Instant, Instant, boolean)
*/
public Instant getSofZmanAchilasChametzGRA() {
- return getSofZmanAchilasChametz(getSunrise(), getSunset(), true);
+ return getSofZmanAchilasChametz(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true);
}
/**
* This method returns the latest time one is allowed eating chametz on Erev Pesach according to the
* opinion of the Magen Avraham (MGA) based on alos
- * being {@link getAlos72Minutes() 72} minutes before {@link getSunrise() sunrise}. This time is identical to the
+ * being {@link getAlos72Minutes() 72} minutes before {@link getSunset() sunrise}. This time is identical to the
* {@link getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link
* getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link getAlos72Minutes() dawn} based on the
* opinion of the MGA that the day is calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link
@@ -3355,7 +3355,7 @@ public Instant getSofZmanAchilasChametzMGA72Minutes() {
/**
* This method returns the latest time one is allowed eating chametz on Erev Pesach according to the opinion
* of the Magen Avraham (MGA) based on alos being {@link
- * getAlos72Zmanis() 72 zmaniyos} minutes before {@link getSunrise() sunrise}. This time is identical to the
+ * getAlos72Zmanis() 72 zmaniyos} minutes before {@link getSunset() sunrise}. This time is identical to the
* {@link getSofZmanTfilaMGA72MinutesZmanis() Sof zman tfilah MGA 72 minutes zmanis}. This time is 4 {@link
* getShaahZmanis72MinutesZmanis() shaos zmaniyos} (temporal hours) after {@link getAlos72Minutes() dawn} based on the
* opinion of the MGA that the day is calculated from a {@link getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to
@@ -3379,7 +3379,7 @@ public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() {
/**
* This method returns the latest time one is allowed eating chametz on Erev Pesach according to the
* opinion of the Magen Avraham (MGA) based on alos
- * being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunrise() sunrise}. This time is 4 {@link
+ * being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunset() sunrise}. This time is 4 {@link
* getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link getAlos16Point1Degrees() dawn} based
* on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° below sunrise or
* sunset. This returns the time of 4 {@link getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() dawn}.
@@ -3412,13 +3412,13 @@ public Instant getSofZmanAchilasChametzMGA16Point1Degrees() {
* @see getSofZmanBiurChametz(Instant, Instant, boolean)
*/
public Instant getSofZmanBiurChametzGRA() {
- return getSofZmanBiurChametz(getSunrise(), getSunset(), true);
+ return getSofZmanBiurChametz(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true);
}
/**
* This method returns the latest time for burning chametz on Erev Pesach according to the opinion of the
* Magen Avraham (MGA) based on alos being {@link
- * getAlos72Minutes() 72} minutes before {@link getSunrise() sunrise}. This time is 5 {@link
+ * getAlos72Minutes() 72} minutes before {@link getSunset() sunrise}. This time is 5 {@link
* getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link getAlos72Minutes() dawn} based on the
* opinion of the MGA that the day is calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link
* getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link getShaahZmanis72Minutes()}
@@ -3438,7 +3438,7 @@ public Instant getSofZmanBiurChametzMGA72Minutes() {
/**
* This method returns the latest time for burning chametz on Erev Pesach according to the opinion of the
* Magen Avraham (MGA) based on alos being {@link
- * getAlos72Zmanis() 72} minutes zmanis before {@link getSunrise() sunrise}. This time is 5 {@link
+ * getAlos72Zmanis() 72} minutes zmanis before {@link getSunset() sunrise}. This time is 5 {@link
* getShaahZmanis72MinutesZmanis() shaos zmaniyos} (temporal hours) after {@link getAlos72Zmanis() dawn} based on the
* opinion of the MGA that the day is calculated from a {@link getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to
* {@link getTzais72Zmanis() nightfall} of 72 minutes zmanis after sunset. This returns the time of 5 * {@link
@@ -3459,7 +3459,7 @@ public Instant getSofZmanBiurChametzMGA72MinutesZmanis() {
/**
* This method returns the latest time for burning chametz on Erev Pesach according to the opinion
* of the Magen Avraham (MGA) based on alos
- * being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunrise() sunrise}. This time is 5
+ * being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunset() sunrise}. This time is 5
* {@link getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link getAlos16Point1Degrees()
* dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1°
* below sunrise or sunset. This returns the time of 5 {@link getShaahZmanis16Point1Degrees()} after
@@ -3511,7 +3511,7 @@ public long getShaahZmanisBaalHatanya() {
/**
* Returns the Baal Hatanya's alos
* (dawn) calculated as the time when the sun is 16.9° below the eastern {@link GEOMETRIC_ZENITH geometric horizon}
- * before {@link getSunrise() sunrise}. It is based on the calculation that the time between dawn and
+ * before {@link getSunset() sunrise}. It is based on the calculation that the time between dawn and
* netz amiti (sunrise) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes
* a mil (Rambam and others). The sun's position at 72
* minutes before {@link getSunriseBaalHatanya netz amiti (sunrise)} in Jerusalem Rav Moshe Feinstein's opinion of the
* calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the opinion
* of the GRA that the day is calculated from sunrise to sunset, but
- * calculated using the first half of the day only. The half a day starts at {@link getSunrise() sunrise} and
+ * calculated using the first half of the day only. The half a day starts at {@link getSunset() sunrise} and
* ends at {@link getFixedLocalChatzosHayom() fixed local chatzos}. Sof zman Shema is 3 shaos zmaniyos (solar
* hours) after sunrise or half of this half-day.
*
@@ -3781,12 +3781,12 @@ public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() {
* 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.
- * @see getSunrise()
+ * @see getSunset()
* @see getFixedLocalChatzosHayom()
* @see getHalfDayBasedZman(Instant, Instant, double)
*/
public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() {
- return getHalfDayBasedZman(getSunrise(), getFixedLocalChatzosHayom(), 3);
+ return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzosHayom(), 3);
}
/**
@@ -3794,19 +3794,19 @@ public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() {
* calculation of sof zman tfila (zman tfilah (the latest time to recite the morning prayers))
* according to the opinion of the GRA that the day is
* calculated from sunrise to sunset, but calculated using the first half of the day only. The half a day starts at
- * {@link getSunrise() sunrise} and ends at {@link getFixedLocalChatzosHayom() fixed local chatzos}. Sof zman
+ * {@link getSunset() sunrise} and ends at {@link getFixedLocalChatzosHayom() fixed local chatzos}. Sof zman
* tefila is 4 shaos zmaniyos (solar hours) after sunrise or 2/3 of this half-day.
*
* @return the Instant of the latest zman krias shema. 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.
- * @see getSunrise()
+ * @see getSunset()
* @see getFixedLocalChatzosHayom()
* @see getHalfDayBasedZman(Instant, Instant, double)
*/
public Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos() {
- return getHalfDayBasedZman(getSunrise(), getFixedLocalChatzosHayom(), 4);
+ return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzosHayom(), 4);
}
/**
@@ -3846,7 +3846,7 @@ public Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes() {
* @see getHalfDayBasedZman(Instant, Instant, double)
*/
public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() {
- return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunset(), 3.5);
+ return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunsetBasedOnElevationSetting(), 3.5);
}
/**
@@ -3867,7 +3867,7 @@ public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() {
* @see getHalfDayBasedZman(Instant, Instant, double)
*/
public Instant getPlagHaminchaGRAFixedLocalChatzosToSunset() {
- return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunset(), 4.75);
+ return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunsetBasedOnElevationSetting(), 4.75);
}
/**
@@ -3882,17 +3882,17 @@ public Instant getPlagHaminchaGRAFixedLocalChatzosToSunset() {
* documentation.
*/
public Instant getTzais50Minutes() {
- return getTimeOffset(getSunset(), 50 * MINUTE_MILLIS);
+ return getTimeOffset(getSunsetBasedOnElevationSetting(), 50 * MINUTE_MILLIS);
}
/**
* A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before
- * {@link getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of the day, calculated
- * according to the GRA using a day starting at sunrise and ending at
- * sunset. This is the time that eating or other activity can't begin prior to praying mincha. The calculation used
- * is 9 * {@link getShaahZmanisGRA()} after {@link getSunrise() sunrise} or {@link getSunrise() elevation adjusted sunrise}
- * (depending on the {@link isUseElevation()} setting). See the Mechaber and Mishna Berurah 232 and shaos zmaniyos (solar hours) after the start of
+ * the day, calculated according to the GRA using a day starting at
+ * sunrise and ending at sunset. This is the time that eating or other activity can't begin prior to praying mincha.
+ * The calculation used is 9 * {@link getShaahZmanisGRA()} after {@link getSunset() sunrise} or {@link
+ * getSunriseBasedOnElevationSetting() elevation adjusted sunrise} (depending on the {@link isUseElevation()} setting). See the
+ * Mechaber and Mishna Berurah 232 and 249:2.
*
* @see getShaahZmanisGRA()
@@ -3904,7 +3904,7 @@ public Instant getTzais50Minutes() {
* returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
*/
public Instant getSamuchLeMinchaKetanaGRA() {
- return getSamuchLeMinchaKetana(getSunrise(), getSunset(), true);
+ return getSamuchLeMinchaKetana(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true);
}
/**
diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java
index 98dec99a..a78d5f2a 100644
--- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java
+++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java
@@ -252,28 +252,44 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz
/**
* This method will return {@link getSeaLevelSunrise() sea level sunrise} if {@link isUseElevation()} is false (the default),
- * or elevation adjusted {@link getSunrise()} if it is true. This allows relevant zmanim in this and extending classes
- * (such as the {@link ComprehensiveZmanimCalendar}) to automatically adjust to the elevation setting.
+ * or elevation adjusted {@link getSunrise()} if it is true. This allows relevant zmanim in this and
+ * extending classes (such as the {@link ComprehensiveZmanimCalendar}) to automatically adjust to the elevation setting.
+ *
+ * @return {@link getSeaLevelSunrise()} if {@link isUseElevation()} is false (the default), or elevation adjusted
+ * {@link getSunrise()} if it is true.
+ * @see getSunrise()
+ */
+ protected Instant getSunriseBasedOnElevationSetting() {
+ if (isUseElevation()) {
+ return super.getSunrise();
+ }
+ return getSeaLevelSunrise();
+ }
+
+ /**
+ * This method will return {@link getSeaLevelSunrise() sea level sunrise} if {@link isUseElevation()} is false (the default),
+ * or elevation adjusted {@link getSunrise()} if it is true. This allows relevant zmanim
+ * in this and extending classes (such as the {@link ComprehensiveZmanimCalendar}) to automatically adjust to the elevation setting.
*
* @return {@link getSeaLevelSunset()} if {@link isUseElevation()} is false (the default), or elevation adjusted
* {@link getSunset()} if it is true.
* @see getSunset()
*/
- /*protected Instant getSunset() {
+ protected Instant getSunsetBasedOnElevationSetting() {
if (isUseElevation()) {
return super.getSunset();
}
return getSeaLevelSunset();
- }*/
+ }
/**
- * A method that returns tzais (nightfall) when the sun is {@link ZENITH_8_POINT_5 8.5°} below the {@link
- * GEOMETRIC_ZENITH geometric horizon} (90°) after {@link getSunset() sunset}, a time that Rabbi Meir Posen in his the
- * Ohr Meir calculated that 3 small stars are visible, which is
- * later than the required 3 medium stars. This calculation is based on the sun's position below the horizon 36 minutes after
- * {@link getSeaLevelSunrise() sunset} in Jerusalem around the equinox / equilux, which is
- * 8.5° below {@link GEOMETRIC_ZENITH geometric zenith}.
+ * A method that returns tzais (nightfall) when the sun is {@link ZENITH_8_POINT_5 8.5°} below the
+ * {@link GEOMETRIC_ZENITH geometric horizon} (90°) after {@link getSunset() sunset}, a time that Rabbi
+ * Meir Posen in his the Ohr Meir calculated that 3 small
+ * stars are visible, which is later than the required 3 medium stars. This calculation is based on the sun's position below
+ * the horizon 36 minutes after {@link getSeaLevelSunrise() sunset} in Jerusalem around the equinox / equilux, which
+ * is 8.5° below {@link GEOMETRIC_ZENITH geometric zenith}.
*
* @return The Instant of nightfall. 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
@@ -321,24 +337,23 @@ public Instant getAlos16Point1Degrees() {
* documentation.
*/
public Instant getAlos72Minutes() {
- return getTimeOffset(getSunrise(), -72 * MINUTE_MILLIS);
+ return getTimeOffset(getSunriseBasedOnElevationSetting(), -72 * MINUTE_MILLIS);
}
/**
- * This method returns {@link getSunTransit() Astronomical chatzos hayom} if the {@link
- * com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and {@link isUseAstronomicalChatzos()
- * isUseAstronomicalChatzos()} is set to true or the {@link getChatzosHayomAsHalfDay() halfway point between sunrise and
- * sunset} if it does not support it, or it is not configured to use it. There are currently two {@link
- * com.kosherjava.zmanim.util.AstronomicalCalculator calculators} available in the API, the default {@link
+ * This method returns {@link getSunTransit() Astronomical chatzos hayom} if the
+ * {@link com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and
+ * {@link isUseAstronomicalChatzos() isUseAstronomicalChatzos()} is set to true or the {@link getChatzosHayomAsHalfDay()
+ * halfway point between sunrise and sunset} if it does not support it, or it is not configured to use it. There are currently
+ * two {@link com.kosherjava.zmanim.util.AstronomicalCalculator calculators} available in the API, the default {@link
* com.kosherjava.zmanim.util.NOAACalculator NOAA calculator} and the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO
* calculator}. The USNO calculator calculates chatzos as halfway between sunrise and sunset (identical to six shaos
* zmaniyos after sunrise), while the NOAACalculator calculates it more accurately as {@link getSunTransit() astronomical
- * chatzos}. See The Definition of
- * Chatzos for a detailed explanation of the ways to calculate Chatzos. Since half-day chatzos can
- * be null in the Arctic on a day when either sunrise or sunset did not happen and astronomical chatzos can
- * be calculated even in the Arctic, if half-day chatzos calculates as null and astronomical
- * chatzos is supported by the calculator, astronomical chatzos will be returned to avoid returning a
- * null.
+ * chatzos}. See The Definition of Chatzos
+ * for a detailed explanation of the ways to calculate Chatzos. Since half-day chatzos can be null in
+ * the Arctic on a day when either sunrise or sunset did not happen and astronomical chatzos can be calculated even in the
+ * Arctic, if half-day chatzos calculates as null and astronomical chatzos is supported by the
+ * calculator, astronomical chatzos will be returned to avoid returning a null.
*
* @see getSunTransit()
* @see getChatzosHayomAsHalfDay()
@@ -363,11 +378,11 @@ public Instant getChatzosHayom() {
}
/**
- * A method that returns chatzos halayla at the end of the day (the last zman of the day returned by the
- * calendar, that may actually be after midnight of the day it is being calculated for). For example, if calculating it for the
- * date of Erev Pesach, the calculation will be for Lail Pesach to allow you to use the zman as
- * sof zman achilas chametz. {@link getSolarMidnight() Astronomical chatzos halayla} will be returned if the
- * {@link com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and {@link
+ * A method that returns chatzos halayla at the end of the day (the last zman of the day
+ * returned by the calendar, that may actually be after midnight of the day it is being calculated for). For example, if
+ * calculating it for the date of Erev Pesach, the calculation will be for Lail Pesach to allow you to use the
+ * zman as sof zman achilas chametz. {@link getSolarMidnight() Astronomical chatzos halayla} will be
+ * returned if the {@link com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and {@link
* isUseAstronomicalChatzos() isUseAstronomicalChatzos()} is set to true. Otherwise the {@link #getChatzos(Instant,
* Instant) halfway point} between sunset and the following day's sunrise, if it does not support it, or it is not configured to
* use it. There are currently two {@link com.kosherjava.zmanim.util.AstronomicalCalculator calculators} available in the API,
@@ -489,8 +504,8 @@ public Instant getChatzosHayomAsHalfDay() {
* the day. If {@link isUseAstronomicalChatzosForOtherZmanim()} is true, the 3 shaos zmaniyos will be
* based on 1/6 of the time between sunrise and {@link getSunTransit() astronomical chatzos}. As an example, passing
* {@link getSunrise() sunrise} and {@link getSunset() sunset} or {@link getSeaLevelSunrise() sea level
- * sunrise} and {@link getSeaLevelSunset() sea level sunset} to this method (or {@link getSunrise()} and
- * {@link getSunset()} that is driven off the {@link isUseElevation()} setting) will return sof zman
+ * sunrise} and {@link getSeaLevelSunset() sea level sunset} to this method (or {@link getSunriseBasedOnElevationSetting()} and
+ * {@link getSunsetBasedOnElevationSetting()} that is driven off the {@link isUseElevation()} setting) will return sof zman
* krias shema according to the opinion of the GRA. In cases where
* the start and end dates are not synchronous such as in {@link ComprehensiveZmanimCalendar
* #getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees()} false should be passed to the synchronous parameter
@@ -521,10 +536,9 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay, boolean sync
}
/**
- * A generic method for calculating the latest zman krias shema that calls {@link getSofZmanShma(Instant, Instant,
- * boolean)} passing false to the synchronous parameter since there is no way to know if the start and end of the
- * day are synchronous. Passing true when they are not synchronous is too much of a risk. See information on that method for
- * more details.
+ * A generic method for calculating the latest zman krias shema that calls {@link getSofZmanShma(Instant, Instant, boolean)}
+ * passing false to the synchronous parameter since there is no way to know if the start and end of the day are
+ * synchronous. Passing true when they are not synchronous is too much of a risk. See information on that method for more details.
* @param startOfDay
* the start of day for calculating zman krias shema. This can be sunrise or any alos passed
* to this method.
@@ -542,12 +556,13 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay) {
}
/**
- * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 * {@link
- * getShaahZmanisGRA() shaos zmaniyos} (solar hours) after {@link getSunrise() sunrise} or {@link getSeaLevelSunrise()
- * sea level sunrise} (depending on the {@link isUseElevation()} setting), according to the GRA. The day is calculated from {@link getSeaLevelSunrise() sea level sunrise}
- * to {@link getSeaLevelSunset() sea level sunset} or from {@link getSunrise() sunrise} to {@link getSunset() sunset}
- * (depending on the {@link isUseElevation()} setting).
+ * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *
+ * {@link getShaahZmanisGRA() shaos zmaniyos} (solar hours) after {@link getSunrise() sunrise} or
+ * {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting), according
+ * to the GRA.
+ * The day is calculated from {@link getSeaLevelSunrise() sea level sunrise} to {@link getSeaLevelSunset() sea level
+ * sunset} or from {@link getSunrise() sunrise} to {@link getSunset() sunset} (depending on the
+ * {@link isUseElevation()} setting).
*
* @see getSofZmanShma(Instant, Instant)
* @see getShaahZmanisGRA()
@@ -559,16 +574,17 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay) {
* of the {@link AstronomicalCalendar} documentation.
*/
public Instant getSofZmanShmaGRA() {
- return getSofZmanShma(getSunrise(), getSunset(), true);
+ return getSofZmanShma(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true);
}
/**
* This method returns the latest zman krias shema (time to recite Shema in the morning) according to the opinion of
* the Magen Avraham (MGA) based on alos being {@link
- * getAlos72Minutes() 72} minutes before {@link getSunrise() sunrise}. This time is 3 {@link getShaahZmanis72Minutes()
- * shaos zmaniyos} (solar hours) after {@link getAlos72Minutes() dawn} based on the opinion of the MGA that the day is
- * calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link getTzais72Minutes() nightfall} of
- * 72 minutes after sunset. This returns the time of 3 * {@link getShaahZmanis72Minutes()} after {@link getAlos72Minutes() dawn}.
+ * getAlos72Minutes() 72} minutes before {@link getSunrise() sunrise}. This time is 3 {@link
+ * getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link getAlos72Minutes() dawn} based on the opinion
+ * of the MGA that the day is calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to
+ * {@link getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link
+ * getShaahZmanis72Minutes()} after {@link getAlos72Minutes() dawn}.
*
* @return the Instant of the latest zman krias shema. 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
@@ -601,7 +617,7 @@ public Instant getSofZmanShmaMGA72Minutes() {
* {@link AstronomicalCalendar} documentation.
*/
public Instant getTzais72Minutes() {
- return getTimeOffset(getSunset(), 72 * MINUTE_MILLIS);
+ return getTimeOffset(getSunsetBasedOnElevationSetting(), 72 * MINUTE_MILLIS);
}
/**
@@ -802,7 +818,7 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay) {
* {@link AstronomicalCalendar} documentation.
*/
public Instant getSofZmanTfilaGRA() {
- return getSofZmanTfila(getSunrise(), getSunset(), true);
+ return getSofZmanTfila(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true);
}
@@ -810,8 +826,8 @@ public Instant getSofZmanTfilaGRA() {
* This method returns the latest zman tfila (time to recite shema in the morning) that is 4 * {@link
* getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link getAlos72Minutes()}, according to the
* Magen Avraham (MGA). The day is calculated
- * from 72 minutes before {@link getSunrise()} to 72 minutes after {@link
- * getSunset()}. The use of elevation depends on the {@link isUseElevation()} setting).
+ * from 72 minutes before {@link getSunriseBasedOnElevationSetting()} to 72 minutes after {@link
+ * getSunsetBasedOnElevationSetting()}. The use of elevation depends on the {@link isUseElevation()} setting).
*
* @return the Instant of the latest zman tfila. 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
@@ -920,7 +936,7 @@ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay) {
* {@link AstronomicalCalendar} documentation.
*/
public Instant getMinchaGedolaGRA() {
- return getMinchaGedola(getSunrise(), getSunset(), true);
+ return getMinchaGedola(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true);
}
/**
@@ -1065,7 +1081,7 @@ public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay) {
* {@link AstronomicalCalendar} documentation.
*/
public Instant getMinchaKetanaGRA() {
- return getMinchaKetana(getSunrise(), getSunset(), true);
+ return getMinchaKetana(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true);
}
/**
@@ -1143,7 +1159,7 @@ public Instant getPlagHamincha(Instant startOfDay, Instant endOfDay) {
* {@link AstronomicalCalendar} documentation.
*/
public Instant getPlagHaminchaGRA() {
- return getPlagHamincha(getSunrise(), getSunset(), true);
+ return getPlagHamincha(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true);
}
/**
@@ -1164,13 +1180,13 @@ public Instant getPlagHaminchaGRA() {
* @see ComprehensiveZmanimCalendar#getShaahZmanisBaalHatanya()
*/
public long getShaahZmanisGRA() {
- return getTemporalHour(getSunrise(), getSunset());
+ return getTemporalHour(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting());
}
/**
* A utility method to return alos (dawn) or tzais (dusk) based on a fractional day offset. As an
* example passing 1.5 to this method as done in the {@link ComprehensiveZmanimCalendar#getTzais90Zmanis()} will return
- * the time 90 minutes zmaniyos after {@link getSunset()}, a zman known as
+ * the time 90 minutes zmaniyos after {@link getSunsetBasedOnElevationSetting()}, a zman known as
* the achtel zman or 1/8th of the length of the day (12 * 60 = 720-minute day / 8 = 90 or 1.5 hours
* zmaniyos) after sunset.
* @param hours the number of shaos zmaniyos (temporal hours) before sunrise or after sunset that defines dawn
@@ -1193,9 +1209,9 @@ public Instant getZmanisBasedOffset(double hours) {
}
if (hours > 0) {
- return getTimeOffset(getSunset(), (long) (shaahZmanis * hours));
+ return getTimeOffset(getSunsetBasedOnElevationSetting(), (long) (shaahZmanis * hours));
} else {
- return getTimeOffset(getSunrise(), (long) (shaahZmanis * hours));
+ return getTimeOffset(getSunriseBasedOnElevationSetting(), (long) (shaahZmanis * hours));
}
}
@@ -1269,7 +1285,7 @@ public void setCandleLightingOffset(double candleLightingOffset) {
/**
* This is a utility method to determine if the current Instant passed in has a melacha (work) prohibition.
* Since there are many opinions on the time of tzais, the tzais for the current day has to be passed to this
- * class. Sunset is the classes current day's {@link getSunset() elevation adjusted sunset} that observes the
+ * class. Sunset is the classes current day's {@link getSunsetBasedOnElevationSetting() elevation adjusted sunset} that observes the
* {@link isUseElevation()} settings. The {@link JewishCalendar#getInIsrael()} will be set by the inIsrael parameter.
*
* @param currentTime the current time
@@ -1288,7 +1304,7 @@ public boolean isAssurBemlacha(Instant currentTime, Instant tzais, boolean inIsr
jewishCalendar.setInIsrael(inIsrael);
- if (jewishCalendar.hasCandleLighting() && currentTime.compareTo(getSunset()) >= 0) { //erev shabbos, YT or YT sheni and after shkiah
+ if (jewishCalendar.hasCandleLighting() && currentTime.compareTo(getSunsetBasedOnElevationSetting()) >= 0) { //erev shabbos, YT or YT sheni and after shkiah
return true;
}