001/*
002 * Zmanim Java API
003 * Copyright (C) 2004-2020 Eliyahu Hershfeld
004 *
005 * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
006 * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
007 * any later version.
008 *
009 * This library is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied
010 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
011 * details.
012 * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to
013 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA,
014 * or connect to: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
015 */
016package com.kosherjava.zmanim;
017
018import java.util.Calendar;
019import java.util.Date;
020import com.kosherjava.zmanim.util.AstronomicalCalculator;
021import com.kosherjava.zmanim.util.GeoLocation;
022import com.kosherjava.zmanim.hebrewcalendar.JewishCalendar;
023
024/**
025 * <p>This class extends ZmanimCalendar and provides many more zmanim than available in the ZmanimCalendar. The basis for
026 * most zmanim in this class are from the <em>sefer</em> <b><a href="http://hebrewbooks.org/9765">Yisroel Vehazmanim</a></b>
027 * by <b><a href="https://en.wikipedia.org/wiki/Yisroel_Dovid_Harfenes">Rabbi Yisrael Dovid Harfenes</a></b>.
028 * As an example of the number of different <em>zmanim</em> made available by this class, there are methods to return 14
029 * different calculations for <em>alos</em> (dawn) and 25 for <em>tzais</em> available in this API. The real power of this
030 * API is the ease in calculating <em>zmanim</em> that are not part of the library. The methods for <em>zmanim</em>
031 * calculations not present in this class or it's superclass  {@link ZmanimCalendar} are contained in the
032 * {@link AstronomicalCalendar}, the base class of the calendars in our API since they are generic methods for calculating
033 * time based on degrees or time before or after {@link #getSunrise sunrise} and {@link #getSunset sunset} and are of interest
034 * for calculation beyond <em>zmanim</em> calculations. Here are some examples.
035 * <p>First create the Calendar for the location you would like to calculate:
036 * 
037 * <pre style="background: #FEF0C9; display: inline-block;">
038 * String locationName = &quot;Lakewood, NJ&quot;;
039 * double latitude = 40.0828; // Lakewood, NJ
040 * double longitude = -74.2094; // Lakewood, NJ
041 * double elevation = 20; // optional elevation correction in Meters
042 * // the String parameter in getTimeZone() has to be a valid timezone listed in
043 * // {@link java.util.TimeZone#getAvailableIDs()}
044 * TimeZone timeZone = TimeZone.getTimeZone(&quot;America/New_York&quot;);
045 * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);
046 * ComplexZmanimCalendar czc = new ComplexZmanimCalendar(location);
047 * // Optionally set the date or it will default to today's date
048 * czc.getCalendar().set(Calendar.MONTH, Calendar.FEBRUARY);
049 * czc.getCalendar().set(Calendar.DAY_OF_MONTH, 8);</pre>
050 * <p>
051 * <b>Note:</b> For locations such as Israel where the beginning and end of daylight savings time can fluctuate from
052 * year to year, if your version of Java does not have an <a href=
053 * "http://www.oracle.com/technetwork/java/javase/tzdata-versions-138805.html">up to date timezone database</a>, create a
054 * {@link java.util.SimpleTimeZone} with the known start and end of DST.
055 * To get <em>alos</em> calculated as 14&deg; below the horizon (as calculated in the calendars published in Montreal),
056 * add {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90) to the 14&deg; offset to get the desired time:
057 * <br><br>
058 * <pre style="background: #FEF0C9; display: inline-block;">
059 *  Date alos14 = czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 14);</pre>
060 * <p>
061 * To get <em>mincha gedola</em> calculated based on the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern"
062 * >Magen Avraham (MGA)</a></em> using a <em>shaah zmanis</em> based on the day starting
063 * 16.1&deg; below the horizon (and ending 16.1&deg; after sunset) the following calculation can be used:
064 * 
065 * <pre style="background: #FEF0C9; display: inline-block;">
066 * Date minchaGedola = czc.getTimeOffset(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees() * 6.5);</pre>
067 * <p>
068 * or even simpler using the included convenience methods
069 * <pre style="background: #FEF0C9; display: inline-block;">
070 * Date minchaGedola = czc.getMinchaGedola(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees());</pre>
071 * <p>
072 * A little more complex example would be calculating zmanim that rely on a <em>shaah zmanis</em> that is
073 * not present in this library. While a drop more complex, it is still rather easy. An example would be to calculate
074 * the <em><a href="https://en.wikipedia.org/wiki/Israel_Isserlein">Trumas Hadeshen</a>'s</em> <em>alos</em> to
075 * <em>tzais</em> based <em>plag hamincha</em> as calculated in the Machzikei Hadass calendar in Manchester, England.
076 * A number of this calendar's zmanim are calculated based on a day starting at <em>alos</em> of 12&deg; before sunrise
077 * and ending at <em>tzais</em> of 7.083&deg; after sunset. Be aware that since the <em>alos</em> and <em>tzais</em>
078 * do not use identical degree based offsets, this leads to <em>chatzos</em> being at a time other than the
079 * {@link #getSunTransit() solar transit} (solar midday). To calculate this zman, use the following steps. Note that
080 * <em>plag hamincha</em> is 10.75 hours after the start of the day, and the following steps are all that it takes.
081 * <br>
082 * <pre style="background: #FEF0C9; display: inline-block;">
083 * Date plag = czc.getPlagHamincha(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),
084 *                              czc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));</pre>
085 * <p>
086 * Something a drop more challenging, but still simple, would be calculating a zman using the same "complex" offset day
087 * used in the above mentioned Manchester calendar, but for a <em>shaos zmaniyos</em> based <em>zman</em> not not
088 * supported by this library, such as calculating the point that one should be <em>makpid</em>
089 * not to eat on <em>erev Shabbos</em> or <em>erev Yom Tov</em>. This is 9 <em>shaos zmaniyos</em> into the day.
090 * <ol>
091 *      <li>Calculate the <em>shaah zmanis</em> in milliseconds for this day</li>
092 *      <li>Add 9 of these <em>shaos zmaniyos</em> to alos starting at 12&deg;</li>
093 * </ol>
094 * <br>
095 * <pre style="background: #FEF0C9; display: inline-block;">
096 * long shaahZmanis = czc.getTemporalHour(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),
097 *                                              czc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));
098 * Date sofZmanAchila = getTimeOffset(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),
099 *                                      shaahZmanis * 9);</pre>
100 * <p>
101 * Calculating this <em>sof zman achila</em> according to the <em><a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a></em>
102 * is simplicity itself.
103 * <pre style="background: #FEF0C9; display: inline-block;">
104 * Date sofZamnAchila = czc.getTimeOffset(czc.getSunrise(), czc.getShaahZmanisGra() * 9);</pre>
105 * 
106 * <h2>Documentation from the {@link ZmanimCalendar} parent class</h2>
107 * {@inheritDoc}
108 * 
109 * @author &copy; Eliyahu Hershfeld 2004 - 2020
110 */
111public class ComplexZmanimCalendar extends ZmanimCalendar {
112
113        /**
114         * The zenith of 3.7&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
115         * calculating <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> that <em>tzais</em> is the
116         * time it takes to walk 3/4 of a <em>Mil</em> at 18 minutes a <em>Mil</em>, or 13.5 minutes after sunset. The sun
117         * is 3.7&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem on March 16, about 4 days
118         * before the equinox, the day that a solar hour is 60 minutes.
119         * 
120         * @see #getTzaisGeonim3Point7Degrees()
121         */
122        protected static final double ZENITH_3_POINT_7 = GEOMETRIC_ZENITH + 3.7;
123
124        /**
125         * The zenith of 3.8&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
126         * calculating <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> that <em>tzais</em> is the
127         * time it takes to walk 3/4 of a <em>Mil</em> at 18 minutes a <em>Mil</em>, or 13.5 minutes after sunset. The sun
128         * is 3.8&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem on March 16, about 4 days
129         * before the equinox, the day that a solar hour is 60 minutes.
130         * 
131         * @see #getTzaisGeonim3Point8Degrees()
132         */
133        protected static final double ZENITH_3_POINT_8 = GEOMETRIC_ZENITH + 3.8;
134
135        /**
136         * The zenith of 5.95&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
137         * calculating <em>tzais</em> (nightfall) according to some opinions. This calculation is based on the position of
138         * the sun 24 minutes after sunset in Jerusalem on March 16, about 4 days before the equinox, the day that a solar
139         * hour is 60 minutes, which calculates to 5.95&deg; below {@link #GEOMETRIC_ZENITH geometric zenith}.
140         * 
141         * @see #getTzaisGeonim5Point95Degrees()
142         */
143        protected static final double ZENITH_5_POINT_95 = GEOMETRIC_ZENITH + 5.95;
144
145        /**
146         * The zenith of 7.083&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This is often referred to as
147         * 7&deg;5' or 7&deg; and 5 minutes. This calculation is used for calculating <em>alos</em> (dawn) and
148         * <em>tzais</em> (nightfall) according to some opinions. This calculation is based on the position of the sun 30
149         * minutes after sunset in Jerusalem on March 16, about 4 days before the equinox, the day that a solar hour is 60
150         * minutes, which calculates to 7.0833333&deg; below {@link #GEOMETRIC_ZENITH geometric zenith}. This is time some
151         * opinions consider dark enough for 3 stars to be visible. This is the opinion of the
152         * <em><a href="http://www.hebrewbooks.org/1053">Sh"Ut Melamed Leho'il</a></em>, <em>Sh"Ut Bnei Tziyon</em>, <em>Tenuvas
153         * Sadeh</em> and very close to the time of the <em><a href="http://www.hebrewbooks.org/22044">Mekor Chesed</a></em> of
154         * the <em>Sefer chasidim</em>.
155         * @todo Confirm the proper source.
156         * 
157         * @see #getTzaisGeonim7Point083Degrees()
158         * @see #getBainHasmashosRT13Point5MinutesBefore7Point083Degrees()
159         */
160        protected static final double ZENITH_7_POINT_083 = GEOMETRIC_ZENITH + 7 + (5.0 / 60);
161
162        /**
163         * The zenith of 10.2&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
164         * calculating <em>misheyakir</em> according to some opinions. This calculation is based on the position of the sun
165         * 45 minutes before {@link #getSunrise sunrise} in Jerusalem on March 16, about 4 days before the equinox, the day
166         * that a solar hour is 60 minutes which calculates to 10.2&deg; below {@link #GEOMETRIC_ZENITH geometric zenith}.
167         * 
168         * @see #getMisheyakir10Point2Degrees()
169         */
170        protected static final double ZENITH_10_POINT_2 = GEOMETRIC_ZENITH + 10.2;
171
172        /**
173         * The zenith of 11&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
174         * calculating <em>misheyakir</em> according to some opinions. This calculation is based on the position of the sun
175         * 48 minutes before {@link #getSunrise sunrise} in Jerusalem on March 16, about 4 days before the equinox, the day
176         * that a solar hour is 60 minutes which calculates to 11&deg; below {@link #GEOMETRIC_ZENITH geometric zenith}
177         * 
178         * @see #getMisheyakir11Degrees()
179         */
180        protected static final double ZENITH_11_DEGREES = GEOMETRIC_ZENITH + 11;
181
182        /**
183         * The zenith of 11.5&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
184         * calculating <em>misheyakir</em> according to some opinions. This calculation is based on the position of the sun
185         * 52 minutes before {@link #getSunrise sunrise} in Jerusalem on March 16, about 4 days before the equinox, the day
186         * that a solar hour is 60 minutes which calculates to 11.5&deg; below {@link #GEOMETRIC_ZENITH geometric zenith}
187         * 
188         * @see #getMisheyakir11Point5Degrees()
189         */
190        protected static final double ZENITH_11_POINT_5 = GEOMETRIC_ZENITH + 11.5;
191
192        /**
193         * The zenith of 13.24&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
194         * calculating <em>Rabbeinu Tam's bain hashmashos</em> according to some opinions.
195         * NOTE: See comments on {@link #getBainHasmashosRT13Point24Degrees} for additional details about the degrees.
196         * 
197         * @see #getBainHasmashosRT13Point24Degrees
198         * 
199         */
200        protected static final double ZENITH_13_POINT_24 = GEOMETRIC_ZENITH + 13.24;
201        
202        /**
203         * The zenith of 19&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
204         * calculating <em>alos</em> according to some opinions.
205         * 
206         * @see #getAlos19Degrees()
207         * @see #getAlos18Degrees()
208         */
209        protected static final double ZENITH_19_DEGREES = GEOMETRIC_ZENITH + 19;
210
211        /**
212         * The zenith of 19.8&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
213         * calculating <em>alos</em> (dawn) and <em>tzais</em> (nightfall) according to some opinions. This calculation is
214         * based on the position of the sun 90 minutes after sunset in Jerusalem on March 16, about 4 days before the
215         * equinox, the day that a solar hour is 60 minutes which calculates to 19.8&deg; below {@link #GEOMETRIC_ZENITH
216         * geometric zenith}
217         * 
218         * @see #getTzais19Point8Degrees()
219         * @see #getAlos19Point8Degrees()
220         * @see #getAlos90()
221         * @see #getTzais90()
222         */
223        protected static final double ZENITH_19_POINT_8 = GEOMETRIC_ZENITH + 19.8;
224
225        /**
226         * The zenith of 26&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
227         * calculating <em>alos</em> (dawn) and <em>tzais</em> (nightfall) according to some opinions. This calculation is
228         * based on the position of the sun {@link #getAlos120() 120 minutes} after sunset in Jerusalem on March 16, about 4
229         * days before the equinox, the day that a solar hour is 60 minutes which calculates to 26&deg; below
230         * {@link #GEOMETRIC_ZENITH geometric zenith}
231         * 
232         * @see #getAlos26Degrees()
233         * @see #getTzais26Degrees()
234         * @see #getAlos120()
235         * @see #getTzais120()
236         */
237        protected static final double ZENITH_26_DEGREES = GEOMETRIC_ZENITH + 26.0;
238
239        /**
240         * The zenith of 4.37&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
241         * calculating <em>tzais</em> (nightfall) according to some opinions. This calculation is based on the position of
242         * the sun {@link #getTzaisGeonim4Point37Degrees() 16 7/8 minutes} after sunset (3/4 of a 22.5 minute Mil) in
243         * Jerusalem on March 16, about 4 days before the equinox, the day that a solar hour is 60 minutes which calculates
244         * to 4.37&deg; below {@link #GEOMETRIC_ZENITH geometric zenith}
245         * 
246         * @see #getTzaisGeonim4Point37Degrees()
247         */
248        protected static final double ZENITH_4_POINT_37 = GEOMETRIC_ZENITH + 4.37;
249
250        /**
251         * The zenith of 4.61&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
252         * calculating <em>tzais</em> (nightfall) according to some opinions. This calculation is based on the position of
253         * the sun {@link #getTzaisGeonim4Point37Degrees() 18 minutes} after sunset (3/4 of a 24 minute Mil) in Jerusalem on
254         * March 16, about 4 days before the equinox, the day that a solar hour is 60 minutes which calculates to 4.61&deg;
255         * below {@link #GEOMETRIC_ZENITH geometric zenith}
256         * 
257         * @see #getTzaisGeonim4Point61Degrees()
258         */
259        protected static final double ZENITH_4_POINT_61 = GEOMETRIC_ZENITH + 4.61;
260
261        /**
262         * The zenith of 5.88&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;).
263         * @todo Add more documentation.
264         * @see #getTzaisGeonim4Point8Degrees()
265         */
266        protected static final double ZENITH_4_POINT_8 = GEOMETRIC_ZENITH + 4.8;
267
268        /**
269         * The zenith of 3.65&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
270         * calculating <em>tzais</em> (nightfall) according to some opinions. This calculation is based on the position of
271         * the sun {@link #getTzaisGeonim3Point65Degrees() 13.5 minutes} after sunset (3/4 of an 18 minute Mil) in Jerusalem
272         * on March 16, about 4 days before the equinox, the day that a solar hour is 60 minutes which calculates to
273         * 3.65&deg; below {@link #GEOMETRIC_ZENITH geometric zenith}
274         * 
275         * @see #getTzaisGeonim3Point65Degrees()
276         */
277        protected static final double ZENITH_3_POINT_65 = GEOMETRIC_ZENITH + 3.65;
278
279        /**
280         * The zenith of 3.676&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;).
281         * @todo Add more documentation.
282         */
283        protected static final double ZENITH_3_POINT_676 = GEOMETRIC_ZENITH + 3.676;
284
285        /**
286         * The zenith of 5.88&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;).
287         * @todo Add more documentation.
288         */
289        protected static final double ZENITH_5_POINT_88 = GEOMETRIC_ZENITH + 5.88;
290
291        /**
292         * The zenith of 1.583&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
293         * calculating <em>netz amiti</em> (sunrise) and <em>shkiah amiti</em> (sunset) based on the opinion of the
294         * <em><a href="https://en.wikipedia.org/wiki/Shneur_Zalman_of_Liadi">Baal Hatanya</a></em>.
295         *
296         * @see #getSunriseBaalHatanya()
297         * @see #getSunsetBaalHatanya()
298         */
299        protected static final double ZENITH_1_POINT_583 = GEOMETRIC_ZENITH + 1.583;
300
301        /**
302         * The zenith of 16.9&deg; below geometric zenith (90&deg;). This calculation is used for determining <em>alos</em>
303         * (dawn) based on the opinion of the <em>Baal Hatanya</em>. It is based on the calculation that the time between dawn
304         * and <em>netz amiti</em> (sunrise) is 72 minutes, the time that is takes to walk 4 <em>mil</em> at 18 minutes
305         * a mil (<em><a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a></em> and others). The sun's position at 72
306         * minutes before {@link #getSunriseBaalHatanya <em>netz amiti</em> (sunrise)} in Jerusalem on the equinox (on March 16,
307         * about 4 days before the astronomical equinox, the day that a solar hour is 60 minutes) is 16.9&deg; below
308         * {@link #GEOMETRIC_ZENITH geometric zenith}.
309         *
310         * @see #getAlosBaalHatanya()
311         */
312        protected static final double ZENITH_16_POINT_9 = GEOMETRIC_ZENITH + 16.9;
313
314        /**
315         * The zenith of 6&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for calculating
316         * <em>tzais</em> (nightfall) based on the opinion of the <em>Baal Hatanya</em>. This calculation is based on the position
317         * of the sun 24 minutes after {@link #getSunset sunset} in Jerusalem on March 16, about 4 days before the equinox, the day
318         * that a solar hour is 60 minutes, which is 6&deg; below {@link #GEOMETRIC_ZENITH geometric zenith}.
319         *
320         * @see #getTzaisBaalHatanya()
321         */
322        protected static final double ZENITH_6_DEGREES = GEOMETRIC_ZENITH + 6;
323
324        /**
325         * The zenith of 6.45&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
326         * calculating <em>tzais</em> (nightfall) according to some opinions. This is based on the calculations of <a href=
327         * "https://en.wikipedia.org/wiki/Yechiel_Michel_Tucazinsky">Rabbi Yechiel Michel Tucazinsky</a> of the position of
328         * the sun no later than {@link #getTzaisGeonim6Point45Degrees() 31 minutes} after sunset in Jerusalem, and at the
329         * height of the summer solstice, this zman is 28 minutes after<em>shkiah</em>. This computes to 6.45&deg; below
330         * {@link #GEOMETRIC_ZENITH geometric zenith}. This calculation is found in the <a href=
331         * "https://hebrewbooks.org/pdfpager.aspx?req=50536&st=&pgnum=51">Birur Halacha Yoreh Deah 262</a> it the commonly used
332         * <em>zman</em> in Israel. It should be noted that this differs from the 6.1&deg;/6.2&deg; calculation for Rabbi
333         * Tucazinsky's time as calculated by the Hazmanim Bahalacha Vol II chapter 50:7 (page 515).
334         * 
335         * @see #getTzaisGeonim6Point45Degrees()
336         */
337        protected static final double ZENITH_6_POINT_45 = GEOMETRIC_ZENITH + 6.45;
338        
339        /**
340         * The zenith of 7.65&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
341         * calculating <em>misheyakir</em> according to some opinions.
342         * 
343         * @see #getMisheyakir7Point65Degrees()
344         */
345        protected static final double ZENITH_7_POINT_65 = GEOMETRIC_ZENITH + 7.65;
346        
347        /**
348         * The zenith of 7.67&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
349         * calculating <em>tzais</em> according to some opinions.
350         * 
351         * @see #getMisheyakir7Point65Degrees()
352         */
353        protected static final double ZENITH_7_POINT_67 = GEOMETRIC_ZENITH + 7.67;
354        
355        /**
356         * The zenith of 9.3&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
357         * calculating <em>tzais</em> (nightfall) according to some opinions.
358         * 
359         * @see #getTzaisGeonim9Point3Degrees()
360         */
361        protected static final double ZENITH_9_POINT_3 = GEOMETRIC_ZENITH + 9.3;
362        
363        /**
364         * The zenith of 9.5&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
365         * calculating <em>misheyakir</em> according to some opinions.
366         * 
367         * @see #getMisheyakir9Point5Degrees()
368         */
369        protected static final double ZENITH_9_POINT_5 = GEOMETRIC_ZENITH + 9.5;
370        
371        /**
372         * The zenith of 9.75&deg; below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
373         * calculating <em>alos</em> (dawn) and <em>tzais</em> (nightfall) according to some opinions.
374         * 
375         * @see #getTzaisGeonim9Point75Degrees()
376         */
377        protected static final double ZENITH_9_POINT_75 = GEOMETRIC_ZENITH + 9.75;
378        
379        /**
380         * The zenith of 2.1&deg; above {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
381         * calculating the start of <em>bain hashmashos</em> (twilight) of 13.5 minutes before sunset converted to degrees
382         * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction
383         * and from the center of the sun. It would be 0.833&deg; less without this. 
384         * 
385         * @see #getBainHasmashosYereim2Point1Degrees()
386         */
387        protected static final double ZENITH_MINUS_2_POINT_1 = GEOMETRIC_ZENITH - 2.1;
388        
389        /**
390         * The zenith of 2.8&deg; above {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
391         * calculating the start of <em>bain hashmashos</em> (twilight) of 16.875 minutes before sunset converted to degrees
392         * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction
393         * and from the center of the sun. It would be 0.833&deg; less without this.
394         * 
395         * @see #getBainHasmashosYereim2Point8Degrees()
396         */
397        protected static final double ZENITH_MINUS_2_POINT_8 = GEOMETRIC_ZENITH - 2.8;
398        
399        /**
400         * The zenith of 3.05&deg; above {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for
401         * calculating the start of <em>bain hashmashos</em> (twilight) of 18 minutes before sunset converted to degrees
402         * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction
403         * and from the center of the sun. It would be 0.833&deg; less without this.
404         * 
405         * @see #getBainHasmashosYereim3Point05Degrees()
406         */
407        protected static final double ZENITH_MINUS_3_POINT_05 = GEOMETRIC_ZENITH - 3.05;
408
409        /**
410         * The offset in minutes (defaults to 40) after sunset used for <em>tzeit</em> for Ateret Torah calculations.
411         * @see #getTzaisAteretTorah()
412         * @see #getAteretTorahSunsetOffset()
413         * @see #setAteretTorahSunsetOffset(double)
414         */
415        private double ateretTorahSunsetOffset = 40;
416
417        /**
418         * A constructor that takes a {@link GeoLocation} as a parameter.
419         * 
420         * @param location
421         *            the location
422         * 
423         * @see ZmanimCalendar#ZmanimCalendar(GeoLocation)
424         */
425        public ComplexZmanimCalendar(GeoLocation location) {
426                super(location);
427        }
428
429        /**
430         * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default
431         * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.
432         * 
433         * @see AstronomicalCalendar#AstronomicalCalendar()
434         */
435        public ComplexZmanimCalendar() {
436                super();
437        }
438
439        /**
440         * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a 19.8&deg; dip. This calculation
441         * divides the day based on the opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> that the day runs from dawn to dusk. Dawn for this calculation is
442         * when the sun is 19.8&deg; below the eastern geometric horizon before sunrise. Dusk for this is when the sun is
443         * 19.8&deg; below the western geometric horizon after sunset. This day is split into 12 equal parts with each part
444         * being a <em>shaah zmanis</em>.
445         * 
446         * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed
447         *         such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle
448         *         where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}
449         *         will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
450         */
451        public long getShaahZmanis19Point8Degrees() {
452                return getTemporalHour(getAlos19Point8Degrees(), getTzais19Point8Degrees());
453        }
454
455        /**
456         * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a 18&deg; dip. This calculation divides
457         * the day based on the opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> that the day runs from dawn to dusk. Dawn for this calculation is when
458         * the sun is 18&deg; below the eastern geometric horizon before sunrise. Dusk for this is when the sun is 18&deg;
459         * below the western geometric horizon after sunset. This day is split into 12 equal parts with each part being a
460         * <em>shaah zmanis</em>.
461         * 
462         * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed
463         *         such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle
464         *         where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}
465         *         will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
466         */
467        public long getShaahZmanis18Degrees() {
468                return getTemporalHour(getAlos18Degrees(), getTzais18Degrees());
469        }
470
471        /**
472         * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a dip of 26&deg;. This calculation
473         * divides the day based on the opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> that the day runs from dawn to dusk. Dawn for this calculation is
474         * when the sun is {@link #getAlos26Degrees() 26&deg;} below the eastern geometric horizon before sunrise. Dusk for
475         * this is when the sun is {@link #getTzais26Degrees() 26&deg;} below the western geometric horizon after sunset.
476         * This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>.
477         * 
478         * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed
479         *         such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle
480         *         where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}
481         *         will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
482         */
483        public long getShaahZmanis26Degrees() {
484                return getTemporalHour(getAlos26Degrees(), getTzais26Degrees());
485        }
486
487        /**
488         * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a dip of 16.1&deg;. This calculation
489         * divides the day based on the opinion that the day runs from dawn to dusk. Dawn for this calculation is when the
490         * sun is 16.1&deg; below the eastern geometric horizon before sunrise and dusk is when the sun is 16.1&deg; below
491         * the western geometric horizon after sunset. This day is split into 12 equal parts with each part being a
492         * <em>shaah zmanis</em>.
493         * 
494         * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed
495         *         such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle
496         *         where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}
497         *         will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
498         * 
499         * @see #getAlos16Point1Degrees()
500         * @see #getTzais16Point1Degrees()
501         * @see #getSofZmanShmaMGA16Point1Degrees()
502         * @see #getSofZmanTfilaMGA16Point1Degrees()
503         * @see #getMinchaGedola16Point1Degrees()
504         * @see #getMinchaKetana16Point1Degrees()
505         * @see #getPlagHamincha16Point1Degrees()
506         */
507
508        public long getShaahZmanis16Point1Degrees() {
509                return getTemporalHour(getAlos16Point1Degrees(), getTzais16Point1Degrees());
510        }
511
512        /**
513         * Method to return a <em>shaah zmanis</em> (solar hour) according to the opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em>. This calculation
514         * divides the day based on the opinion of the <em>MGA</em> that the day runs from dawn to dusk. Dawn for this
515         * calculation is 60 minutes before sunrise and dusk is 60 minutes after sunset. This day is split into 12 equal
516         * parts with each part being a <em>shaah zmanis</em>. Alternate methods of calculating a <em>shaah zmanis</em> are
517         * available in the subclass {@link ComplexZmanimCalendar}
518         * 
519         * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed
520         *         such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
521         *         where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
522         *         {@link AstronomicalCalendar} documentation.
523         */
524        public long getShaahZmanis60Minutes() {
525                return getTemporalHour(getAlos60(), getTzais60());
526        }
527
528        /**
529         * Method to return a <em>shaah zmanis</em> (solar hour) according to the opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em>. This calculation
530         * divides the day based on the opinion of the <em>MGA</em> that the day runs from dawn to dusk. Dawn for this
531         * calculation is 72 minutes before sunrise and dusk is 72 minutes after sunset. This day is split into 12 equal
532         * parts with each part being a <em>shaah zmanis</em>. Alternate methods of calculating a <em>shaah zmanis</em> are
533         * available in the subclass {@link ComplexZmanimCalendar}
534         * 
535         * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed
536         *         such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
537         *         where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
538         *         {@link AstronomicalCalendar} documentation.
539         */
540        public long getShaahZmanis72Minutes() {
541                return getShaahZmanisMGA();
542        }
543
544        /**
545         * Method to return a <em>shaah zmanis</em> (temporal hour) according to the opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on
546         * <em>alos</em> being {@link #getAlos72Zmanis() 72} minutes <em>zmaniyos</em> before {@link #getSunrise() sunrise}.
547         * This calculation divides the day based on the opinion of the <em>MGA</em> that the day runs from dawn to dusk.
548         * Dawn for this calculation is 72 minutes <em>zmaniyos</em> before sunrise and dusk is 72 minutes <em>zmaniyos</em>
549         * after sunset. This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. This is
550         * identical to 1/10th of the day from {@link #getSunrise() sunrise} to {@link #getSunset() sunset}.
551         * 
552         * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed
553         *         such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
554         *         where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
555         *         {@link AstronomicalCalendar} documentation.
556         * @see #getAlos72Zmanis()
557         * @see #getTzais72Zmanis()
558         */
559        public long getShaahZmanis72MinutesZmanis() {
560                return getTemporalHour(getAlos72Zmanis(), getTzais72Zmanis());
561        }
562
563        /**
564         * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a dip of 90 minutes. This calculation
565         * divides the day based on the opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> that the day runs from dawn to dusk. Dawn for this calculation is
566         * 90 minutes before sunrise and dusk is 90 minutes after sunset. This day is split into 12 equal parts with each
567         * part being a <em>shaah zmanis</em>.
568         * 
569         * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed
570         *         such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
571         *         where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
572         *         {@link AstronomicalCalendar} documentation.
573         */
574        public long getShaahZmanis90Minutes() {
575                return getTemporalHour(getAlos90(), getTzais90());
576        }
577
578        /**
579         * Method to return a <em>shaah zmanis</em> (temporal hour) according to the opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on
580         * <em>alos</em> being {@link #getAlos90Zmanis() 90} minutes <em>zmaniyos</em> before {@link #getSunrise() sunrise}.
581         * This calculation divides the day based on the opinion of the <em>MGA</em> that the day runs from dawn to dusk.
582         * Dawn for this calculation is 90 minutes <em>zmaniyos</em> before sunrise and dusk is 90 minutes <em>zmaniyos</em>
583         * after sunset. This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. This is
584         * identical to 1/8th of the day from {@link #getSunrise() sunrise} to {@link #getSunset() sunset}.
585         * 
586         * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed
587         *         such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
588         *         where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
589         *         {@link AstronomicalCalendar} documentation.
590         * @see #getAlos90Zmanis()
591         * @see #getTzais90Zmanis()
592         */
593        public long getShaahZmanis90MinutesZmanis() {
594                return getTemporalHour(getAlos90Zmanis(), getTzais90Zmanis());
595        }
596
597        /**
598         * Method to return a <em>shaah zmanis</em> (temporal hour) according to the opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on
599         * <em>alos</em> being {@link #getAlos96Zmanis() 96} minutes <em>zmaniyos</em> before {@link #getSunrise() sunrise}.
600         * This calculation divides the day based on the opinion of the <em>MGA</em> that the day runs from dawn to dusk.
601         * Dawn for this calculation is 96 minutes <em>zmaniyos</em> before sunrise and dusk is 96 minutes <em>zmaniyos</em>
602         * after sunset. This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. This is
603         * identical to 1/7.5th of the day from {@link #getSunrise() sunrise} to {@link #getSunset() sunset}.
604         * 
605         * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed
606         *         such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
607         *         where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
608         *         {@link AstronomicalCalendar} documentation.
609         * @see #getAlos96Zmanis()
610         * @see #getTzais96Zmanis()
611         */
612        public long getShaahZmanis96MinutesZmanis() {
613                return getTemporalHour(getAlos96Zmanis(), getTzais96Zmanis());
614        }
615
616        /**
617         * Method to return a <em>shaah zmanis</em> (temporal hour) according to the opinion of the
618         * <em>Chacham Yosef Harari-Raful</em> of <em>Yeshivat Ateret Torah</em> calculated with <em>alos</em> being 1/10th
619         * of sunrise to sunset day, or {@link #getAlos72Zmanis() 72} minutes <em>zmaniyos</em> of such a day before
620         * {@link #getSunrise() sunrise}, and <em>tzais</em> is usually calculated as {@link #getTzaisAteretTorah() 40
621         * minutes} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}) after {@link #getSunset()
622         * sunset}. This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. Note that with this
623         * system, <em>chatzos</em> (mid-day) will not be the point that the sun is {@link #getSunTransit() halfway across
624         * the sky}.
625         * 
626         * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed
627         *         such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
628         *         where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
629         *         {@link AstronomicalCalendar} documentation.
630         * @see #getAlos72Zmanis()
631         * @see #getTzaisAteretTorah()
632         * @see #getAteretTorahSunsetOffset()
633         * @see #setAteretTorahSunsetOffset(double)
634         */
635        public long getShaahZmanisAteretTorah() {
636                return getTemporalHour(getAlos72Zmanis(), getTzaisAteretTorah());
637        }
638
639        /**
640         * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a dip of 96 minutes. This calculation
641         * divides the day based on the opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> that the day runs from dawn to dusk. Dawn for this calculation is
642         * 96 minutes before sunrise and dusk is 96 minutes after sunset. This day is split into 12 equal parts with each
643         * part being a <em>shaah zmanis</em>.
644         * 
645         * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed
646         *         such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
647         *         where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
648         *         {@link AstronomicalCalendar} documentation.
649         */
650        public long getShaahZmanis96Minutes() {
651                return getTemporalHour(getAlos96(), getTzais96());
652        }
653
654        /**
655         * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a dip of 120 minutes. This calculation
656         * divides the day based on the opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> that the day runs from dawn to dusk. Dawn for this calculation is
657         * 120 minutes before sunrise and dusk is 120 minutes after sunset. This day is split into 12 equal parts with each
658         * part being a <em>shaah zmanis</em>.
659         * 
660         * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed
661         *         such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
662         *         where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
663         *         {@link AstronomicalCalendar} documentation.
664         */
665        public long getShaahZmanis120Minutes() {
666                return getTemporalHour(getAlos120(), getTzais120());
667        }
668
669        /**
670         * Method to return a <em>shaah zmanis</em> (temporal hour) according to the opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on
671         * <em>alos</em> being {@link #getAlos120Zmanis() 120} minutes <em>zmaniyos</em> before {@link #getSunrise()
672         * sunrise}. This calculation divides the day based on the opinion of the <em>MGA</em> that the day runs from dawn
673         * to dusk. Dawn for this calculation is 120 minutes <em>zmaniyos</em> before sunrise and dusk is 120 minutes
674         * <em>zmaniyos</em> after sunset. This day is split into 12 equal parts with each part being a
675         * <em>shaah zmanis</em>. This is identical to 1/6th of the day from {@link #getSunrise() sunrise} to
676         * {@link #getSunset() sunset}.
677         * 
678         * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed
679         *         such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
680         *         where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
681         *         {@link AstronomicalCalendar} documentation.
682         * @see #getAlos120Zmanis()
683         * @see #getTzais120Zmanis()
684         */
685        public long getShaahZmanis120MinutesZmanis() {
686                return getTemporalHour(getAlos120Zmanis(), getTzais120Zmanis());
687        }
688
689        /**
690         * This method returns the time of <em>plag hamincha</em> based on sunrise being 120 minutes <em>zmaniyos</em>
691         * or 1/6th of the day before sunrise. This is calculated as 10.75 hours after {@link #getAlos120Zmanis() dawn}.
692         * The formula used is 10.75 * {@link #getShaahZmanis120MinutesZmanis()} after {@link #getAlos120Zmanis() dawn}.
693         * 
694         * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as
695         *         in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
696         *         does not set, a null will be returned. See detailed explanation on top of the
697         *         {@link AstronomicalCalendar} documentation.
698         * 
699         * @see #getShaahZmanis120MinutesZmanis()
700         */
701        public Date getPlagHamincha120MinutesZmanis() {
702                return getPlagHamincha(getAlos120Zmanis(), getTzais120Zmanis());
703        }
704
705        /**
706         * This method returns the time of <em>plag hamincha</em> according to the <em>Magen Avraham</em> with the day
707         * starting 120 minutes before sunrise and ending 120 minutes after sunset. This is calculated as 10.75 hours after
708         * {@link #getAlos120() dawn 120 minutes}. The formula used is
709         * 10.75 {@link #getShaahZmanis120Minutes()} after {@link #getAlos120()}.
710         * 
711         * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as
712         *         in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
713         *         does not set, a null will be returned. See detailed explanation on top of the
714         *         {@link AstronomicalCalendar} documentation.
715         * 
716         * @see #getShaahZmanis120Minutes()
717         */
718        public Date getPlagHamincha120Minutes() {
719                return getPlagHamincha(getAlos120(), getTzais120());
720        }
721
722        /**
723         * Method to return <em>alos</em> (dawn) calculated as 60 minutes before sunrise. This is the time to walk the 
724         * distance of 4 <em>Mil</em> at 15 minutes a <em>Mil</em>. This seems to be the opinion of the <em><a href=
725         * "https://en.wikipedia.org/wiki/Yair_Bacharach">Chavas Yair</a></em> in the <em>Mekor Chaim, Orach Chaim Ch.
726         * 90</em>, though  the Mekor chaim in Ch. 58 and in the <em><a href=
727         * "http://www.hebrewbooks.org/pdfpager.aspx?req=45193&amp;pgnum=214">Chut Hashani Cha 97</a></em> states that
728         * a a person walks 3 and a 1/3 <em>mil</em> in an hour, or an 18 minute <em>mil</em>. Also see the <a href=
729         * "https://he.wikipedia.org/wiki/%D7%9E%D7%9C%D7%9B%D7%99%D7%90%D7%9C_%D7%A6%D7%91%D7%99_%D7%98%D7%A0%D7%A0%D7%91%D7%95%D7%99%D7%9D"
730         * >Divrei Malkiel</a> <a href="http://www.hebrewbooks.org/pdfpager.aspx?req=803&amp;pgnum=33">Vol. 4, Ch. 20, page 34</a>) who
731         * mentions the 15 minute <em>mil</em> lechumra by baking matzos. Also see the <a href=
732         * "https://en.wikipedia.org/wiki/Joseph_Colon_Trabotto">Maharik</a> <a href=
733         * "http://www.hebrewbooks.org/pdfpager.aspx?req=1142&amp;pgnum=216">Ch. 173</a> where the questioner quoting the
734         * <a href="https://en.wikipedia.org/wiki/Eliezer_ben_Nathan">Ra'avan</a> is of the opinion that the time to walk a
735         * <em>mil</em> is 15 minutes (5 <em>mil</em> in a little over an hour). There are many who believe that there is a
736         * <em>ta'us sofer</em> (scribe's error) in the Ra'avan, and it should 4 <em>mil</em> in a little over an hour, or an
737         * 18 minute <em>mil</em>. Time based offset calculations are based on the opinion of the
738         * <em><a href="https://en.wikipedia.org/wiki/Rishonim">Rishonim</a></em> who stated that the time of the <em>neshef</em>
739         * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it takes to
740         * walk the distance of 4* <em>mil</em>. {@link #getTzaisGeonim9Point75Degrees()} is a related <em>zman</em> that is a
741         * degree based calculation based on 60 minutes.
742         * 
743         * @todo Apply documentation to Tzais once reviewed.
744         * 
745         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic
746         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
747         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
748         *         documentation.
749         *
750         * @see #getTzaisGeonim9Point75Degrees()
751         */
752        public Date getAlos60() {
753                return getTimeOffset(getSunrise(), -60 * MINUTE_MILLIS);
754        }
755
756        /**
757         * Method to return <em>alos</em> (dawn) calculated using 72 minutes <em>zmaniyos</em> or 1/10th of the day before
758         * sunrise. This is based on an 18 minute <em>Mil</em> so the time for 4 <em>Mil</em> is 72 minutes which is 1/10th
759         * of a day (12 * 60 = 720) based on the a day being from {@link #getSeaLevelSunrise() sea level sunrise} to
760         * {@link #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset}
761         * (depending on the {@link #isUseElevation()} setting).
762         * The actual calculation is {@link #getSeaLevelSunrise()}- ( {@link #getShaahZmanisGra()} * 1.2). This calculation
763         * is used in the calendars published by <em><a href=
764         * "https://en.wikipedia.org/wiki/Central_Rabbinical_Congress">Hisachdus Harabanim D'Artzos Habris Ve'Canada</a></em>
765         * 
766         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic
767         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
768         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
769         *         documentation.
770         * @see #getShaahZmanisGra()
771         */
772        public Date getAlos72Zmanis() {
773                long shaahZmanis = getShaahZmanisGra();
774                if (shaahZmanis == Long.MIN_VALUE) {
775                        return null;
776                }
777                return getTimeOffset(getElevationAdjustedSunrise(), (long) (shaahZmanis * -1.2));
778        }
779
780        /**
781         * Method to return <em>alos</em> (dawn) calculated using 96 minutes before before {@link #getSunrise() sunrise} or
782         * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting) that is based
783         * on the time to walk the distance of 4 <em>Mil</em> at 24 minutes a <em>Mil</em>. Time based offset
784         * calculations for <em>alos</em> are based on the opinion of the <em><a href="https://en.wikipedia.org/wiki/Rishonim"
785         * >Rishonim</a></em> who stated that the time of the <em>Neshef</em> (time between dawn and sunrise) does not vary
786         * by the time of year or location but purely depends on the time it takes to walk the distance of 4 <em>Mil</em>.
787         * 
788         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic
789         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
790         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
791         *         documentation.
792         */
793        public Date getAlos96() {
794                return getTimeOffset(getElevationAdjustedSunrise(), -96 * MINUTE_MILLIS);
795        }
796
797        /**
798         * Method to return <em>alos</em> (dawn) calculated using 90 minutes <em>zmaniyos</em> or 1/8th of the day before
799         * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link
800         * #isUseElevation()} setting). This is based on a 22.5 minute <em>Mil</em> so the time for 4 <em>Mil</em> is 90
801         * minutes which is 1/8th of a day (12 * 60) / 8 = 90
802         * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level
803         * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}.
804         * The actual calculation used is {@link #getSunrise()} - ( {@link #getShaahZmanisGra()} * 1.5).
805         * 
806         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic
807         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
808         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
809         *         documentation.
810         * @see #getShaahZmanisGra()
811         */
812        public Date getAlos90Zmanis() {
813                long shaahZmanis = getShaahZmanisGra();
814                if (shaahZmanis == Long.MIN_VALUE) {
815                        return null;
816                }
817                return getTimeOffset(getElevationAdjustedSunrise(), (long) (shaahZmanis * -1.5));
818        }
819
820        /**
821         * This method returns <em>alos</em> (dawn) calculated using 96 minutes <em>zmaniyos</em> or 1/7.5th of the day before
822         * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link
823         * #isUseElevation()} setting). This is based on a 24 minute <em>Mil</em> so the time for 4 <em>Mil</em> is 96
824         * minutes which is 1/7.5th of a day (12 * 60 / 7.5 = 96).
825         * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level
826         * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}.
827         * The actual calculation used is {@link #getSunrise()} - ( {@link #getShaahZmanisGra()} * 1.6).
828         * 
829         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic
830         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
831         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
832         *         documentation.
833         * @see #getShaahZmanisGra()
834         */
835        public Date getAlos96Zmanis() {
836                long shaahZmanis = getShaahZmanisGra();
837                if (shaahZmanis == Long.MIN_VALUE) {
838                        return null;
839                }
840                return getTimeOffset(getElevationAdjustedSunrise(), (long) (shaahZmanis * -1.6));
841        }
842
843        /**
844         * Method to return <em>alos</em> (dawn) calculated using 90 minutes before {@link #getSeaLevelSunrise() sea level
845         * sunrise} based on the time to walk the distance of 4 <em>Mil</em> at 22.5 minutes a <em>Mil</em>. Time based
846         * offset calculations for <em>alos</em> are based on the opinion of the <em><a href=
847         * "https://en.wikipedia.org/wiki/Rishonim">Rishonim</a></em> who stated that the time of the <em>Neshef</em>
848         * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it
849         * takes to walk the distance of 4 <em>Mil</em>.
850         * 
851         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic
852         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
853         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
854         *         documentation.
855         */
856        public Date getAlos90() {
857                return getTimeOffset(getElevationAdjustedSunrise(), -90 * MINUTE_MILLIS);
858        }
859
860        /**
861         * Method to return <em>alos</em> (dawn) calculated using 120 minutes before {@link #getSeaLevelSunrise() sea level
862         * sunrise} (no adjustment for elevation is made) based on the time to walk the distance of 5 <em>Mil</em>(
863         * <em>Ula</em>) at 24 minutes a <em>Mil</em>. Time based offset calculations for <em>alos</em> are based on the
864         * opinion of the <em><a href="https://en.wikipedia.org/wiki/Rishonim">Rishonim</a></em> who stated that the time
865         * of the <em>Neshef</em> (time between dawn and sunrise) does not vary by the time of year or location but purely
866         * depends on the time it takes to walk the distance of 5
867         * <em>Mil</em>(<em>Ula</em>).
868         * 
869         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic
870         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
871         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
872         *         documentation.
873         */
874        public Date getAlos120() {
875                return getTimeOffset(getElevationAdjustedSunrise(), -120 * MINUTE_MILLIS);
876        }
877
878        /**
879         * This method returns <em>alos</em> (dawn) calculated using 120 minutes <em>zmaniyos</em> or 1/6th of the day before
880         * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link
881         * #isUseElevation()} setting). This is based on a 24 minute <em>Mil</em> so the time for 5 <em>Mil</em> is 120
882         * minutes which is 1/6th of a day (12 * 60 / 6 = 120).
883         * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level
884         * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}.
885         * The actual calculation used is {@link #getSunrise()} - ( {@link #getShaahZmanisGra()} * 2).
886         * 
887         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic
888         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
889         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
890         *         documentation.
891         * @see #getShaahZmanisGra()
892         */
893        public Date getAlos120Zmanis() {
894                long shaahZmanis = getShaahZmanisGra();
895                if (shaahZmanis == Long.MIN_VALUE) {
896                        return null;
897                }
898                return getTimeOffset(getElevationAdjustedSunrise(), shaahZmanis * -2);
899        }
900
901        /**
902         * A method to return <em>alos</em> (dawn) calculated when the sun is {@link #ZENITH_26_DEGREES 26&deg;} below the
903         * eastern geometric horizon before sunrise. This calculation is based on the same calculation of
904         * {@link #getAlos120() 120 minutes} but uses a degree based calculation instead of 120 exact minutes. This
905         * calculation is based on the position of the sun 120 minutes before sunrise in Jerusalem during the equinox (on March
906         * 16, about 4 days before the astronomical equinox, the day that a solar hour is 60 minutes) which calculates to 26&deg;
907         * below {@link #GEOMETRIC_ZENITH geometric zenith}.
908         * 
909         * @return the <code>Date</code> representing <em>alos</em>. If the calculation can't be computed such as northern
910         *         and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun
911         *         may not reach low enough below the horizon for this calculation, a null will be returned. See detailed
912         *         explanation on top of the {@link AstronomicalCalendar} documentation.
913         * @see #ZENITH_26_DEGREES
914         * @see #getAlos120()
915         * @see #getTzais120()
916         */
917        public Date getAlos26Degrees() {
918                return getSunriseOffsetByDegrees(ZENITH_26_DEGREES);
919        }
920
921        /**
922         * A method to return <em>alos</em> (dawn) calculated when the sun is {@link #ASTRONOMICAL_ZENITH 18&deg;} below the
923         * eastern geometric horizon before sunrise.
924         * 
925         * @return the <code>Date</code> representing <em>alos</em>. If the calculation can't be computed such as northern
926         *         and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun
927         *         may not reach low enough below the horizon for this calculation, a null will be returned. See detailed
928         *         explanation on top of the {@link AstronomicalCalendar} documentation.
929         * @see #ASTRONOMICAL_ZENITH
930         */
931        public Date getAlos18Degrees() {
932                return getSunriseOffsetByDegrees(ASTRONOMICAL_ZENITH);
933        }
934        
935        /**
936         * A method to return <em>alos</em> (dawn) calculated when the sun is {@link #ZENITH_19_DEGREES 19&deg;} below the
937         * eastern geometric horizon before sunrise. This is the <em><a href="https://en.wikipedia.org/wiki/Maimonides"
938         * >Rambam</a></em>'s alos according to Rabbi Moshe Kosower's <a href=
939         * "http://www.worldcat.org/oclc/145454098">Maaglei Tzedek</a>, page 88, <a href=
940         * "http://www.hebrewbooks.org/pdfpager.aspx?req=33464&amp;pgnum=13">Ayeles Hashachar Vol. I, page 12</a>, <a href=
941         * "http://www.hebrewbooks.org/pdfpager.aspx?req=55960&amp;pgnum=258">Yom Valayla Shel Torah, Ch. 34, p. 222</a> and 
942         * Rabbi Yaakov Shakow's <a href="http://www.worldcat.org/oclc/1043573513">Luach Ikvei Hayom</a>.
943         * 
944         * @return the <code>Date</code> representing <em>alos</em>. If the calculation can't be computed such as northern
945         *         and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun
946         *         may not reach low enough below the horizon for this calculation, a null will be returned. See detailed
947         *         explanation on top of the {@link AstronomicalCalendar} documentation.
948         * @see #ASTRONOMICAL_ZENITH
949         */
950        public Date getAlos19Degrees() {
951                return getSunriseOffsetByDegrees(ZENITH_19_DEGREES);
952        }
953
954        /**
955         * Method to return <em>alos</em> (dawn) calculated when the sun is {@link #ZENITH_19_POINT_8 19.8&deg;} below the
956         * eastern geometric horizon before sunrise. This calculation is based on the same calculation of
957         * {@link #getAlos90() 90 minutes} but uses a degree based calculation instead of 90 exact minutes. This calculation
958         * is based on the position of the sun 90 minutes before sunrise in Jerusalem during the equinox (on March 16,
959         * about 4 days before the astronomical equinox, the day that a solar hour is 60 minutes) which calculates to
960         * 19.8&deg; below {@link #GEOMETRIC_ZENITH geometric zenith}
961         * 
962         * @return the <code>Date</code> representing <em>alos</em>. If the calculation can't be computed such as northern
963         *         and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun
964         *         may not reach low enough below the horizon for this calculation, a null will be returned. See detailed
965         *         explanation on top of the {@link AstronomicalCalendar} documentation.
966         * @see #ZENITH_19_POINT_8
967         * @see #getAlos90()
968         */
969        public Date getAlos19Point8Degrees() {
970                return getSunriseOffsetByDegrees(ZENITH_19_POINT_8);
971        }
972
973        /**
974         * Method to return <em>alos</em> (dawn) calculated when the sun is {@link #ZENITH_16_POINT_1 16.1&deg;} below the
975         * eastern geometric horizon before sunrise. This calculation is based on the same calculation of
976         * {@link #getAlos72() 72 minutes} but uses a degree based calculation instead of 72 exact minutes. This calculation
977         * is based on the position of the sun 72 minutes before sunrise in Jerusalem during the equinox (on March 16,
978         * about 4 days before the astronomical equinox, the day that a solar hour is 60 minutes) which calculates to
979         * 16.1&deg; below {@link #GEOMETRIC_ZENITH geometric zenith}.
980         * 
981         * @return the <code>Date</code> representing <em>alos</em>. If the calculation can't be computed such as northern
982         *         and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun
983         *         may not reach low enough below the horizon for this calculation, a null will be returned. See detailed
984         *         explanation on top of the {@link AstronomicalCalendar} documentation.
985         * @see #ZENITH_16_POINT_1
986         * @see #getAlos72()
987         */
988        public Date getAlos16Point1Degrees() {
989                return getSunriseOffsetByDegrees(ZENITH_16_POINT_1);
990        }
991
992        /**
993         * This method returns <em>misheyakir</em> based on the position of the sun when it is {@link #ZENITH_11_DEGREES
994         * 11.5&deg;} below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for calculating
995         * <em>misheyakir</em> according to some opinions. This calculation is based on the position of the sun 52 minutes
996         * before {@link #getSunrise sunrise} in Jerusalem during the equinox (on March 16, about 4 days before the
997         * astronomical equinox, the day that a solar hour is 60 minutes) which calculates to 11.5&deg; below
998         * {@link #GEOMETRIC_ZENITH geometric zenith}
999         * 
1000         * @return the <code>Date</code> of <em>misheyakir</em>. If the calculation can't be computed such as northern and
1001         *         southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may
1002         *         not reach low enough below the horizon for this calculation, a null will be returned. See detailed
1003         *         explanation on top of the {@link AstronomicalCalendar} documentation.
1004         * @see #ZENITH_11_POINT_5
1005         */
1006        public Date getMisheyakir11Point5Degrees() {
1007                return getSunriseOffsetByDegrees(ZENITH_11_POINT_5);
1008        }
1009
1010        /**
1011         * This method returns <em>misheyakir</em> based on the position of the sun when it is {@link #ZENITH_11_DEGREES
1012         * 11&deg;} below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for calculating
1013         * <em>misheyakir</em> according to some opinions. This calculation is based on the position of the sun 48 minutes
1014         * before {@link #getSunrise sunrise} in Jerusalem during the equinox (on March 16, about 4 days before the
1015         * astronomical equinox, the day that a solar hour is 60 minutes) which calculates to 11&deg; below
1016         * {@link #GEOMETRIC_ZENITH geometric zenith}
1017         * 
1018         * @return If the calculation can't be computed such as northern and southern locations even south of the Arctic
1019         *         Circle and north of the Antarctic Circle where the sun may not reach low enough below the horizon for
1020         *         this calculation, a null will be returned. See detailed explanation on top of the
1021         *         {@link AstronomicalCalendar} documentation.
1022         * @see #ZENITH_11_DEGREES
1023         */
1024        public Date getMisheyakir11Degrees() {
1025                return getSunriseOffsetByDegrees(ZENITH_11_DEGREES);
1026        }
1027
1028        /**
1029         * This method returns <em>misheyakir</em> based on the position of the sun when it is {@link #ZENITH_10_POINT_2
1030         * 10.2&deg;} below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is used for calculating
1031         * <em>misheyakir</em> according to some opinions. This calculation is based on the position of the sun 45 minutes
1032         * before {@link #getSunrise sunrise} in Jerusalem during the equinox (on March 16, about 4 days before the
1033         * astronomical equinox, the day that a solar hour is 60 minutes) which calculates to 10.2&deg; below
1034         * {@link #GEOMETRIC_ZENITH geometric zenith}
1035         * 
1036         * @return the <code>Date</code> of <em>misheyakir</em>. If the calculation can't be computed such as
1037         *         northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where
1038         *         the sun may not reach low enough below the horizon for this calculation, a null will be returned. See
1039         *         detailed explanation on top of the {@link AstronomicalCalendar} documentation.
1040         * @see #ZENITH_10_POINT_2
1041         */
1042        public Date getMisheyakir10Point2Degrees() {
1043                return getSunriseOffsetByDegrees(ZENITH_10_POINT_2);
1044        }
1045        
1046        /**
1047         * This method returns <em>misheyakir</em> based on the position of the sun when it is {@link #ZENITH_7_POINT_65
1048         * 7.65&deg;} below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). The degrees are based on a 35/36 minute zman
1049         * during the equinox (on March 16, about 4 days before the astronomical equinox, the day that a solar hour is 60
1050         * minutes) when the <em>neshef</em> (twilight) is the shortest. This time is based on <a href=
1051         * "https://en.wikipedia.org/wiki/Moshe_Feinstein">Rabbi Moshe Feinstein</a> who writes in <a href=
1052         * "http://www.hebrewbooks.org/pdfpager.aspx?req=14677&amp;pgnum=7">Ohr Hachaim Vol. 4, Ch. 6</a>)
1053         * that misheyakir in New York is 35-40 minutes before sunset, something that is a drop less than 8&deg;.
1054         * <a href="https://en.wikipedia.org/wiki/Yisroel_Taplin">Rabbi Yisroel Taplin</a> in <a href=
1055         * "http://www.worldcat.org/oclc/889556744">Zmanei Yisrael</a> (page 117) notes that <a href=
1056         * "https://en.wikipedia.org/wiki/Yaakov_Kamenetsky">Rabbi Yaakov Kamenetsky</a> stated that it is not less than 36
1057         * minutes before sunrise (maybe it is 40 minutes). Sefer Yisrael Vehazmanim (p. 7) quotes the Tamar Yifrach
1058         * in the name of the <a href="https://en.wikipedia.org/wiki/Joel_Teitelbaum">Satmar Rov</a> that one should be stringent
1059         * not consider misheyakir before 36 minutes. This is also the accepted <a href="https://en.wikipedia.org/wiki/Minhag">minhag</a>
1060         * in <a href="https://en.wikipedia.org/wiki/Lakewood_Township,_New_Jersey">Lakewood</a> that is used in the <a href=
1061         * "https://en.wikipedia.org/wiki/Beth_Medrash_Govoha">Yeshiva</a>. This follows the opinion of <a href=
1062         * "https://en.wikipedia.org/wiki/Shmuel_Kamenetsky">Rabbi Shmuel Kamenetsky</a> who provided the time of 35/36 minutes,
1063         * but did not provide a degree based time. Since this zman depends on the level of light, Rabbi Yaakov Shakow presented
1064         * this degree based calculations to Rabbi Kamenetsky who agreed to them.
1065         * 
1066         * @return the <code>Date</code> of <em>misheyakir</em>. If the calculation can't be computed such as
1067         *         northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where
1068         *         the sun may not reach low enough below the horizon for this calculation, a null will be returned. See
1069         *         detailed explanation on top of the {@link AstronomicalCalendar} documentation.
1070         * 
1071         * @see #ZENITH_7_POINT_65
1072         * @see #getMisheyakir9Point5Degrees()
1073         */
1074        public Date getMisheyakir7Point65Degrees() {
1075                return getSunriseOffsetByDegrees(ZENITH_7_POINT_65);
1076        }
1077        
1078        /**
1079         * This method returns <em>misheyakir</em> based on the position of the sun when it is {@link #ZENITH_9_POINT_5
1080         * 9.5&deg;} below {@link #GEOMETRIC_ZENITH geometric zenith} (90&deg;). This calculation is based on Rabbi Dovid Kronglass's
1081         * Calculation of 45 minutes in Baltimore as mentioned in <a href=
1082         * "http://www.hebrewbooks.org/pdfpager.aspx?req=20287&amp;pgnum=29">Divrei Chachamim No. 24</a> brought down by the <a href=
1083         * "http://www.hebrewbooks.org/pdfpager.aspx?req=50535&amp;pgnum=87">Birur Halacha, Tinyana, Ch. 18</a>. This calculates to
1084         * 9.5&deg;. Also see <a href="https://en.wikipedia.org/wiki/Jacob_Isaac_Neiman">Rabbi Yaakov Yitzchok Neiman</a> in Kovetz
1085         * Eitz Chaim Vol. 9, p. 202 that the Vyaan Yosef did not want to rely on times earlier than 45 minutes in New York. This
1086         * <em>zman</em> is also used in the calendars published by Rabbi Hershel Edelstein. As mentioned in the <em>Yisroel
1087         * Vehazmanim</em>,  Rabbi Edelstein who was given the 45 minute zman by Rabbi Bick. The calendars published by the
1088         * <em><a href="https://en.wikipedia.org/wiki/Mizrahi_Jews">Edot Hamizrach</a></em> communities also use this zman. This also
1089         * follows the opinion of <a href="https://en.wikipedia.org/wiki/Shmuel_Kamenetsky">Rabbi Shmuel Kamenetsky</a> who provided
1090         * the time of 36 and 45 minutes, but did not provide a degree based time. Since this zman depends on the level of light,
1091         * Rabbi Yaakov Shakow presented these degree based times to Rabbi Shmuel Kamenetsky who agreed to them.
1092         * 
1093         * @return the <code>Date</code> of <em>misheyakir</em>. If the calculation can't be computed such as
1094         *         northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where
1095         *         the sun may not reach low enough below the horizon for this calculation, a null will be returned. See
1096         *         detailed explanation on top of the {@link AstronomicalCalendar} documentation.
1097         * 
1098         * @see #ZENITH_9_POINT_5
1099         * @see #getMisheyakir7Point65Degrees()
1100         */
1101        public Date getMisheyakir9Point5Degrees() {
1102                return getSunriseOffsetByDegrees(ZENITH_9_POINT_5);
1103        }
1104
1105        /**
1106         * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the
1107         * opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based
1108         * on <em>alos</em> being {@link #getAlos19Point8Degrees() 19.8&deg;} before {@link #getSunrise() sunrise}. This
1109         * time is 3 <em>{@link #getShaahZmanis19Point8Degrees() shaos zmaniyos}</em> (solar hours) after {@link
1110         * #getAlos19Point8Degrees() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from dawn to
1111         * nightfall with both being 19.8&deg; below sunrise or sunset. This returns the time of 3 *
1112         * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.
1113         * 
1114         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1115         *         as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle
1116         *         where the sun may not reach low enough below the horizon for this calculation, a null will be returned.
1117         *         See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
1118         * @see #getShaahZmanis19Point8Degrees()
1119         * @see #getAlos19Point8Degrees()
1120         */
1121        public Date getSofZmanShmaMGA19Point8Degrees() {
1122                return getSofZmanShma(getAlos19Point8Degrees(), getTzais19Point8Degrees());
1123        }
1124
1125        /**
1126         * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the
1127         * opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based
1128         * on <em>alos</em> being {@link #getAlos16Point1Degrees() 16.1&deg;} before {@link #getSunrise() sunrise}. This time
1129         * is 3 <em>{@link #getShaahZmanis16Point1Degrees() shaos zmaniyos}</em> (solar hours) after
1130         * {@link #getAlos16Point1Degrees() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from
1131         * dawn to nightfall with both being 16.1&deg; below sunrise or sunset. This returns the time of
1132         * 3 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.
1133         * 
1134         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1135         *         as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle
1136         *         where the sun may not reach low enough below the horizon for this calculation, a null will be returned.
1137         *         See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
1138         * @see #getShaahZmanis16Point1Degrees()
1139         * @see #getAlos16Point1Degrees()
1140         */
1141        public Date getSofZmanShmaMGA16Point1Degrees() {
1142                return getSofZmanShma(getAlos16Point1Degrees(), getTzais16Point1Degrees());
1143        }
1144
1145        /**
1146         * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the
1147         * opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based
1148         * on <em>alos</em> being {@link #getAlos18Degrees() 18&deg;} before {@link #getSunrise() sunrise}. This time is 3
1149         * <em>{@link #getShaahZmanis18Degrees() shaos zmaniyos}</em> (solar hours) after {@link #getAlos18Degrees() dawn}
1150         * based on the opinion of the <em>MGA</em> that the day is calculated from dawn to nightfall with both being 18&deg;
1151         * below sunrise or sunset. This returns the time of 3 * {@link #getShaahZmanis18Degrees()} after
1152         * {@link #getAlos18Degrees() dawn}.
1153         * 
1154         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1155         *         as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle
1156         *         where the sun may not reach low enough below the horizon for this calculation, a null will be returned.
1157         *         See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
1158         * @see #getShaahZmanis18Degrees()
1159         * @see #getAlos18Degrees()
1160         */
1161        public Date getSofZmanShmaMGA18Degrees() {
1162                return getSofZmanShma(getAlos18Degrees(), getTzais18Degrees());
1163        }
1164
1165        /**
1166         * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the
1167         * opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos72() 72} minutes before
1168         * {@link #getSunrise() sunrise}. This time is 3 <em>{@link #getShaahZmanis72Minutes() shaos zmaniyos}</em> (solar
1169         * hours) after {@link #getAlos72() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a
1170         * {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link #getTzais72() nightfall} of 72 minutes after
1171         * sunset. This returns the time of 3 * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This
1172         * class returns an identical time to {@link #getSofZmanShmaMGA()} and is repeated here for clarity.
1173         * 
1174         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1175         *         as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where
1176         *         it does not set, a null will be returned. See detailed explanation on top of the
1177         *         {@link AstronomicalCalendar} documentation.
1178         * @see #getShaahZmanis72Minutes()
1179         * @see #getAlos72()
1180         * @see #getSofZmanShmaMGA()
1181         */
1182        public Date getSofZmanShmaMGA72Minutes() {
1183                return getSofZmanShmaMGA();
1184        }
1185
1186        /**
1187         * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the
1188         * opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based
1189         * on <em>alos</em> being {@link #getAlos72Zmanis() 72} minutes <em>zmaniyos</em>, or 1/10th of the day before
1190         * {@link #getSunrise() sunrise}. This time is 3 <em>{@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos}</em>
1191         * (solar hours) after {@link #getAlos72Zmanis() dawn} based on the opinion of the <em>MGA</em> that the day is
1192         * calculated from a {@link #getAlos72Zmanis() dawn} of 72 minutes <em>zmaniyos</em>, or 1/10th of the day before
1193         * {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getTzais72Zmanis() nightfall} of 72 minutes
1194         * <em>zmaniyos</em> after {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 3 *
1195         * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.
1196         * 
1197         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1198         *         as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where
1199         *         it does not set, a null will be returned. See detailed explanation on top of the
1200         *         {@link AstronomicalCalendar} documentation.
1201         * @see #getShaahZmanis72MinutesZmanis()
1202         * @see #getAlos72Zmanis()
1203         */
1204        public Date getSofZmanShmaMGA72MinutesZmanis() {
1205                return getSofZmanShma(getAlos72Zmanis(), getTzais72Zmanis());
1206        }
1207
1208        /**
1209         * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the
1210         * opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on
1211         * <em>alos</em> being {@link #getAlos90() 90} minutes before {@link #getSunrise() sunrise}. This time is 3
1212         * <em>{@link #getShaahZmanis90Minutes() shaos zmaniyos}</em> (solar hours) after {@link #getAlos90() dawn} based on
1213         * the opinion of the <em>MGA</em> that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before
1214         * sunrise to {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 3 *
1215         * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}.
1216         * 
1217         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1218         *         as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where
1219         *         it does not set, a null will be returned. See detailed explanation on top of the
1220         *         {@link AstronomicalCalendar} documentation.
1221         * @see #getShaahZmanis90Minutes()
1222         * @see #getAlos90()
1223         */
1224        public Date getSofZmanShmaMGA90Minutes() {
1225                return getSofZmanShma(getAlos90(), getTzais90());
1226        }
1227
1228        /**
1229         * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the
1230         * opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos90Zmanis() 90} minutes <em>zmaniyos</em>
1231         * before {@link #getSunrise() sunrise}. This time is 3
1232         * <em>{@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos}</em> (solar hours) after {@link #getAlos90Zmanis()
1233         * dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a {@link #getAlos90Zmanis() dawn}
1234         * of 90 minutes <em>zmaniyos</em> before sunrise to {@link #getTzais90Zmanis() nightfall} of 90 minutes
1235         * <em>zmaniyos</em> after sunset. This returns the time of 3 * {@link #getShaahZmanis90MinutesZmanis()} after
1236         * {@link #getAlos90Zmanis() dawn}.
1237         * 
1238         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1239         *         as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where
1240         *         it does not set, a null will be returned. See detailed explanation on top of the
1241         *         {@link AstronomicalCalendar} documentation.
1242         * @see #getShaahZmanis90MinutesZmanis()
1243         * @see #getAlos90Zmanis()
1244         */
1245        public Date getSofZmanShmaMGA90MinutesZmanis() {
1246                return getSofZmanShma(getAlos90Zmanis(), getTzais90Zmanis());
1247        }
1248
1249        /**
1250         * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the
1251         * opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos96() 96} minutes before
1252         * {@link #getSunrise() sunrise}. This time is 3 <em>{@link #getShaahZmanis96Minutes() shaos zmaniyos}</em> (solar
1253         * hours) after {@link #getAlos96() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a
1254         * {@link #getAlos96() dawn} of 96 minutes before sunrise to {@link #getTzais96() nightfall} of 96 minutes after
1255         * sunset. This returns the time of 3 * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}.
1256         * 
1257         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1258         *         as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where
1259         *         it does not set, a null will be returned. See detailed explanation on top of the
1260         *         {@link AstronomicalCalendar} documentation.
1261         * @see #getShaahZmanis96Minutes()
1262         * @see #getAlos96()
1263         */
1264        public Date getSofZmanShmaMGA96Minutes() {
1265                return getSofZmanShma(getAlos96(), getTzais96());
1266        }
1267
1268        /**
1269         * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the
1270         * opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos90Zmanis() 96} minutes <em>zmaniyos</em>
1271         * before {@link #getSunrise() sunrise}. This time is 3
1272         * <em>{@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos}</em> (solar hours) after {@link #getAlos96Zmanis()
1273         * dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a {@link #getAlos96Zmanis() dawn}
1274         * of 96 minutes <em>zmaniyos</em> before sunrise to {@link #getTzais90Zmanis() nightfall} of 96 minutes
1275         * <em>zmaniyos</em> after sunset. This returns the time of 3 * {@link #getShaahZmanis96MinutesZmanis()} after
1276         * {@link #getAlos96Zmanis() dawn}.
1277         * 
1278         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1279         *         as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where
1280         *         it does not set, a null will be returned. See detailed explanation on top of the
1281         *         {@link AstronomicalCalendar} documentation.
1282         * @see #getShaahZmanis96MinutesZmanis()
1283         * @see #getAlos96Zmanis()
1284         */
1285        public Date getSofZmanShmaMGA96MinutesZmanis() {
1286                return getSofZmanShma(getAlos96Zmanis(), getTzais96Zmanis());
1287        }
1288
1289        /**
1290         * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) calculated as 3
1291         * hours (regular and not zmaniyos) before {@link ZmanimCalendar#getChatzos()}. This is the opinion of the
1292         * <em>Shach</em> in the <em>Nekudas Hakesef (Yora Deah 184), Shevus Yaakov, Chasan Sofer</em> and others. This
1293         * returns the time of 3 hours before {@link ZmanimCalendar#getChatzos()}. 
1294         * @todo Add hyperlinks to documentation
1295         * 
1296         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1297         *         as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where
1298         *         it does not set, a null will be returned. See detailed explanation on top of the
1299         *         {@link AstronomicalCalendar} documentation.
1300         * @see ZmanimCalendar#getChatzos()
1301         * @see #getSofZmanTfila2HoursBeforeChatzos()
1302         */
1303        public Date getSofZmanShma3HoursBeforeChatzos() {
1304                return getTimeOffset(getChatzos(), -180 * MINUTE_MILLIS);
1305        }
1306
1307        /**
1308         * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the
1309         * opinion of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos120() 120} minutes or 1/6th of the day
1310         * before {@link #getSunrise() sunrise}. This time is 3 <em>{@link #getShaahZmanis120Minutes() shaos zmaniyos}</em>
1311         * (solar hours) after {@link #getAlos120() dawn} based on the opinion of the <em>MGA</em> that the day is
1312         * calculated from a {@link #getAlos120() dawn} of 120 minutes before sunrise to {@link #getTzais120() nightfall} of
1313         * 120 minutes after sunset. This returns the time of 3 * {@link #getShaahZmanis120Minutes()} after
1314         * {@link #getAlos120() dawn}.
1315         * 
1316         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1317         *         as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where
1318         *         it does not set, a null will be returned. See detailed explanation on top of the
1319         *         {@link AstronomicalCalendar} documentation.
1320         * @see #getShaahZmanis120Minutes()
1321         * @see #getAlos120()
1322         */
1323        public Date getSofZmanShmaMGA120Minutes() {
1324                return getSofZmanShma(getAlos120(), getTzais120());
1325        }
1326
1327        /**
1328         * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) based on the
1329         * opinion that the day starts at <em>{@link #getAlos16Point1Degrees() alos 16.1&deg;}</em> and ends at
1330         * {@link #getSeaLevelSunset() sea level sunset}. 3 shaos zmaniyos are calculated based on this day and added to
1331         * {@link #getAlos16Point1Degrees() alos}to reach this time. This time is 3 <em>shaos zmaniyos</em> (solar hours)
1332         * after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a
1333         * <em>{@link #getAlos16Point1Degrees() alos 16.1&deg;}</em> to {@link #getSeaLevelSunset() sea level sunset}.
1334         * <b>Note: </b> Based on this calculation <em>chatzos</em> will not be at midday.
1335         * 
1336         * @return the <code>Date</code> of the latest <em>zman krias shema</em> based on this day. If the calculation can't
1337         *         be computed such as northern and southern locations even south of the Arctic Circle and north of the
1338         *         Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a null
1339         *         will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
1340         * @see #getAlos16Point1Degrees()
1341         * @see #getSeaLevelSunset()
1342         */
1343        public Date getSofZmanShmaAlos16Point1ToSunset() {
1344                return getSofZmanShma(getAlos16Point1Degrees(), getElevationAdjustedSunset());
1345        }
1346
1347        /**
1348         * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) based on the
1349         * opinion that the day starts at <em>{@link #getAlos16Point1Degrees() alos 16.1&deg;}</em> and ends at
1350         * <em> {@link #getTzaisGeonim7Point083Degrees() tzais 7.083&deg;}</em>. 3 <em>shaos zmaniyos</em> are calculated
1351         * based on this day and added to <em>{@link #getAlos16Point1Degrees() alos}</em> to reach this time. This time is 3
1352         * <em>shaos zmaniyos</em> (temporal hours) after <em>{@link #getAlos16Point1Degrees() alos 16.1&deg;}</em> based on
1353         * the opinion that the day is calculated from a <em>{@link #getAlos16Point1Degrees() alos 16.1&deg;}</em> to
1354         * <em>{@link #getTzaisGeonim7Point083Degrees() tzais 7.083&deg;}</em>.
1355         * <b>Note: </b> Based on this calculation <em>chatzos</em> will not be at midday.
1356         * 
1357         * @return the <code>Date</code> of the latest <em>zman krias shema</em> based on this calculation. If the
1358         *         calculation can't be computed such as northern and southern locations even south of the Arctic Circle and
1359         *         north of the Antarctic Circle where the sun may not reach low enough below the horizon for this
1360         *         calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
1361         *         documentation.
1362         * @see #getAlos16Point1Degrees()
1363         * @see #getTzaisGeonim7Point083Degrees()
1364         */
1365        public Date getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees() {
1366                return getSofZmanShma(getAlos16Point1Degrees(), getTzaisGeonim7Point083Degrees());
1367        }
1368
1369        /**
1370         * From the GRA in Kol Eliyahu on Berachos #173 that states that <em>zman krias shema</em> is calculated as half the
1371         * time from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getFixedLocalChatzos() fixed local chatzos}.
1372         * The GRA himself seems to contradict this when he stated that <em>zman krias shema</em> is 1/4 of the day from
1373         * sunrise to sunset. See <em>Sarah Lamoed</em> #25 in Yisroel Vehazmanim Vol. III page 1016.
1374         * 
1375         * @return the <code>Date</code> of the latest <em>zman krias shema</em> based on this calculation. If the
1376         *         calculation can't be computed such as in the Arctic Circle where there is at least one day a year where
1377         *         the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation
1378         *         on top of the {@link AstronomicalCalendar} documentation.
1379         * @see #getFixedLocalChatzos()
1380         * @deprecated As per a conversation Rabbi Yisroel Twerski had with Rabbi Harfenes, this zman published in the Yisrael
1381         *         Vehazmanim was based on a misunderstanding and should not be used. This deprecated will be removed pending
1382         *         confirmation from Rabbi Harfenes.
1383         */
1384        @Deprecated
1385        public Date getSofZmanShmaKolEliyahu() {
1386                Date chatzos = getFixedLocalChatzos();
1387                if (chatzos == null || getSunrise() == null) {
1388                        return null;
1389                }
1390                long diff = (chatzos.getTime() - getElevationAdjustedSunrise().getTime()) / 2;
1391                return getTimeOffset(chatzos, -diff);
1392        }
1393
1394        /**
1395         * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion
1396         * of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos19Point8Degrees() 19.8&deg;} before
1397         * {@link #getSunrise() sunrise}. This time is 4 <em>{@link #getShaahZmanis19Point8Degrees() shaos zmaniyos}</em>
1398         * (solar hours) after {@link #getAlos19Point8Degrees() dawn} based on the opinion of the <em>MGA</em> that the day
1399         * is calculated from dawn to nightfall with both being 19.8&deg; below sunrise or sunset. This returns the time of
1400         * 4 * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.
1401         * 
1402         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1403         *         as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle
1404         *         where the sun may not reach low enough below the horizon for this calculation, a null will be returned.
1405         *         See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
1406         * 
1407         * @see #getShaahZmanis19Point8Degrees()
1408         * @see #getAlos19Point8Degrees()
1409         */
1410        public Date getSofZmanTfilaMGA19Point8Degrees() {
1411                return getSofZmanTfila(getAlos19Point8Degrees(), getTzais19Point8Degrees());
1412        }
1413
1414        /**
1415         * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion
1416         * of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos16Point1Degrees() 16.1&deg;} before
1417         * {@link #getSunrise() sunrise}. This time is 4 <em>{@link #getShaahZmanis16Point1Degrees() shaos zmaniyos}</em>
1418         * (solar hours) after {@link #getAlos16Point1Degrees() dawn} based on the opinion of the <em>MGA</em> that the day
1419         * is calculated from dawn to nightfall with both being 16.1&deg; below sunrise or sunset. This returns the time of
1420         * 4 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.
1421         * 
1422         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1423         *         as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle
1424         *         where the sun may not reach low enough below the horizon for this calculation, a null will be returned.
1425         *         See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
1426         * 
1427         * @see #getShaahZmanis16Point1Degrees()
1428         * @see #getAlos16Point1Degrees()
1429         */
1430        public Date getSofZmanTfilaMGA16Point1Degrees() {
1431                return getSofZmanTfila(getAlos16Point1Degrees(), getTzais16Point1Degrees());
1432        }
1433
1434        /**
1435         * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion
1436         * of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos18Degrees() 18&deg;} before {@link #getSunrise()
1437         * sunrise}. This time is 4 <em>{@link #getShaahZmanis18Degrees() shaos zmaniyos}</em> (solar hours) after
1438         * {@link #getAlos18Degrees() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from dawn to
1439         * nightfall with both being 18&deg; below sunrise or sunset. This returns the time of 4 *
1440         * {@link #getShaahZmanis18Degrees()} after {@link #getAlos18Degrees() dawn}.
1441         * 
1442         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1443         *         as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle
1444         *         where the sun may not reach low enough below the horizon for this calculation, a null will be returned.
1445         *         See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
1446         * 
1447         * @see #getShaahZmanis18Degrees()
1448         * @see #getAlos18Degrees()
1449         */
1450        public Date getSofZmanTfilaMGA18Degrees() {
1451                return getSofZmanTfila(getAlos18Degrees(), getTzais18Degrees());
1452        }
1453
1454        /**
1455         * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion
1456         * of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos72() 72} minutes before {@link #getSunrise()
1457         * sunrise}. This time is 4 <em>{@link #getShaahZmanis72Minutes() shaos zmaniyos}</em> (solar hours) after
1458         * {@link #getAlos72() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a
1459         * {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link #getTzais72() nightfall} of 72 minutes after
1460         * sunset. This returns the time of 4 * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This
1461         * class returns an identical time to {@link #getSofZmanTfilaMGA()} and is repeated here for clarity.
1462         * 
1463         * @return the <code>Date</code> of the latest <em>zman tfila</em>. If the calculation can't be computed such as in
1464         *         the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
1465         *         does not set, a null will be returned. See detailed explanation on top of the
1466         *         {@link AstronomicalCalendar} documentation.
1467         * @see #getShaahZmanis72Minutes()
1468         * @see #getAlos72()
1469         * @see #getSofZmanShmaMGA()
1470         */
1471        public Date getSofZmanTfilaMGA72Minutes() {
1472                return getSofZmanTfilaMGA();
1473        }
1474
1475        /**
1476         * This method returns the latest <em>zman tfila</em> (time to the morning prayers) according to the opinion of the
1477         * <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos72Zmanis() 72} minutes <em>zmaniyos</em> before
1478         * {@link #getSunrise() sunrise}. This time is 4 <em>{@link #getShaahZmanis72MinutesZmanis() shaos zmaniyos}</em>
1479         * (solar hours) after {@link #getAlos72Zmanis() dawn} based on the opinion of the <em>MGA</em> that the day is
1480         * calculated from a {@link #getAlos72Zmanis() dawn} of 72 minutes <em>zmaniyos</em> before sunrise to
1481         * {@link #getTzais72Zmanis() nightfall} of 72 minutes <em>zmaniyos</em> after sunset. This returns the time of 4 *
1482         * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.
1483         * 
1484         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1485         *         as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where
1486         *         it does not set, a null will be returned. See detailed explanation on top of the
1487         *         {@link AstronomicalCalendar} documentation.
1488         * @see #getShaahZmanis72MinutesZmanis()
1489         * @see #getAlos72Zmanis()
1490         */
1491        public Date getSofZmanTfilaMGA72MinutesZmanis() {
1492                return getSofZmanTfila(getAlos72Zmanis(), getTzais72Zmanis());
1493        }
1494
1495        /**
1496         * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion
1497         * of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos90() 90} minutes before {@link #getSunrise()
1498         * sunrise}. This time is 4 <em>{@link #getShaahZmanis90Minutes() shaos zmaniyos}</em> (solar hours) after
1499         * {@link #getAlos90() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a
1500         * {@link #getAlos90() dawn} of 90 minutes before sunrise to {@link #getTzais90() nightfall} of 90 minutes after
1501         * sunset. This returns the time of 4 * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}.
1502         * 
1503         * @return the <code>Date</code> of the latest <em>zman tfila</em>. If the calculation can't be computed such as in
1504         *         the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
1505         *         does not set, a null will be returned. See detailed explanation on top of the
1506         *         {@link AstronomicalCalendar} documentation.
1507         * @see #getShaahZmanis90Minutes()
1508         * @see #getAlos90()
1509         */
1510        public Date getSofZmanTfilaMGA90Minutes() {
1511                return getSofZmanTfila(getAlos90(), getTzais90());
1512        }
1513
1514        /**
1515         * This method returns the latest <em>zman tfila</em> (time to the morning prayers) according to the opinion of the
1516         * <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos90Zmanis() 90} minutes <em>zmaniyos</em> before
1517         * {@link #getSunrise() sunrise}. This time is 4 <em>{@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos}</em>
1518         * (solar hours) after {@link #getAlos90Zmanis() dawn} based on the opinion of the <em>MGA</em> that the day is
1519         * calculated from a {@link #getAlos90Zmanis() dawn} of 90 minutes <em>zmaniyos</em> before sunrise to
1520         * {@link #getTzais90Zmanis() nightfall} of 90 minutes <em>zmaniyos</em> after sunset. This returns the time of 4 *
1521         * {@link #getShaahZmanis90MinutesZmanis()} after {@link #getAlos90Zmanis() dawn}.
1522         * 
1523         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1524         *         as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where
1525         *         it does not set, a null will be returned. See detailed explanation on top of the
1526         *         {@link AstronomicalCalendar} documentation.
1527         * @see #getShaahZmanis90MinutesZmanis()
1528         * @see #getAlos90Zmanis()
1529         */
1530        public Date getSofZmanTfilaMGA90MinutesZmanis() {
1531                return getSofZmanTfila(getAlos90Zmanis(), getTzais90Zmanis());
1532        }
1533
1534        /**
1535         * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion
1536         * of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos96() 96} minutes before {@link #getSunrise()
1537         * sunrise}. This time is 4 <em>{@link #getShaahZmanis96Minutes() shaos zmaniyos}</em> (solar hours) after
1538         * {@link #getAlos96() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a
1539         * {@link #getAlos96() dawn} of 96 minutes before sunrise to {@link #getTzais96() nightfall} of 96 minutes after
1540         * sunset. This returns the time of 4 * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}.
1541         * 
1542         * @return the <code>Date</code> of the latest <em>zman tfila</em>. If the calculation can't be computed such as in
1543         *         the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
1544         *         does not set, a null will be returned. See detailed explanation on top of the
1545         *         {@link AstronomicalCalendar} documentation.
1546         * @see #getShaahZmanis96Minutes()
1547         * @see #getAlos96()
1548         */
1549        public Date getSofZmanTfilaMGA96Minutes() {
1550                return getSofZmanTfila(getAlos96(), getTzais96());
1551        }
1552
1553        /**
1554         * This method returns the latest <em>zman tfila</em> (time to the morning prayers) according to the opinion of the
1555         * <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos96Zmanis() 96} minutes <em>zmaniyos</em> before
1556         * {@link #getSunrise() sunrise}. This time is 4 <em>{@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos}</em>
1557         * (solar hours) after {@link #getAlos96Zmanis() dawn} based on the opinion of the <em>MGA</em> that the day is
1558         * calculated from a {@link #getAlos96Zmanis() dawn} of 96 minutes <em>zmaniyos</em> before sunrise to
1559         * {@link #getTzais96Zmanis() nightfall} of 96 minutes <em>zmaniyos</em> after sunset. This returns the time of 4 *
1560         * {@link #getShaahZmanis96MinutesZmanis()} after {@link #getAlos96Zmanis() dawn}.
1561         * 
1562         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1563         *         as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where
1564         *         it does not set, a null will be returned. See detailed explanation on top of the
1565         *         {@link AstronomicalCalendar} documentation.
1566         * @see #getShaahZmanis90MinutesZmanis()
1567         * @see #getAlos90Zmanis()
1568         */
1569        public Date getSofZmanTfilaMGA96MinutesZmanis() {
1570                return getSofZmanTfila(getAlos96Zmanis(), getTzais96Zmanis());
1571        }
1572
1573        /**
1574         * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion
1575         * of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos120() 120} minutes before {@link #getSunrise()
1576         * sunrise} . This time is 4 <em>{@link #getShaahZmanis120Minutes() shaos zmaniyos}</em> (solar hours) after
1577         * {@link #getAlos120() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a
1578         * {@link #getAlos120() dawn} of 120 minutes before sunrise to {@link #getTzais120() nightfall} of 120 minutes after
1579         * sunset. This returns the time of 4 * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}.
1580         * 
1581         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1582         *         as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where
1583         *         it does not set, a null will be returned. See detailed explanation on top of the
1584         *         {@link AstronomicalCalendar} documentation.
1585         * @see #getShaahZmanis120Minutes()
1586         * @see #getAlos120()
1587         */
1588        public Date getSofZmanTfilaMGA120Minutes() {
1589                return getSofZmanTfila(getAlos120(), getTzais120());
1590        }
1591
1592        /**
1593         * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) calculated as 2 hours
1594         * before {@link ZmanimCalendar#getChatzos()}. This is based on the opinions that calculate
1595         * <em>sof zman krias shema</em> as {@link #getSofZmanShma3HoursBeforeChatzos()}. This returns the time of 2 hours
1596         * before {@link ZmanimCalendar#getChatzos()}.
1597         * 
1598         * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
1599         *         as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where
1600         *         it does not set, a null will be returned. See detailed explanation on top of the
1601         *         {@link AstronomicalCalendar} documentation.
1602         * @see ZmanimCalendar#getChatzos()
1603         * @see #getSofZmanShma3HoursBeforeChatzos()
1604         */
1605        public Date getSofZmanTfila2HoursBeforeChatzos() {
1606                return getTimeOffset(getChatzos(), -120 * MINUTE_MILLIS);
1607        }
1608
1609        /**
1610         * This method returns mincha gedola calculated as 30 minutes after <em>{@link #getChatzos() chatzos}</em> and not
1611         * 1/2 of a <em>{@link #getShaahZmanisGra() shaah zmanis}</em> after <em>{@link #getChatzos() chatzos}</em> as
1612         * calculated by {@link #getMinchaGedola}. Some use this time to delay the start of mincha in the winter when 1/2 of
1613         * a <em>{@link #getShaahZmanisGra() shaah zmanis}</em> is less than 30 minutes. See
1614         * {@link #getMinchaGedolaGreaterThan30()}for a convenience method that returns the later of the 2 calculations. One
1615         * should not use this time to start <em>mincha</em> before the standard
1616         * <em>{@link #getMinchaGedola() mincha gedola}</em>. See <em>Shulchan Aruch
1617         * Orach Chayim Siman Raish Lamed Gimel seif alef</em> and the <em>Shaar Hatziyon seif katan ches</em>.
1618         * @todo Add hyperlinks to documentation.
1619         * 
1620         * @return the <code>Date</code> of 30 minutes after <em>chatzos</em>. If the calculation can't be computed such as
1621         *         in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
1622         *         does not set, a null will be returned. See detailed explanation on top of the
1623         *         {@link AstronomicalCalendar} documentation.
1624         * @see #getMinchaGedola()
1625         * @see #getMinchaGedolaGreaterThan30()
1626         */
1627        public Date getMinchaGedola30Minutes() {
1628                return getTimeOffset(getChatzos(), MINUTE_MILLIS * 30);
1629        }
1630
1631        /**
1632         * This method returns the time of <em>mincha gedola</em> according to the Magen Avraham with the day starting 72
1633         * minutes before sunrise and ending 72 minutes after sunset. This is the earliest time to pray <em>mincha</em>. For
1634         * more information on this see the documentation on <em>{@link #getMinchaGedola() mincha gedola}</em>. This is
1635         * calculated as 6.5 {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *
1636         * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}.
1637         * 
1638         * @see #getAlos72()
1639         * @see #getMinchaGedola()
1640         * @see #getMinchaKetana()
1641         * @see ZmanimCalendar#getMinchaGedola()
1642         * @return the <code>Date</code> of the time of mincha gedola. If the calculation can't be computed such as in the
1643         *         Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
1644         *         not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
1645         *         documentation.
1646         */
1647        public Date getMinchaGedola72Minutes() {
1648                return getMinchaGedola(getAlos72(), getTzais72());
1649        }
1650
1651        /**
1652         * This method returns the time of <em>mincha gedola</em> according to the Magen Avraham with the day starting and
1653         * ending 16.1&deg; below the horizon. This is the earliest time to pray <em>mincha</em>. For more information on
1654         * this see the documentation on <em>{@link #getMinchaGedola() mincha gedola}</em>. This is calculated as 6.5
1655         * {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *
1656         * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}.
1657         * 
1658         * @see #getShaahZmanis16Point1Degrees()
1659         * @see #getMinchaGedola()
1660         * @see #getMinchaKetana()
1661         * @return the <code>Date</code> of the time of mincha gedola. If the calculation can't be computed such as northern
1662         *         and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun
1663         *         may not reach low enough below the horizon for this calculation, a null will be returned. See detailed
1664         *         explanation on top of the {@link AstronomicalCalendar} documentation.
1665         */
1666        public Date getMinchaGedola16Point1Degrees() {
1667                return getMinchaGedola(getAlos16Point1Degrees(), getTzais16Point1Degrees());
1668        }
1669
1670        /**
1671         * This is a convenience method that returns the later of {@link #getMinchaGedola()} and
1672         * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a <em>{@link #getShaahZmanisGra() shaah zmanis}</em> is
1673         * less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise {@link #getMinchaGedola()}
1674         * will be returned.
1675         * 
1676         * @return the <code>Date</code> of the later of {@link #getMinchaGedola()} and {@link #getMinchaGedola30Minutes()}.
1677         *         If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year
1678         *         where the sun does not rise, and one where it does not set, a null will be returned. See detailed
1679         *         explanation on top of the {@link AstronomicalCalendar} documentation.
1680         */
1681        public Date getMinchaGedolaGreaterThan30() {
1682                if (getMinchaGedola30Minutes() == null || getMinchaGedola() == null) {
1683                        return null;
1684                } else {
1685                        return getMinchaGedola30Minutes().compareTo(getMinchaGedola()) > 0 ? getMinchaGedola30Minutes()
1686                                        : getMinchaGedola();
1687                }
1688        }
1689
1690        /**
1691         * This method returns the time of <em>mincha ketana</em> according to the <em>Magen Avraham</em> with the day
1692         * starting and ending 16.1&deg; below the horizon. This is the preferred earliest time to pray <em>mincha</em>
1693         * according to the opinion of the <em><a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a></em> and others.
1694         * For more information on this see the documentation on <em>{@link #getMinchaGedola() mincha gedola}</em>. This is
1695         * calculated as 9.5 {@link #getTemporalHour() solar hours} after alos. The calculation used is 9.5 *
1696         * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}.
1697         * 
1698         * @see #getShaahZmanis16Point1Degrees()
1699         * @see #getMinchaGedola()
1700         * @see #getMinchaKetana()
1701         * @return the <code>Date</code> of the time of mincha ketana. If the calculation can't be computed such as northern
1702         *         and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun
1703         *         may not reach low enough below the horizon for this calculation, a null will be returned. See detailed
1704         *         explanation on top of the {@link AstronomicalCalendar} documentation.
1705         */
1706        public Date getMinchaKetana16Point1Degrees() {
1707                return getMinchaKetana(getAlos16Point1Degrees(), getTzais16Point1Degrees());
1708        }
1709
1710        /**
1711         * This method returns the time of <em>mincha ketana</em> according to the <em>Magen Avraham</em> with the day
1712         * starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the preferred earliest time to pray
1713         * <em>mincha</em> according to the opinion of the <em><a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a></em>
1714         * and others. For more information on this see the documentation on <em>{@link #getMinchaGedola() mincha gedola}</em>.
1715         * This is calculated as 9.5 {@link #getShaahZmanis72Minutes()} after <em>alos</em>. The calculation used is 9.5 *
1716         * {@link #getShaahZmanis72Minutes()} after <em>{@link #getAlos72() alos}</em>.
1717         * 
1718         * @see #getShaahZmanis16Point1Degrees()
1719         * @see #getMinchaGedola()
1720         * @see #getMinchaKetana()
1721         * @return the <code>Date</code> of the time of mincha ketana. If the calculation can't be computed such as in the
1722         *         Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
1723         *         not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
1724         *         documentation.
1725         */
1726        public Date getMinchaKetana72Minutes() {
1727                return getMinchaKetana(getAlos72(), getTzais72());
1728        }
1729
1730        /**
1731         * This method returns the time of <em>plag hamincha</em> according to the <em>Magen Avraham</em> with the day
1732         * starting 60 minutes before sunrise and ending 60 minutes after sunset. This is calculated as 10.75 hours after
1733         * {@link #getAlos60() dawn}. The formula used is
1734         * 10.75 {@link #getShaahZmanis60Minutes()} after {@link #getAlos60()}.
1735         * 
1736         * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as
1737         *         in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
1738         *         does not set, a null will be returned. See detailed explanation on top of the
1739         *         {@link AstronomicalCalendar} documentation.
1740         * 
1741         * @see #getShaahZmanis60Minutes()
1742         */
1743        public Date getPlagHamincha60Minutes() {
1744                return getPlagHamincha(getAlos60(), getTzais60());
1745        }
1746
1747        /**
1748         * This method returns the time of <em>plag hamincha</em> according to the <em>Magen Avraham</em> with the day
1749         * starting 72 minutes before sunrise and ending 72 minutes after sunset. This is calculated as 10.75 hours after
1750         * {@link #getAlos72() dawn}. The formula used is
1751         * 10.75 {@link #getShaahZmanis72Minutes()} after {@link #getAlos72()}.
1752         * 
1753         * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as
1754         *         in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
1755         *         does not set, a null will be returned. See detailed explanation on top of the
1756         *         {@link AstronomicalCalendar} documentation.
1757         * 
1758         * @see #getShaahZmanis72Minutes()
1759         */
1760        public Date getPlagHamincha72Minutes() {
1761                return getPlagHamincha(getAlos72(), getTzais72());
1762        }
1763
1764        /**
1765         * This method returns the time of <em>plag hamincha</em> according to the <em>Magen Avraham</em> with the day
1766         * starting 90 minutes before sunrise and ending 90 minutes after sunset. This is calculated as 10.75 hours after
1767         * {@link #getAlos90() dawn}. The formula used is
1768         * 10.75 {@link #getShaahZmanis90Minutes()} after {@link #getAlos90()}.
1769         * 
1770         * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as
1771         *         in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
1772         *         does not set, a null will be returned. See detailed explanation on top of the
1773         *         {@link AstronomicalCalendar} documentation.
1774         * 
1775         * @see #getShaahZmanis90Minutes()
1776         */
1777        public Date getPlagHamincha90Minutes() {
1778                return getPlagHamincha(getAlos90(), getTzais90());
1779        }
1780
1781        /**
1782         * This method returns the time of <em>plag hamincha</em> according to the <em>Magen Avraham</em> with the day
1783         * starting 96 minutes before sunrise and ending 96 minutes after sunset. This is calculated as 10.75 hours after
1784         * {@link #getAlos96() dawn}. The formula used is
1785         * 10.75 {@link #getShaahZmanis96Minutes()} after {@link #getAlos96()}.
1786         * 
1787         * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as
1788         *         in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
1789         *         does not set, a null will be returned. See detailed explanation on top of the
1790         *         {@link AstronomicalCalendar} documentation.
1791         * @see #getShaahZmanis96Minutes()
1792         */
1793        public Date getPlagHamincha96Minutes() {
1794                return getPlagHamincha(getAlos96(), getTzais96());
1795        }
1796
1797        /**
1798         * This method returns the time of <em>plag hamincha</em>. This is calculated as 10.75 hours after
1799         * {@link #getAlos96Zmanis() dawn}. The formula used is
1800         * 10.75 * {@link #getShaahZmanis96MinutesZmanis()} after {@link #getAlos96Zmanis() dawn}.
1801         * 
1802         * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as
1803         *         in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
1804         *         does not set, a null will be returned. See detailed explanation on top of the
1805         *         {@link AstronomicalCalendar} documentation.
1806         */
1807        public Date getPlagHamincha96MinutesZmanis() {
1808                return getPlagHamincha(getAlos96Zmanis(), getTzais96Zmanis());
1809        }
1810
1811        /**
1812         * This method returns the time of <em>plag hamincha</em>. This is calculated as 10.75 hours after
1813         * {@link #getAlos90Zmanis() dawn}. The formula used is
1814         * 10.75 * {@link #getShaahZmanis90MinutesZmanis()} after {@link #getAlos90Zmanis() dawn}.
1815         * 
1816         * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as
1817         *         in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
1818         *         does not set, a null will be returned. See detailed explanation on top of the
1819         *         {@link AstronomicalCalendar} documentation.
1820         */
1821        public Date getPlagHamincha90MinutesZmanis() {
1822                return getPlagHamincha(getAlos90Zmanis(), getTzais90Zmanis());
1823        }
1824
1825        /**
1826         * This method returns the time of <em>plag hamincha</em>. This is calculated as 10.75 hours after
1827         * {@link #getAlos72Zmanis() dawn}. The formula used is
1828         * 10.75 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.
1829         * 
1830         * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as
1831         *         in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
1832         *         does not set, a null will be returned. See detailed explanation on top of the
1833         *         {@link AstronomicalCalendar} documentation.
1834         */
1835        public Date getPlagHamincha72MinutesZmanis() {
1836                return getPlagHamincha(getAlos72Zmanis(), getTzais72Zmanis());
1837        }
1838
1839        /**
1840         * This method returns the time of <em>plag hamincha</em> based on the opinion that the day starts at
1841         * <em>{@link #getAlos16Point1Degrees() alos 16.1&deg;}</em> and ends at
1842         * <em>{@link #getTzais16Point1Degrees() tzais 16.1&deg;}</em>. This is calculated as 10.75 hours <em>zmaniyos</em>
1843         * after {@link #getAlos16Point1Degrees() dawn}. The formula used is
1844         * 10.75 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees()}.
1845         * 
1846         * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as
1847         *         northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where
1848         *         the sun may not reach low enough below the horizon for this calculation, a null will be returned. See
1849         *         detailed explanation on top of the {@link AstronomicalCalendar} documentation.
1850         * 
1851         * @see #getShaahZmanis16Point1Degrees()
1852         */
1853        public Date getPlagHamincha16Point1Degrees() {
1854                return getPlagHamincha(getAlos16Point1Degrees(), getTzais16Point1Degrees());
1855        }
1856
1857        /**
1858         * This method returns the time of <em>plag hamincha</em> based on the opinion that the day starts at
1859         * <em>{@link #getAlos19Point8Degrees() alos 19.8&deg;}</em> and ends at
1860         * <em>{@link #getTzais19Point8Degrees() tzais 19.8&deg;}</em>. This is calculated as 10.75 hours <em>zmaniyos</em>
1861         * after {@link #getAlos19Point8Degrees() dawn}. The formula used is
1862         * 10.75 * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees()}.
1863         * 
1864         * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as
1865         *         northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where
1866         *         the sun may not reach low enough below the horizon for this calculation, a null will be returned. See
1867         *         detailed explanation on top of the {@link AstronomicalCalendar} documentation.
1868         * 
1869         * @see #getShaahZmanis19Point8Degrees()
1870         */
1871        public Date getPlagHamincha19Point8Degrees() {
1872                return getPlagHamincha(getAlos19Point8Degrees(), getTzais19Point8Degrees());
1873        }
1874
1875        /**
1876         * This method returns the time of <em>plag hamincha</em> based on the opinion that the day starts at
1877         * <em>{@link #getAlos26Degrees() alos 26&deg;}</em> and ends at <em>{@link #getTzais26Degrees() tzais 26&deg;}</em>
1878         * . This is calculated as 10.75 hours <em>zmaniyos</em> after {@link #getAlos26Degrees() dawn}. The formula used is
1879         * 10.75 * {@link #getShaahZmanis26Degrees()} after {@link #getAlos26Degrees()}.
1880         * 
1881         * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as
1882         *         northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where
1883         *         the sun may not reach low enough below the horizon for this calculation, a null will be returned. See
1884         *         detailed explanation on top of the {@link AstronomicalCalendar} documentation.
1885         * 
1886         * @see #getShaahZmanis26Degrees()
1887         */
1888        public Date getPlagHamincha26Degrees() {
1889                return getPlagHamincha(getAlos26Degrees(), getTzais26Degrees());
1890        }
1891
1892        /**
1893         * This method returns the time of <em>plag hamincha</em> based on the opinion that the day starts at
1894         * <em>{@link #getAlos18Degrees() alos 18&deg;}</em> and ends at <em>{@link #getTzais18Degrees() tzais 18&deg;}</em>
1895         * . This is calculated as 10.75 hours <em>zmaniyos</em> after {@link #getAlos18Degrees() dawn}. The formula used is
1896         * 10.75 * {@link #getShaahZmanis18Degrees()} after {@link #getAlos18Degrees()}.
1897         * 
1898         * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as
1899         *         northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where
1900         *         the sun may not reach low enough below the horizon for this calculation, a null will be returned. See
1901         *         detailed explanation on top of the {@link AstronomicalCalendar} documentation.
1902         * 
1903         * @see #getShaahZmanis18Degrees()
1904         */
1905        public Date getPlagHamincha18Degrees() {
1906                return getPlagHamincha(getAlos18Degrees(), getTzais18Degrees());
1907        }
1908
1909        /**
1910         * This method returns the time of <em>plag hamincha</em> based on the opinion that the day starts at
1911         * <em>{@link #getAlos16Point1Degrees() alos 16.1&deg;}</em> and ends at {@link #getSunset() sunset}. 10.75 shaos
1912         * zmaniyos are calculated based on this day and added to {@link #getAlos16Point1Degrees() alos} to reach this time.
1913         * This time is 10.75 <em>shaos zmaniyos</em> (temporal hours) after {@link #getAlos16Point1Degrees() dawn} based on
1914         * the opinion that the day is calculated from a {@link #getAlos16Point1Degrees() dawn} of 16.1 degrees before
1915         * sunrise to {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 10.75 * the calculated
1916         * <em>shaah zmanis</em> after {@link #getAlos16Point1Degrees() dawn}.
1917         * 
1918         * @return the <code>Date</code> of the plag. If the calculation can't be computed such as northern and southern
1919         *         locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach
1920         *         low enough below the horizon for this calculation, a null will be returned. See detailed explanation on
1921         *         top of the {@link AstronomicalCalendar} documentation.
1922         * 
1923         * @see #getAlos16Point1Degrees()
1924         * @see #getSeaLevelSunset()
1925         */
1926        public Date getPlagAlosToSunset() {
1927                return getPlagHamincha(getAlos16Point1Degrees(), getElevationAdjustedSunset());
1928        }
1929
1930        /**
1931         * This method returns the time of <em>plag hamincha</em> based on the opinion that the day starts at
1932         * <em>{@link #getAlos16Point1Degrees() alos 16.1&deg;}</em> and ends at {@link #getTzaisGeonim7Point083Degrees()
1933         * tzais}. 10.75 shaos zmaniyos are calculated based on this day and added to {@link #getAlos16Point1Degrees() alos}
1934         * to reach this time. This time is 10.75 <em>shaos zmaniyos</em> (temporal hours) after
1935         * {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a
1936         * {@link #getAlos16Point1Degrees() dawn} of 16.1 degrees before sunrise to
1937         * {@link #getTzaisGeonim7Point083Degrees() tzais} . This returns the time of 10.75 * the calculated
1938         * <em>shaah zmanis</em> after {@link #getAlos16Point1Degrees() dawn}.
1939         * 
1940         * @return the <code>Date</code> of the plag. If the calculation can't be computed such as northern and southern
1941         *         locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach
1942         *         low enough below the horizon for this calculation, a null will be returned. See detailed explanation on
1943         *         top of the {@link AstronomicalCalendar} documentation.
1944         * 
1945         * @see #getAlos16Point1Degrees()
1946         * @see #getTzaisGeonim7Point083Degrees()
1947         */
1948        public Date getPlagAlos16Point1ToTzaisGeonim7Point083Degrees() {
1949                return getPlagHamincha(getAlos16Point1Degrees(), getTzaisGeonim7Point083Degrees());
1950        }
1951
1952        /**
1953         * Method to return the beginning of <em>bain hashmashos</em> of <em>Rabbeinu Tam</em> calculated when the sun is
1954         * {@link #ZENITH_13_POINT_24 13.24&deg;} below the western {@link #GEOMETRIC_ZENITH geometric horizon} (90&deg;)
1955         * after sunset. This calculation is based on the same calculation of {@link #getBainHasmashosRT58Point5Minutes()
1956         * <em>bain hashmashos</em> Rabbeinu Tam 58.5 minutes} but uses a degree based calculation instead of 58.5 exact
1957         * minutes. This calculation is based on the position of the sun 58.5 minutes after sunset in Jerusalem during the
1958         * equinox (on March 16, about 4 days before the astronomical equinox, the day that a solar hour is 60 minutes)
1959         * which calculates to 13.24&deg; below {@link #GEOMETRIC_ZENITH geometric zenith}.
1960         * NOTE: As per Yisrael Vehazmanim Vol. III page 1028 No 50, a dip of slightly less than 13&deg; should be used.
1961         * Calculations show that the proper dip to be 13.2456&deg; (truncated to 13.24 that provides about 1.5 second
1962         * earlier (<em>lechumra</em>) time) below the horizon at that time. This makes a difference of 1 minute and 10
1963         * seconds in Jerusalem during the Equinox, and 1 minute 29 seconds during the solstice as compared to the proper
1964         * 13.24&deg; versus 13&deg;. For NY during the solstice, the difference is 1 minute 56 seconds.
1965         * 
1966         * @return the <code>Date</code> of the sun being 13.24&deg; below {@link #GEOMETRIC_ZENITH geometric zenith}
1967         *         (90&deg;). If the calculation can't be computed such as northern and southern locations even south of the
1968         *         Arctic Circle and north of the Antarctic Circle where the sun may not reach low enough below the horizon
1969         *         for this calculation, a null will be returned. See detailed explanation on top of the
1970         *         {@link AstronomicalCalendar} documentation.
1971         * 
1972         * @see #ZENITH_13_POINT_24
1973         * @see #getBainHasmashosRT58Point5Minutes()
1974         */
1975        public Date getBainHasmashosRT13Point24Degrees() {
1976                return getSunsetOffsetByDegrees(ZENITH_13_POINT_24);
1977        }
1978
1979        /**
1980         * This method returns the beginning of <em>Bain hashmashos</em> of <em>Rabbeinu Tam</em> calculated as a 58.5
1981         * minute offset after sunset. <em>bain hashmashos</em> is 3/4 of a <em>Mil</em> before <em>tzais</em> or 3 1/4
1982         * <em>Mil</em> after sunset. With a <em>Mil</em> calculated as 18 minutes, 3.25 * 18 = 58.5 minutes.
1983         * 
1984         * @return the <code>Date</code> of 58.5 minutes after sunset. If the calculation can't be computed such as in the
1985         *         Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
1986         *         not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
1987         *         documentation.
1988         * 
1989         */
1990        public Date getBainHasmashosRT58Point5Minutes() {
1991                return getTimeOffset(getElevationAdjustedSunset(), 58.5 * MINUTE_MILLIS);
1992        }
1993
1994        /**
1995         * This method returns the beginning of <em>bain hashmashos</em> based on the calculation of 13.5 minutes (3/4 of an
1996         * 18 minute <em>Mil</em>) before <em>shkiah</em> calculated as {@link #getTzaisGeonim7Point083Degrees() 7.083&deg;}.
1997         * 
1998         * @return the <code>Date</code> of the <em>bain hashmashos</em> of <em>Rabbeinu Tam</em> in this calculation. If the
1999         *         calculation can't be computed such as northern and southern locations even south of the Arctic Circle and
2000         *         north of the Antarctic Circle where the sun may not reach low enough below the horizon for this
2001         *         calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2002         *         documentation.
2003         * @see #getTzaisGeonim7Point083Degrees()
2004         */
2005        public Date getBainHasmashosRT13Point5MinutesBefore7Point083Degrees() {
2006                return getTimeOffset(getSunsetOffsetByDegrees(ZENITH_7_POINT_083), -13.5 * MINUTE_MILLIS);
2007        }
2008
2009        /**
2010         * This method returns the beginning of <em>bain hashmashos</em> of <em>Rabbeinu Tam</em> calculated according to the
2011         * opinion of the <em>Divrei Yosef</em> (see Yisrael Vehazmanim) calculated 5/18th (27.77%) of the time between
2012         * <em>alos</em> (calculated as 19.8&deg; before sunrise) and sunrise. This is added to sunset to arrive at the time
2013         * for <em>bain hashmashos</em> of <em>Rabbeinu Tam</em>).
2014         * 
2015         * @return the <code>Date</code> of <em>bain hashmashos</em> of <em>Rabbeinu Tam</em> for this calculation. If the
2016         *         calculation can't be computed such as northern and southern locations even south of the Arctic Circle and
2017         *         north of the Antarctic Circle where the sun may not reach low enough below the horizon for this
2018         *         calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2019         *         documentation.
2020         */
2021        public Date getBainHasmashosRT2Stars() {
2022                Date alos19Point8 = getAlos19Point8Degrees();
2023                Date sunrise = getElevationAdjustedSunrise();
2024                if (alos19Point8 == null || sunrise == null) {
2025                        return null;
2026                }
2027
2028                return getTimeOffset(getElevationAdjustedSunset(), (sunrise.getTime() - alos19Point8.getTime()) * (5 / 18d));
2029        }
2030        
2031        /**
2032         * This method returns the beginning of <em>bain hashmashos</em> (twilight) according to the <a href=
2033         * "https://en.wikipedia.org/wiki/Eliezer_ben_Samuel">Yereim (Rabbi Eliezer of Metz)</a> calculated as 18 minutes
2034         * or 3/4 of a 24 minute <em>Mil</em> before sunset. According to the Yereim, <em>bain hashmashos</em> starts 3/4
2035         * of a <em>Mil</em> before sunset and <em>tzais</em> or nightfall starts at sunset. 
2036         * 
2037         * @return the <code>Date</code> of 18 minutes before sunset. If the calculation can't be computed such as in the
2038         *         Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
2039         *         not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2040         *         documentation.
2041         * @see #getBainHasmashosYereim3Point05Degrees()
2042         */
2043        public Date getBainHasmashosYereim18Minutes() {
2044                return getTimeOffset(getElevationAdjustedSunset(), -18 * MINUTE_MILLIS);
2045        }
2046        
2047        /**
2048         * This method returns the beginning of <em>hain hashmashos</em> (twilight) according to the <a href=
2049         * "https://en.wikipedia.org/wiki/Eliezer_ben_Samuel">Yereim (Rabbi Eliezer of Metz)</a> calculated as the sun's
2050         * position 3.05&deg; above the horizon during the equinox (on March 16, about 4 days before the astronomical
2051         * equinox, the day that a solar hour is 60 minutes) in Yerushalayim, its position 18 minutes or 3/4 of an 24
2052         * minute <em>Mil</em> before sunset. According to the Yereim, bain hashmashos starts 3/4 of a <em>Mil</em> before
2053         * sunset and <em>tzais</em> or nightfall starts at sunset. 
2054         * 
2055         * @return the <code>Date</code> of the sun's position 3.05&deg; minutes before sunset. If the calculation can't
2056         *         be computed such as in the Arctic Circle where there is at least one day a year where the sun does not
2057         *         rise, and one where it does not set, a null will be returned. See detailed explanation on top of the
2058         *         {@link AstronomicalCalendar} documentation.
2059         * 
2060         * @see #ZENITH_MINUS_3_POINT_05
2061         * @see #getBainHasmashosYereim18Minutes()
2062         */
2063        public Date getBainHasmashosYereim3Point05Degrees() {
2064                return getSunsetOffsetByDegrees(ZENITH_MINUS_3_POINT_05);
2065        }
2066        
2067        /**
2068         * This method returns the beginning of <em>bain hashmashos</em> (twilight) according to the <a href=
2069         * "https://en.wikipedia.org/wiki/Eliezer_ben_Samuel">Yereim (Rabbi Eliezer of Metz)</a> calculated as 16.875
2070         * minutes or 3/4 of a 22.5 minute <em>Mil</em> before sunset. According to the Yereim, bain hashmashos starts 3/4 of a
2071         * <em>Mil</em> before sunset and <em>tzais</em> or nightfall starts at sunset. 
2072         * 
2073         * @return the <code>Date</code> of 16.875 minutes before sunset. If the calculation can't be computed such as in the
2074         *         Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
2075         *         not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2076         *         documentation.
2077         * 
2078         * @see #getBainHasmashosYereim2Point8Degrees()
2079         */
2080        public Date getBainHasmashosYereim16Point875Minutes() {
2081                return getTimeOffset(getElevationAdjustedSunset(), -16.875 * MINUTE_MILLIS);
2082        }
2083        
2084        /**
2085         * This method returns the beginning of <em>bain hashmashos</em> (twilight) according to the <a href=
2086         * "https://en.wikipedia.org/wiki/Eliezer_ben_Samuel">Yereim (Rabbi Eliezer of Metz)</a> calculated as the sun's
2087         * position 2.8&deg; above the horizon during the equinox (on March 16, about 4 days before the astronomical
2088         * equinox, the day that a solar hour is 60 minutes) in Yerushalayim, its position 16.875 minutes or 3/4 of an 18
2089         * minute <em>Mil</em> before sunset. According to the Yereim, bain hashmashos starts 3/4 of a <em>Mil</em> before
2090         * sunset and <em>tzais</em> or nightfall starts at sunset. 
2091         * 
2092         * @return the <code>Date</code> of the sun's position 2.8&deg; minutes before sunset. If the calculation can't
2093         *         be computed such as in the Arctic Circle where there is at least one day a year where the sun does not
2094         *         rise, and one where it does not set, a null will be returned. See detailed explanation on top of the
2095         *         {@link AstronomicalCalendar} documentation.
2096         * 
2097         * @see #ZENITH_MINUS_2_POINT_8
2098         * @see #getBainHasmashosYereim16Point875Minutes()
2099         */
2100        public Date getBainHasmashosYereim2Point8Degrees() {
2101                return getSunsetOffsetByDegrees(ZENITH_MINUS_2_POINT_8);
2102        }
2103        
2104        /**
2105         * This method returns the beginning of <em>bain hashmashos</em> (twilight) according to the <a href=
2106         * "https://en.wikipedia.org/wiki/Eliezer_ben_Samuel">Yereim (Rabbi Eliezer of Metz)</a> calculated as 13.5 minutes
2107         * or 3/4 of an 18 minute <em>Mil</em> before sunset. According to the Yereim, bain hashmashos starts 3/4 of a
2108         * <em>Mil</em> before sunset and <em>tzais</em> or nightfall starts at sunset. 
2109         * 
2110         * @return the <code>Date</code> of 13.5 minutes before sunset. If the calculation can't be computed such as in the
2111         *         Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
2112         *         not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2113         *         documentation.
2114         * 
2115         * @see #getBainHasmashosYereim2Point1Degrees()
2116         */
2117        public Date getBainHasmashosYereim13Point5Minutes() {
2118                return getTimeOffset(getElevationAdjustedSunset(), -13.5 * MINUTE_MILLIS);
2119        }
2120        
2121        /**
2122         * This method returns the beginning of <em>bain hashmashos</em> according to the <a href=
2123         * "https://en.wikipedia.org/wiki/Eliezer_ben_Samuel">Yereim (Rabbi Eliezer of Metz)</a> calculated as the sun's
2124         * position 2.1&deg; above the horizon during the equinox (on March 16, about 4 days before the astronomical
2125         * equinox, the day that a solar hour is 60 minutes) in Yerushalayim, its position 13.5 minutes or 3/4 of an 18
2126         * minute <em>Mil</em> before sunset. According to the Yereim, bain hashmashos starts 3/4 of a <em>Mil</em> before
2127         * sunset and <em>tzais</em> or nightfall starts at sunset. 
2128         * 
2129         * @return the <code>Date</code> of the sun's position 2.1&deg; minutes before sunset. If the calculation can't
2130         *         be computed such as in the Arctic Circle where there is at least one day a year where the sun does not
2131         *         rise, and one where it does not set, a null will be returned. See detailed explanation on top of the
2132         *         {@link AstronomicalCalendar} documentation.
2133         * 
2134         * @see #ZENITH_MINUS_2_POINT_1
2135         * @see #getBainHasmashosYereim13Point5Minutes()
2136         */
2137        public Date getBainHasmashosYereim2Point1Degrees() {
2138                return getSunsetOffsetByDegrees(ZENITH_MINUS_2_POINT_1);
2139        }
2140        
2141        /**
2142         * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated at the
2143         * sun's position at {@link #ZENITH_3_POINT_7 3.7&deg;} below the western horizon.
2144         * 
2145         * @return the <code>Date</code> representing the time when the sun is 3.7&deg; below sea level.
2146         * @see #ZENITH_3_POINT_7
2147         */
2148        public Date getTzaisGeonim3Point7Degrees() {
2149                return getSunsetOffsetByDegrees(ZENITH_3_POINT_7);
2150        }
2151
2152        /**
2153         * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated at the
2154         * sun's position at {@link #ZENITH_3_POINT_8 3.8&deg;} below the western horizon.
2155         * 
2156         * @return the <code>Date</code> representing the time when the sun is 3.8&deg; below sea level.
2157         * @see #ZENITH_3_POINT_8
2158         */
2159        public Date getTzaisGeonim3Point8Degrees() {
2160                return getSunsetOffsetByDegrees(ZENITH_3_POINT_8);
2161        }
2162
2163        /**
2164         * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated at the
2165         * sun's position at {@link #ZENITH_5_POINT_95 5.95&deg;} below the western horizon.
2166         * 
2167         * @return the <code>Date</code> representing the time when the sun is 5.95&deg; below sea level. If the calculation
2168         *         can't be computed such as northern and southern locations even south of the Arctic Circle and north of
2169         *         the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a
2170         *         null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
2171         * @see #ZENITH_5_POINT_95
2172         */
2173        public Date getTzaisGeonim5Point95Degrees() {
2174                return getSunsetOffsetByDegrees(ZENITH_5_POINT_95);
2175        }
2176
2177        /**
2178         * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 3/4
2179         * of a <a href= "http://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement" >Mil</a> based on an 18
2180         * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_65 3.65&deg;} below the western
2181         * horizon. This is a very early <em>zman</em> and should not be relied on without Rabbinical guidance.
2182         * 
2183         * @return the <code>Date</code> representing the time when the sun is 3.65&deg; below sea level. If the calculation
2184         *         can't be computed such as northern and southern locations even south of the Arctic Circle and north of
2185         *         the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a
2186         *         null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
2187         * @see #ZENITH_3_POINT_65
2188         */
2189        public Date getTzaisGeonim3Point65Degrees() {
2190                return getSunsetOffsetByDegrees(ZENITH_3_POINT_65);
2191        }
2192
2193        /**
2194         * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 3/4
2195         * of a <a href= "http://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement" >Mil</a> based on an 18
2196         * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_676 3.676&deg;} below the western
2197         * horizon based on the calculations of Stanley Fishkind. This is a very early <em>zman</em> and should not be
2198         * relied on without Rabbinical guidance.
2199         * 
2200         * @return the <code>Date</code> representing the time when the sun is 3.676&deg; below sea level. If the
2201         *         calculation can't be computed such as northern and southern locations even south of the Arctic Circle and
2202         *         north of the Antarctic Circle where the sun may not reach low enough below the horizon for this
2203         *         calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2204         *         documentation.
2205         * @see #ZENITH_3_POINT_676
2206         */
2207        public Date getTzaisGeonim3Point676Degrees() {
2208                return getSunsetOffsetByDegrees(ZENITH_3_POINT_676);
2209        }
2210
2211        /**
2212         * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 3/4
2213         * of a <a href= "http://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement" >Mil</a> based on a 24
2214         * minute Mil, or 18 minutes. It is the sun's position at {@link #ZENITH_4_POINT_61 4.61&deg;} below the western
2215         * horizon. This is a very early <em>zman</em> and should not be relied on without Rabbinical guidance.
2216         * 
2217         * @return the <code>Date</code> representing the time when the sun is 4.61&deg; below sea level. If the calculation
2218         *         can't be computed such as northern and southern locations even south of the Arctic Circle and north of
2219         *         the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a
2220         *         null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
2221         * @see #ZENITH_4_POINT_61
2222         */
2223        public Date getTzaisGeonim4Point61Degrees() {
2224                return getSunsetOffsetByDegrees(ZENITH_4_POINT_61);
2225        }
2226
2227        /**
2228         * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 3/4
2229         * of a <a href= "http://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement" >Mil</a>, based on a 22.5
2230         * minute Mil, or 16 7/8 minutes. It is the sun's position at {@link #ZENITH_4_POINT_37 4.37&deg;} below the western
2231         * horizon. This is a very early <em>zman</em> and should not be relied on without Rabbinical guidance.
2232         * 
2233         * @return the <code>Date</code> representing the time when the sun is 4.37&deg; below sea level. If the calculation
2234         *         can't be computed such as northern and southern locations even south of the Arctic Circle and north of
2235         *         the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a
2236         *         null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
2237         * @see #ZENITH_4_POINT_37
2238         */
2239        public Date getTzaisGeonim4Point37Degrees() {
2240                return getSunsetOffsetByDegrees(ZENITH_4_POINT_37);
2241        }
2242
2243        /**
2244         * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 3/4
2245         * of a 24 minute <em><a href= "http://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement" >Mil</a></em>,
2246         * based on a <em>Mil</em> being 24 minutes, and is calculated as 18 + 2 + 4 for a total of 24 minutes. It is the
2247         * sun's position at {@link #ZENITH_5_POINT_88 5.88&deg;} below the western horizon. This is a very early
2248         * <em>zman</em> and should not be relied on without Rabbinical guidance.
2249         * 
2250         * @todo Additional detailed documentation needed.
2251         * @return the <code>Date</code> representing the time when the sun is 5.88&deg; below sea level. If the calculation
2252         *         can't be computed such as northern and southern locations even south of the Arctic Circle and north of
2253         *         the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a
2254         *         null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
2255         * @see #ZENITH_5_POINT_88
2256         */
2257        public Date getTzaisGeonim5Point88Degrees() {
2258                return getSunsetOffsetByDegrees(ZENITH_5_POINT_88);
2259        }
2260
2261        /**
2262         * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 3/4
2263         * of a <a href= "http://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement" >Mil</a> based on the
2264         * sun's position at {@link #ZENITH_4_POINT_8 4.8&deg;} below the western horizon. This is based on Rabbi Leo Levi's
2265         * calculations. This is the This is a very early <em>zman</em> and should not be relied on without Rabbinical guidance.
2266         * @todo Additional documentation needed.
2267         * 
2268         * @return the <code>Date</code> representing the time when the sun is 4.8&deg; below sea level. If the calculation
2269         *         can't be computed such as northern and southern locations even south of the Arctic Circle and north of
2270         *         the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a
2271         *         null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
2272         * @see #ZENITH_4_POINT_8
2273         */
2274        public Date getTzaisGeonim4Point8Degrees() {
2275                return getSunsetOffsetByDegrees(ZENITH_4_POINT_8);
2276        }
2277        
2278        
2279        /**
2280         * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> as calculated by
2281         * <a href="https://en.wikipedia.org/wiki/Yechiel_Michel_Tucazinsky">Rabbi Yechiel Michel Tucazinsky</a>. It is
2282         * based on of the position of the sun no later than {@link #getTzaisGeonim6Point45Degrees() 31 minutes} after sunset
2283         * in Jerusalem the height of the summer solstice and is 28 minutes after <em>shkiah</em> at the equinox. This
2284         * computes to 6.45&deg; below the western horizon.
2285         * @todo Additional documentation details needed.
2286         * 
2287         * @return the <code>Date</code> representing the time when the sun is 6.45&deg; below sea level. If the
2288         *         calculation can't be computed such as northern and southern locations even south of the Arctic Circle and
2289         *         north of the Antarctic Circle where the sun may not reach low enough below the horizon for this
2290         *         calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2291         *         documentation.
2292         * @see #ZENITH_6_POINT_45
2293         */
2294        public Date getTzaisGeonim6Point45Degrees() {
2295                return getSunsetOffsetByDegrees(ZENITH_6_POINT_45);
2296        }
2297
2298        /**
2299         * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 30
2300         * minutes after sunset during the equinox (on March 16, about 4 days before the astronomical equinox, the day that
2301         * a solar hour is 60 minutes) in Yerushalayim. The sun's position at this time computes to
2302         * {@link #ZENITH_7_POINT_083 7.083&deg; (or 7&deg; 5\u2032} below the western horizon. Note that this is a common
2303         * and rounded number. Computation shows the accurate number is 7.2&deg;
2304         * 
2305         * @return the <code>Date</code> representing the time when the sun is 7.083&deg; below sea level. If the
2306         *         calculation can't be computed such as northern and southern locations even south of the Arctic Circle and
2307         *         north of the Antarctic Circle where the sun may not reach low enough below the horizon for this
2308         *         calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2309         *         documentation.
2310         * @see #ZENITH_7_POINT_083
2311         */
2312        public Date getTzaisGeonim7Point083Degrees() {
2313                return getSunsetOffsetByDegrees(ZENITH_7_POINT_083);
2314        }
2315        
2316        /**
2317         * This method returns <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 45 minutes
2318         * after sunset during the summer solstice in New York, when the <em>neshef</em> (twilight) is the longest. The sun's
2319         * position at this time computes to {@link #ZENITH_7_POINT_67 7.75&deg;} below the western horizon. See <a href=
2320         * "http://www.hebrewbooks.org/pdfpager.aspx?req=921&amp;pgnum=149">Igros Moshe Even Haezer 4, Ch. 4</a> (regarding
2321         * tzais for <em>krias Shema</em>). It is also mentioned in Rabbi Heber's <a href=
2322         * "http://www.hebrewbooks.org/53000">Shaarei Zmanim</a> on in
2323         * <a href="http://www.hebrewbooks.org/pdfpager.aspx?req=53055&amp;pgnum=101">chapter 10 (page 87)</a> and
2324         * <a href="http://www.hebrewbooks.org/pdfpager.aspx?req=53055&amp;pgnum=122">chapter 12 (page 108)</a>. Also see the
2325         * time of 45 minutes in <a href="https://en.wikipedia.org/wiki/Simcha_Bunim_Cohen">Rabbi Simcha Bunim Cohen's</a> <a
2326         * href="https://www.worldcat.org/oclc/179728985">The radiance of Shabbos</a> as the earliest zman for New York. This
2327         * zman is also listed in the <a href="http://www.hebrewbooks.org/pdfpager.aspx?req=1927&amp;pgnum=90">Divrei Shalom
2328         * Vol. III, chapter 75</a>, and <a href="http://www.hebrewbooks.org/pdfpager.aspx?req=892&amp;pgnum=431">Bais Av"i Vol.
2329         * III, chapter 117</a>. This zman is also listed in the Divrei Shalom etc. chapter 177. Since this
2330         * zman depends on the level of light, Rabbi Yaakov Shakow presented this degree based calculation to Rabbi <a href=
2331         * "https://en.wikipedia.org/wiki/Shmuel_Kamenetsky">Rabbi Shmuel Kamenetsky</a> who agreed to it.
2332         * @todo add hyperlinks to source of Divrei Shalom.
2333         * @return the <code>Date</code> representing the time when the sun is 7.67&deg; below sea level. If the
2334         *         calculation can't be computed such as northern and southern locations even south of the Arctic Circle and
2335         *         north of the Antarctic Circle where the sun may not reach low enough below the horizon for this
2336         *         calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2337         *         documentation.
2338         * @see #ZENITH_7_POINT_67
2339         */
2340        public Date getTzaisGeonim7Point67Degrees() {
2341                return getSunsetOffsetByDegrees(ZENITH_7_POINT_67);
2342        }
2343
2344        /**
2345         * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated at the
2346         * sun's position at {@link #ZENITH_8_POINT_5 8.5&deg;} below the western horizon.
2347         * 
2348         * @return the <code>Date</code> representing the time when the sun is 8.5&deg; below sea level. If the calculation
2349         *         can't be computed such as northern and southern locations even south of the Arctic Circle and north of
2350         *         the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a
2351         *         null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
2352         * @see #ZENITH_8_POINT_5
2353         */
2354        public Date getTzaisGeonim8Point5Degrees() {
2355                return getSunsetOffsetByDegrees(ZENITH_8_POINT_5);
2356        }
2357        
2358        /**
2359         * This method returns the <em>tzais</em> (nightfall) based on the calculations used in the <a href=
2360         * "http://www.worldcat.org/oclc/243303103">Luach Itim Lebinah</a> as the stringent time for tzais.  It is calculated
2361         * at the sun's position at {@link #ZENITH_9_POINT_3 9.3&deg;} below the western horizon.
2362         * 
2363         * @return the <code>Date</code> representing the time when the sun is 9.3&deg; below sea level. If the calculation
2364         *         can't be computed such as northern and southern locations even south of the Arctic Circle and north of
2365         *         the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a
2366         *         null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
2367         */
2368        public Date getTzaisGeonim9Point3Degrees() {
2369                return getSunsetOffsetByDegrees(ZENITH_9_POINT_3);
2370        }
2371        
2372        /**
2373         * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 60
2374         * minutes after sunset during the equinox (on March 16, about 4 days before the astronomical equinox, the day that
2375         * a solar hour is 60 minutes) in New York. The sun's position at this time computes to
2376         * {@link #ZENITH_9_POINT_75 9.75&deg;} below the western horizon. This is the opinion of <a href=
2377         * "https://en.wikipedia.org/wiki/Yosef_Eliyahu_Henkin">Rabbi Eliyahu Henkin</a>.  This also follows the opinion of
2378         * <a href="https://en.wikipedia.org/wiki/Shmuel_Kamenetsky">Rabbi Shmuel Kamenetsky</a>. Rabbi Yaakov Shakow presented
2379         * these degree based times to Rabbi Shmuel Kamenetsky who agreed to them.
2380         * 
2381         * @return the <code>Date</code> representing the time when the sun is 9.75&deg; below sea level. If the calculation
2382         *         can't be computed such as northern and southern locations even south of the Arctic Circle and north of
2383         *         the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a
2384         *         null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
2385         *
2386         * @see #getTzais60()
2387         */
2388        public Date getTzaisGeonim9Point75Degrees() {
2389                return getSunsetOffsetByDegrees(ZENITH_9_POINT_75);
2390        }
2391
2392        /**
2393         * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em><a href=
2394         * "https://en.wikipedia.org/wiki/Yair_Bacharach">Chavas Yair</a></em> and <em>Divrei Malkiel</em> that the time
2395         * to walk the distance of a <em>Mil</em> is 15 minutes for a total of 60 minutes for 4 <em>Mil</em> after
2396         * {@link #getSeaLevelSunset() sea level sunset}.
2397         * 
2398         * @return the <code>Date</code> representing 60 minutes after sea level sunset. If the calculation can't be
2399         *         computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,
2400         *         and one where it does not set, a null will be returned. See detailed explanation on top of the
2401         *         {@link AstronomicalCalendar} documentation.
2402         * @see #getAlos60()
2403         */
2404        public Date getTzais60() {
2405                return getTimeOffset(getElevationAdjustedSunset(), 60 * MINUTE_MILLIS);
2406        }
2407
2408        /**
2409         * This method returns <em>tzais</em> usually calculated as 40 minutes (configurable to any offset via
2410         * {@link #setAteretTorahSunsetOffset(double)}) after sunset. Please note that <em>Chacham Yosef Harari-Raful</em>
2411         * of <em>Yeshivat Ateret Torah</em> who uses this time, does so only for calculating various other
2412         * <em>zmanai hayom</em> such as <em>Sof Zman Krias Shema</em> and <em>Plag Hamincha</em>. His calendars do not
2413         * publish a <em>zman</em> for <em>Tzais</em>. It should also be noted that <em>Chacham Harari-Raful</em> provided a
2414         * 25 minute <em>zman</em> for Israel. This API uses 40 minutes year round in any place on the globe by default.
2415         * This offset can be changed by calling {@link #setAteretTorahSunsetOffset(double)}.
2416         * 
2417         * @return the <code>Date</code> representing 40 minutes (configurable via {@link #setAteretTorahSunsetOffset})
2418         *         after sea level sunset. If the calculation can't be computed such as in the Arctic Circle where there is
2419         *         at least one day a year where the sun does not rise, and one where it does not set, a null will be
2420         *         returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
2421         * @see #getAteretTorahSunsetOffset()
2422         * @see #setAteretTorahSunsetOffset(double)
2423         */
2424        public Date getTzaisAteretTorah() {
2425                return getTimeOffset(getElevationAdjustedSunset(), getAteretTorahSunsetOffset() * MINUTE_MILLIS);
2426        }
2427
2428        /**
2429         * Returns the offset in minutes after sunset used to calculate sunset for the Ateret Torah zmanim. The default
2430         * value is 40 minutes. This affects most zmanim, since almost all zmanim use subset as part of their calculation.
2431         * 
2432         * @return the number of minutes after sunset for <em>Tzait</em>.
2433         * @see #setAteretTorahSunsetOffset(double)
2434         */
2435        public double getAteretTorahSunsetOffset() {
2436                return ateretTorahSunsetOffset;
2437        }
2438
2439        /**
2440         * Allows setting the offset in minutes after sunset for the Ateret Torah zmanim. The default if unset is 40
2441         * minutes. Chacham Yosef Harari-Raful of Yeshivat Ateret Torah uses 40 minutes globally with the exception of
2442         * Israel where a 25 minute offset is used. This 40 minute (or any other) offset can be overridden by this method.
2443         * This offset impacts all Ateret Torah zmanim.
2444         * 
2445         * @param ateretTorahSunsetOffset
2446         *            the number of minutes after sunset to use as an offset for the Ateret Torah <em>tzais</em>
2447         * @see #getAteretTorahSunsetOffset()
2448         */
2449        public void setAteretTorahSunsetOffset(double ateretTorahSunsetOffset) {
2450                this.ateretTorahSunsetOffset = ateretTorahSunsetOffset;
2451        }
2452
2453        /**
2454         * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) based on the
2455         * calculation of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts
2456         * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending
2457         * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via
2458         * {@link #setAteretTorahSunsetOffset(double)}). <em>shaos zmaniyos</em> are calculated based on this day and added
2459         * to {@link #getAlos72Zmanis() alos} to reach this time. This time is 3
2460         * <em> {@link #getShaahZmanisAteretTorah() shaos zmaniyos}</em> (temporal hours) after
2461         * <em>{@link #getAlos72Zmanis()
2462         * alos 72 zmaniyos}</em>. <b>Note: </b> Based on this calculation <em>chatzos</em> will not be at midday.
2463         * 
2464         * @return the <code>Date</code> of the latest <em>zman krias shema</em> based on this calculation. If the
2465         *         calculation can't be computed such as in the Arctic Circle where there is at least one day a year where
2466         *         the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation
2467         *         on top of the {@link AstronomicalCalendar} documentation.
2468         * @see #getAlos72Zmanis()
2469         * @see #getTzaisAteretTorah()
2470         * @see #getAteretTorahSunsetOffset()
2471         * @see #setAteretTorahSunsetOffset(double)
2472         * @see #getShaahZmanisAteretTorah()
2473         */
2474        public Date getSofZmanShmaAteretTorah() {
2475                return getSofZmanShma(getAlos72Zmanis(), getTzaisAteretTorah());
2476        }
2477
2478        /**
2479         * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) based on the calculation
2480         * of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of
2481         * the day} before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after
2482         * sunset} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). <em>shaos zmaniyos</em> are
2483         * calculated based on this day and added to {@link #getAlos72Zmanis() alos} to reach this time. This time is 4 *
2484         * <em>{@link #getShaahZmanisAteretTorah() shaos zmaniyos}</em> (temporal hours) after
2485         * <em>{@link #getAlos72Zmanis() alos 72 zmaniyos}</em>.
2486         * <b>Note: </b> Based on this calculation <em>chatzos</em> will not be at midday.
2487         * 
2488         * @return the <code>Date</code> of the latest <em>zman krias shema</em> based on this calculation. If the
2489         *         calculation can't be computed such as in the Arctic Circle where there is at least one day a year where
2490         *         the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation
2491         *         on top of the {@link AstronomicalCalendar} documentation.
2492         * @see #getAlos72Zmanis()
2493         * @see #getTzaisAteretTorah()
2494         * @see #getShaahZmanisAteretTorah()
2495         * @see #setAteretTorahSunsetOffset(double)
2496         */
2497        public Date getSofZmanTfilahAteretTorah() {
2498                return getSofZmanTfila(getAlos72Zmanis(), getTzaisAteretTorah());
2499        }
2500
2501        /**
2502         * This method returns the time of <em>mincha gedola</em> based on the calculation of <em>Chacham Yosef
2503         * Harari-Raful</em> of <em>Yeshivat Ateret Torah</em>, that the day starts {@link #getAlos72Zmanis()
2504         * 1/10th of the day} before sunrise and is usually calculated as ending
2505         * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via
2506         * {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest time to pray <em>mincha</em>
2507         * according to the opinion of the <em><a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a></em> and others.
2508         * For more information on this see the documentation on <em>{@link #getMinchaGedola() mincha gedola}</em>. This is
2509         * calculated as 6.5 {@link #getShaahZmanisAteretTorah()  solar hours} after alos. The calculation used is 6.5 *
2510         * {@link #getShaahZmanisAteretTorah()} after <em>{@link #getAlos72Zmanis() alos}</em>.
2511         * 
2512         * @see #getAlos72Zmanis()
2513         * @see #getTzaisAteretTorah()
2514         * @see #getShaahZmanisAteretTorah()
2515         * @see #getMinchaGedola()
2516         * @see #getMinchaKetanaAteretTorah()
2517         * @see ZmanimCalendar#getMinchaGedola()
2518         * @see #getAteretTorahSunsetOffset()
2519         * @see #setAteretTorahSunsetOffset(double)
2520         * 
2521         * @return the <code>Date</code> of the time of mincha gedola. If the calculation can't be computed such as in the
2522         *         Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
2523         *         not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2524         *         documentation.
2525         */
2526        public Date getMinchaGedolaAteretTorah() {
2527                return getMinchaGedola(getAlos72Zmanis(), getTzaisAteretTorah());
2528        }
2529
2530        /**
2531         * This method returns the time of <em>mincha ketana</em> based on the calculation of
2532         * <em>Chacham Yosef Harari-Raful</em> of <em>Yeshivat Ateret Torah</em>, that the day starts
2533         * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending
2534         * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via
2535         * {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest time to pray <em>mincha</em>
2536         * according to the opinion of the <em><a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a></em> and others.
2537         * For more information on this see the documentation on <em>{@link #getMinchaGedola() mincha gedola}</em>. This is
2538         * calculated as 9.5 {@link #getShaahZmanisAteretTorah() solar hours} after {@link #getAlos72Zmanis() alos}. The
2539         * calculation used is 9.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}.
2540         * 
2541         * @see #getAlos72Zmanis()
2542         * @see #getTzaisAteretTorah()
2543         * @see #getShaahZmanisAteretTorah()
2544         * @see #getAteretTorahSunsetOffset()
2545         * @see #setAteretTorahSunsetOffset(double)
2546         * @see #getMinchaGedola()
2547         * @see #getMinchaKetana()
2548         * @return the <code>Date</code> of the time of mincha ketana. If the calculation can't be computed such as in the
2549         *         Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
2550         *         not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2551         *         documentation.
2552         */
2553        public Date getMinchaKetanaAteretTorah() {
2554                return getMinchaKetana(getAlos72Zmanis(), getTzaisAteretTorah());
2555        }
2556
2557        /**
2558         * This method returns the time of <em>plag hamincha</em> based on the calculation of Chacham Yosef Harari-Raful of
2559         * Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is
2560         * usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset
2561         * via {@link #setAteretTorahSunsetOffset(double)}). <em>shaos zmaniyos</em> are calculated based on this day and
2562         * added to {@link #getAlos72Zmanis() alos} to reach this time. This time is 10.75
2563         * <em>{@link #getShaahZmanisAteretTorah() shaos zmaniyos}</em> (temporal hours) after {@link #getAlos72Zmanis()
2564         * dawn}.
2565         * 
2566         * @return the <code>Date</code> of the plag. If the calculation can't be computed such as in the Arctic Circle
2567         *         where there is at least one day a year where the sun does not rise, and one where it does not set, a null
2568         *         will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
2569         * @see #getAlos72Zmanis()
2570         * @see #getTzaisAteretTorah()
2571         * @see #getShaahZmanisAteretTorah()
2572         * @see #setAteretTorahSunsetOffset(double)
2573         * @see #getAteretTorahSunsetOffset()
2574         */
2575        public Date getPlagHaminchaAteretTorah() {
2576                return getPlagHamincha(getAlos72Zmanis(), getTzaisAteretTorah());
2577        }
2578
2579        /**
2580         * This method returns the time of <em>misheyakir</em> based on the common calculation of the Syrian community in NY
2581         * that the <em>alos</em> is a fixed minute offset from day starting {@link #getAlos72Zmanis() 1/10th of the day}
2582         * before sunrise. The common offsets are 6 minutes (based on the <em>Pri Megadim</em>, but not linked to the
2583         * calculation of <em>Alos</em> as 1/10th of the day), 8 and 18 minutes (possibly attributed to
2584         * <em><a href="https://en.wikipedia.org/wiki/Baruch_Ben_Haim">Chacham Baruch Ben Haim</a></em>). Since there is no
2585         * universal accepted offset, the user of this API will have to specify one. <em>Chacham Yosef Harari-Raful</em> of
2586         * <em>Yeshivat Ateret Torah</em> does not supply any <em>zman</em> for <em>misheyakir</em> and does not endorse any
2587         * specific calculation for <em>misheyakir</em>. For that reason, this method is not a public method.
2588         * 
2589         * @param minutes
2590         *            the number of minutes after <em>alos</em> calculated as {@link #getAlos72Zmanis() 1/10th of the day}
2591         * @return the <code>Date</code> of <em>misheyakir</em>. If the calculation can't be computed such as in the Arctic
2592         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
2593         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2594         *         documentation.
2595         * @see #getAlos72Zmanis()
2596         */
2597        // private Date getMesheyakirAteretTorah(double minutes) {
2598        // return getTimeOffset(getAlos72Zmanis(), minutes * MINUTE_MILLIS);
2599        // }
2600
2601        /**
2602         * Method to return <em>tzais</em> (dusk) calculated as 72 minutes zmaniyos, or 1/10th of the day after
2603         * {@link #getSeaLevelSunset() sea level sunset}.This is the way that the <a href=
2604         * "https://en.wikipedia.org/wiki/Abraham_Cohen_Pimentel">Minchas Cohen</a> in Ma'amar 2:4 calculates Rebbeinu Tam's
2605         * time of <em>tzeis</em>. It should be noted that this calculation results in the shortest time from sunset to
2606         * <em>tzais</em> being during the winter solstice, the longest at the summer solstice and 72 clock minutes at the
2607         * equinox. This does not match reality, since there is no direct relationship between the length of the day and
2608         * twilight. The shortest twilight is during the equinox, the longest is during the the summer solstice, and in the
2609         * winter with the shortest daylight, the twilight period is longer than during the equinoxes.
2610         * 
2611         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic
2612         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
2613         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2614         *         documentation.
2615         * @see #getAlos72Zmanis()
2616         */
2617        public Date getTzais72Zmanis() {
2618                long shaahZmanis = getShaahZmanisGra();
2619                if (shaahZmanis == Long.MIN_VALUE) {
2620                        return null;
2621                }
2622                return getTimeOffset(getElevationAdjustedSunset(), shaahZmanis * 1.2);
2623        }
2624
2625        /**
2626         * Method to return <em>tzais</em> (dusk) calculated using 90 minutes zmaniyos after {@link #getSeaLevelSunset() sea level sunset}.
2627         * 
2628         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic
2629         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
2630         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2631         *         documentation.
2632         * @see #getAlos90Zmanis()
2633         */
2634        public Date getTzais90Zmanis() {
2635                long shaahZmanis = getShaahZmanisGra();
2636                if (shaahZmanis == Long.MIN_VALUE) {
2637                        return null;
2638                }
2639                return getTimeOffset(getElevationAdjustedSunset(), shaahZmanis * 1.5);
2640        }
2641
2642        /**
2643         * Method to return <em>tzais</em> (dusk) calculated using 96 minutes zmaniyos after {@link #getSeaLevelSunset() sea level sunset}.
2644         * 
2645         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic
2646         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
2647         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2648         *         documentation.
2649         * @see #getAlos96Zmanis()
2650         */
2651        public Date getTzais96Zmanis() {
2652                long shaahZmanis = getShaahZmanisGra();
2653                if (shaahZmanis == Long.MIN_VALUE) {
2654                        return null;
2655                }
2656                return getTimeOffset(getElevationAdjustedSunset(), shaahZmanis * 1.6);
2657        }
2658
2659        /**
2660         * Method to return <em>tzais</em> (dusk) calculated as 90 minutes after sea level sunset. This method returns
2661         * <em>tzais</em> (nightfall) based on the opinion of the Magen Avraham that the time to walk the distance of a
2662         * <em>Mil</em> according to the <em><a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a></em>'s opinion
2663         * is 18 minutes for a total of 90 minutes based on the opinion of <em>Ula</em> who calculated <em>tzais</em> as 5
2664         * <em>Mil</em> after sea level shkiah (sunset). A similar calculation {@link #getTzais19Point8Degrees()}uses solar
2665         * position calculations based on this time.
2666         * 
2667         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic
2668         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
2669         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2670         *         documentation.
2671         * @see #getTzais19Point8Degrees()
2672         * @see #getAlos90()
2673         */
2674        public Date getTzais90() {
2675                return getTimeOffset(getElevationAdjustedSunset(), 90 * MINUTE_MILLIS);
2676        }
2677
2678        /**
2679         * This method returns <em>tzais</em> (nightfall) based on the opinion of the <em>Magen Avraham</em> that the time
2680         * to walk the distance of a <em>Mil</em> according to the <em><a href="https://en.wikipedia.org/wiki/Maimonides"
2681         * >Rambam</a></em>'s opinion is 2/5 of an hour (24 minutes) for a total of 120 minutes based on the opinion of
2682         * <em>Ula</em> who calculated <em>tzais</em> as 5 <em>Mil</em> after sea level <em>shkiah</em> (sunset). A similar
2683         * calculation {@link #getTzais26Degrees()} uses temporal calculations based on this time.
2684         * 
2685         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic
2686         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
2687         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2688         *         documentation.
2689         * @see #getTzais26Degrees()
2690         * @see #getAlos120()
2691         */
2692        public Date getTzais120() {
2693                return getTimeOffset(getElevationAdjustedSunset(), 120 * MINUTE_MILLIS);
2694        }
2695
2696        /**
2697         * Method to return <em>tzais</em> (dusk) calculated using 120 minutes zmaniyos after {@link #getSeaLevelSunset() sea level sunset}.
2698         * 
2699         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic
2700         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
2701         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2702         *         documentation.
2703         * @see #getAlos120Zmanis()
2704         */
2705        public Date getTzais120Zmanis() {
2706                long shaahZmanis = getShaahZmanisGra();
2707                if (shaahZmanis == Long.MIN_VALUE) {
2708                        return null;
2709                }
2710                return getTimeOffset(getElevationAdjustedSunset(), shaahZmanis * 2.0);
2711        }
2712
2713        /**
2714         * This calculates the time of <em>tzais</em> at the point when the sun is 16.1&deg; below the horizon. This is
2715         * the sun's dip below the horizon 72 minutes after sunset according Rabbeinu Tam's calculation of <em>tzais</em>
2716         * around the equinox in Jerusalem. This is the opinion of Rabbi Meir Posen in the  <a href=
2717         * "https://www.worldcat.org/oclc/956316270">Ohr Meir</a> and others. See Yisrael Vehazmanim vol I, 34:1:4.
2718         * For information on how this is calculated see the comments on {@link #getAlos16Point1Degrees()}
2719         * 
2720         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as northern and
2721         *         southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may
2722         *         not reach low enough below the horizon for this calculation, a null will be returned. See detailed
2723         *         explanation on top of the {@link AstronomicalCalendar} documentation.
2724         * @see #getTzais72()
2725         * @see #getAlos16Point1Degrees() for more information on this calculation.
2726         */
2727        public Date getTzais16Point1Degrees() {
2728                return getSunsetOffsetByDegrees(ZENITH_16_POINT_1);
2729        }
2730
2731        /**
2732         * For information on how this is calculated see the comments on {@link #getAlos26Degrees()}
2733         * 
2734         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as northern and
2735         *         southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may
2736         *         not reach low enough below the horizon for this calculation, a null will be returned. See detailed
2737         *         explanation on top of the {@link AstronomicalCalendar} documentation.
2738         * @see #getTzais120()
2739         * @see #getAlos26Degrees()
2740         */
2741        public Date getTzais26Degrees() {
2742                return getSunsetOffsetByDegrees(ZENITH_26_DEGREES);
2743        }
2744
2745        /**
2746         * For information on how this is calculated see the comments on {@link #getAlos18Degrees()}
2747         * 
2748         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as northern and
2749         *         southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may
2750         *         not reach low enough below the horizon for this calculation, a null will be returned. See detailed
2751         *         explanation on top of the {@link AstronomicalCalendar} documentation.
2752         * @see #getAlos18Degrees()
2753         */
2754        public Date getTzais18Degrees() {
2755                return getSunsetOffsetByDegrees(ASTRONOMICAL_ZENITH);
2756        }
2757
2758        /**
2759         * For information on how this is calculated see the comments on {@link #getAlos19Point8Degrees()}
2760         * 
2761         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as northern and
2762         *         southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may
2763         *         not reach low enough below the horizon for this calculation, a null will be returned. See detailed
2764         *         explanation on top of the {@link AstronomicalCalendar} documentation.
2765         * @see #getTzais90()
2766         * @see #getAlos19Point8Degrees()
2767         */
2768        public Date getTzais19Point8Degrees() {
2769                return getSunsetOffsetByDegrees(ZENITH_19_POINT_8);
2770        }
2771
2772        /**
2773         * A method to return <em>tzais</em> (dusk) calculated as 96 minutes after sea level sunset. For information on how
2774         * this is calculated see the comments on {@link #getAlos96()}.
2775         * 
2776         * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic
2777         *         Circle where there is at least one day a year where the sun does not rise, and one where it does not set,
2778         *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
2779         *         documentation.
2780         * @see #getAlos96()
2781         */
2782        public Date getTzais96() {
2783                return getTimeOffset(getElevationAdjustedSunset(), 96 * MINUTE_MILLIS);
2784        }
2785
2786        /**
2787         * A method that returns the local time for fixed <em>chatzos</em>. This time is noon and midnight adjusted from
2788         * standard time to account for the local latitude. The 360&deg; of the globe divided by 24 calculates to 15&deg;
2789         * per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... <em>Chatzos</em> in 12:00 noon.
2790         * Lakewood, N.J., whose longitude is -74.2094, is 0.7906 away from the closest multiple of 15 at -75&deg;. This is
2791         * multiplied by 4 to yield 3 minutes and 10 seconds for a <em>chatzos</em> of 11:56:50. This method is not tied to
2792         * the theoretical 15&deg; timezones, but will adjust to the actual timezone and <a
2793         * href="http://en.wikipedia.org/wiki/Daylight_saving_time">Daylight saving time</a>.
2794         * 
2795         * @return the Date representing the local <em>chatzos</em>
2796         * @see GeoLocation#getLocalMeanTimeOffset()
2797         */
2798        public Date getFixedLocalChatzos() {
2799                return getTimeOffset(getDateFromTime(12.0 - getGeoLocation().getTimeZone().getRawOffset()
2800                                / (double) HOUR_MILLIS, true), -getGeoLocation().getLocalMeanTimeOffset());
2801        }
2802
2803        /**
2804         * A method that returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) calculated as 3
2805         * hours before {@link #getFixedLocalChatzos()}.
2806         * 
2807         * @return the <code>Date</code> of the latest <em>zman krias shema</em> calculated as 3 hours before
2808         *         {@link #getFixedLocalChatzos()}..
2809         * @see #getFixedLocalChatzos()
2810         * @see #getSofZmanTfilaFixedLocal()
2811         */
2812        public Date getSofZmanShmaFixedLocal() {
2813                return getTimeOffset(getFixedLocalChatzos(), -180 * MINUTE_MILLIS);
2814        }
2815
2816        /**
2817         * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) calculated as 2 hours
2818         * before {@link #getFixedLocalChatzos()}.
2819         * 
2820         * @return the <code>Date</code> of the latest <em>zman tfila</em>.
2821         * @see #getFixedLocalChatzos()
2822         * @see #getSofZmanShmaFixedLocal()
2823         */
2824        public Date getSofZmanTfilaFixedLocal() {
2825                return getTimeOffset(getFixedLocalChatzos(), -120 * MINUTE_MILLIS);
2826        }
2827
2828        /**
2829         * Returns the latest time of Kidush Levana according to the <a
2830         * href="http://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> opinion that it is calculated as
2831         * halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between molad and
2832         * molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad. If the time of
2833         * <em>sof zman Kiddush Levana</em> occurs during the day (between the <em>alos</em> and <em>tzais</em> passed in as
2834         * parameters), it returns the <em>alos</em> passed in. If a null alos or tzais are passed to this method, the
2835         * non-daytime adjusted time will be returned.
2836         * This method is available in the current release of the API but may change
2837         * or be removed in the future since it depends on the still changing {@link JewishCalendar} and related classes.
2838         * 
2839         * @param alos
2840         *            the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending
2841         *            at tzais), the time returned will be alos. If either the alos or tzais parameters are null, no daytime
2842         *            adjustment will be made.
2843         * @param tzais
2844         *            the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at
2845         *            tzais), the time returned will be alos. If either the alos or tzais parameters are null, no daytime
2846         *            adjustment will be made.
2847         * @return the Date representing the moment halfway between molad and molad. If the time occurs between
2848         *         <em>alos</em> and <em>tzais</em>, <em>alos</em> will be returned
2849         * @see #getSofZmanKidushLevanaBetweenMoldos()
2850         * @see #getSofZmanKidushLevana15Days(Date, Date)
2851         * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos()
2852         */
2853        public Date getSofZmanKidushLevanaBetweenMoldos(Date alos, Date tzais) {
2854                JewishCalendar jewishCalendar = new JewishCalendar();
2855                jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH),
2856                                getCalendar().get(Calendar.DAY_OF_MONTH));
2857
2858                // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in French
2859                // Polynesia on Dec 2027 when kiddush Levana 3 days can be said on <em>Rosh Chodesh</em>, the sof zman Kiddush Levana
2860                // will be on the 12th of the Teves. In the case of Anadyr, Russia on Jan, 2071, sof zman Kiddush Levana between the
2861                // moldos will occur is on the night of 17th of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).
2862                if(jewishCalendar.getJewishDayOfMonth() < 11 || jewishCalendar.getJewishDayOfMonth() > 16) { 
2863                        return null;
2864                }
2865                return getMoladBasedTime(jewishCalendar.getSofZmanKidushLevanaBetweenMoldos(), alos, tzais, false);
2866        }
2867        
2868        /**
2869         * Returns the Date of the molad based time if it occurs on the current date.Since Kiddush Levana can only be said
2870         * during the day, there are parameters to limit it to between <em>alos</em> and <em>tzais</em>. If the time occurs
2871         * between alos and tzais, tzais will be returned
2872         * 
2873         * @param moladBasedTime
2874         *            the molad based time such as molad, tchilas and sof zman Kiddush Levana
2875         * @param alos
2876         *            optional start of day to limit molad times to the end of the night before or beginning of the next night. Ignored if
2877         *            either this or tzais are null.
2878         * @param tzais
2879         *            optional end of day to limit molad times to the end of the night before or beginning of the next night. Ignored if
2880         *            either this or alos are null
2881         * @param techila
2882         *            is it the start of Kiddush Levana time or the end? If it is start roll it to the next <em>tzais</em>, and and if it
2883         *            is the end, return the end of the previous night (alos passed in). Ignored if either alos or tzais are null.
2884         * @return the molad based time. If the zman does not occur during the current date, null will be returned. 
2885         */
2886        private Date getMoladBasedTime(Date moladBasedTime, Date alos, Date tzais, boolean techila) {
2887                Date lastMidnight = getMidnightLastNight();
2888                Date midnightTonigh = getMidnightTonight();
2889                if(!(moladBasedTime.before(lastMidnight) || moladBasedTime.after(midnightTonigh))){
2890                        if(alos != null || tzais != null) {
2891                                if(techila && !(moladBasedTime.before(tzais) || moladBasedTime.after(alos))){
2892                                        return tzais;
2893                                } else {
2894                                        return alos;
2895                                }
2896                        }
2897                        return moladBasedTime;
2898                }
2899                return null;
2900        }
2901
2902        /**
2903         * Returns the latest time of Kiddush Levana according to the <a
2904         * href="http://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> opinion that it is calculated as
2905         * halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between
2906         * <em>molad</em> and <em>molad</em> (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad. The sof
2907         * zman Kiddush Levana will be returned even if it occurs during the day. To limit the time to between <em>tzais</em>
2908         * and <em>alos</em>, see {@link #getSofZmanKidushLevanaBetweenMoldos(Date, Date)}.
2909         * This method is available in the current release of the API but may change or be removed in the future since it depends
2910         * on the still changing {@link JewishCalendar} and related classes, and adds a dependency to the hebrewcalendar package.
2911         * 
2912         * @return the Date representing the moment halfway between molad and molad. If the time occurs between
2913         *         <em>alos</em> and <em>tzais</em>, <em>alos</em> will be returned
2914         * @see #getSofZmanKidushLevanaBetweenMoldos(Date, Date)
2915         * @see #getSofZmanKidushLevana15Days()
2916         * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos()
2917         */
2918        public Date getSofZmanKidushLevanaBetweenMoldos() {
2919                return getSofZmanKidushLevanaBetweenMoldos(null, null); 
2920        }
2921
2922        /**
2923         * Returns the latest time of <em>Kiddush Levana</em> calculated as 15 days after the <em>molad</em>. This is the
2924         * opinion brought down in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the
2925         * <a href="http://en.wikipedia.org/wiki/Moses_Isserles">Rema</a> who brings down the opinion of the <a
2926         * href="http://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> of calculating
2927         * {@link #getSofZmanKidushLevanaBetweenMoldos(Date, Date) half way between molad and mold} is of the opinion that
2928         * Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, See Rabbi
2929         * Dovid Heber's very detailed write-up in Siman Daled (chapter 4) of <a href="http://www.hebrewbooks.org/53000">Shaarei
2930         * Zmanim</a>. If the time of <em>sof zman Kiddush Levana</em> occurs during the day (between the <em>alos</em> and
2931         * <em>tzais</em> passed in as parameters), it returns the <em>alos</em> passed in. If a null alos or tzais are
2932         * passed to this method, the non-daytime adjusted time will be returned.
2933         * This method is available in the current release of the API but may change or be removed in the future since
2934         * it depends on the still changing {@link JewishCalendar} and related classes.
2935         * @todo Add hyperlinks to documentation.
2936         * 
2937         * @param alos
2938         *            the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending
2939         *            at tzais), the time returned will be alos. If either the alos or tzais parameters are null, no daytime
2940         *            adjustment will be made.
2941         * @param tzais
2942         *            the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at
2943         *            tzais), the time returned will be alos. If either the alos or tzais parameters are null, no daytime
2944         *            adjustment will be made.
2945         *
2946         * @return the Date representing the moment 15 days after the molad. If the time occurs between <em>alos</em> and
2947         *         <em>tzais</em>, <em>alos</em> will be returned
2948         * 
2949         * @see #getSofZmanKidushLevanaBetweenMoldos(Date, Date)
2950         * @see JewishCalendar#getSofZmanKidushLevana15Days()
2951         */
2952        public Date getSofZmanKidushLevana15Days(Date alos, Date tzais) {
2953                JewishCalendar jewishCalendar = new JewishCalendar();
2954                jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH),
2955                                getCalendar().get(Calendar.DAY_OF_MONTH));
2956                // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in
2957                // French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on <em>Rosh Chodesh</em>, the sof zman Kiddush
2958                // Levana will be on the 12th of the Teves. in the case of Anadyr, Russia on Jan, 2071, sof zman kiddush levana will
2959                // occur after midnight on the 17th of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).
2960                if(jewishCalendar.getJewishDayOfMonth() < 11 || jewishCalendar.getJewishDayOfMonth() > 17) {
2961                        return null;
2962                }
2963                return getMoladBasedTime(jewishCalendar.getSofZmanKidushLevana15Days(), alos, tzais, false);
2964        }
2965
2966        /**
2967         * Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the opinion brought down
2968         * in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the
2969         * <a href="http://en.wikipedia.org/wiki/Moses_Isserles">Rema</a> who brings down the opinion of the <a
2970         * href="http://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> of calculating
2971         * {@link #getSofZmanKidushLevanaBetweenMoldos(Date, Date) half way between molad and mold} is of the opinion that
2972         * Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, See Rabbi
2973         * Dovid Heber's very detailed write-up in Siman Daled (chapter 4) of <a href="http://www.hebrewbooks.org/53000">Shaarei
2974         * Zmanim</a>. The sof zman Kiddush Levana will be returned even if it occurs during the day. To limit the time to
2975         * between <em>tzais</em> and <em>alos</em>, see {@link #getSofZmanKidushLevana15Days(Date, Date)}.
2976         * This method is available in the current release of the API but may change or be removed in the future since it depends
2977         * on the still changing {@link JewishCalendar} and related classes.
2978         * 
2979         * @return the Date representing the moment 15 days after the <em>molad</em>. If the time occurs between
2980         *         <em>alos</em> and <em>tzais</em>, <em>alos</em> will be returned
2981         * 
2982         * @see #getSofZmanKidushLevana15Days(Date, Date)
2983         * @see #getSofZmanKidushLevanaBetweenMoldos()
2984         * @see JewishCalendar#getSofZmanKidushLevana15Days()
2985         * 
2986         */
2987        public Date getSofZmanKidushLevana15Days() {
2988                return getSofZmanKidushLevana15Days(null, null);
2989        }
2990        
2991        /**
2992         * Returns the earliest time of <em>Kiddush Levana</em> according to <em>Rabbeinu Yonah</em>'s opinion that it can
2993         * be said 3 days after the molad. The time will be returned even if it occurs during the day when <em>Kiddush
2994         * Levana</em> can't be said. Use {@link #getTchilasZmanKidushLevana3Days(Date, Date)} if you want to limit the time
2995         * to night hours.
2996         * This method is available in the current release of the API but may change or be removed in the future
2997         * since it depends on the still changing {@link JewishCalendar} and related classes.
2998         * 
2999         * @return the Date representing the moment 3 days after the molad.
3000         * @see #getTchilasZmanKidushLevana3Days(Date, Date)
3001         * @see #getTchilasZmanKidushLevana7Days()
3002         * @see JewishCalendar#getTchilasZmanKidushLevana3Days()
3003         */
3004        public Date getTchilasZmanKidushLevana3Days() {
3005                return getTchilasZmanKidushLevana3Days(null, null);
3006        }
3007
3008        /**
3009         * Returns the earliest time of <em>Kiddush Levana</em> according to <em>Rabbeinu Yonah</em>'s opinion that it can
3010         * be said 3 days after the molad. If the time of <em>tchilas zman Kiddush Levana</em> occurs during the day (between
3011         * <em>alos</em> and <em>tzais</em> passed to this method) it will return the following <em>tzais</em>. If null is passed
3012         * for either alos or tzais, the actual <em>tchilas zman Kiddush Levana</em> will be returned, regardless of if it is
3013         * during the day or not.
3014         * This method is available in the current release of the API but may change or be
3015         * removed in the future since it depends on the still changing {@link JewishCalendar} and related classes.
3016         * 
3017         * @param alos
3018         *            the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending
3019         *            at tzais), the time returned will be tzais. If either the alos or tzais parameters are null, no daytime
3020         *            adjustment will be made.
3021         * @param tzais
3022         *            the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at
3023         *            tzais), the time returned will be tzais. If either the alos or tzais parameters are null, no daytime
3024         *            adjustment will be made.
3025         *
3026         * @return the Date representing the moment 3 days after the molad. If the time occurs between <em>alos</em> and
3027         *         <em>tzais</em>, <em>tzais</em> will be returned
3028         * @see #getTchilasZmanKidushLevana3Days()
3029         * @see #getTchilasZmanKidushLevana7Days(Date, Date)
3030         * @see JewishCalendar#getTchilasZmanKidushLevana3Days()
3031         */
3032        public Date getTchilasZmanKidushLevana3Days(Date alos, Date tzais) {
3033                JewishCalendar jewishCalendar = new JewishCalendar();
3034                jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH),
3035                                getCalendar().get(Calendar.DAY_OF_MONTH));
3036                
3037                // Do not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 3 days for
3038                // the extreme case of Rapa Iti in French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on the evening
3039                // of the 30th, the second night of Rosh Chodesh. The 3rd day after the <em>molad</em> will be on the 4th of the month.
3040                // In the case of Anadyr, Russia on Jan, 2071, when sof zman kiddush levana is on the 17th of the month, the 3rd day
3041                // from the molad will be on the 5th day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).
3042                if(jewishCalendar.getJewishDayOfMonth() > 5 && jewishCalendar.getJewishDayOfMonth() < 30) {
3043                        return null;
3044                }
3045                
3046                Date zman = getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), alos, tzais, true);
3047                
3048                //Get the following month's zman kiddush Levana for the extreme case of Rapa Iti in French Polynesia on Dec 2027 when
3049                // kiddush Levana can be said on Rosh Chodesh (the evening of the 30th). See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (page 32)
3050                if(zman == null && jewishCalendar.getJewishDayOfMonth() == 30) {
3051                        jewishCalendar.forward(Calendar.MONTH, 1);
3052                        zman = getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), null, null, true);
3053                }
3054                
3055                return zman;
3056        }
3057        
3058        /**
3059         * Returns the point in time of <em>Molad</em> as a <code>Date</code> Object. For the traditional day of week, hour,
3060         * minute and chalakim, {@link JewishCalendar#getMoladAsDate()} and the not yet completed
3061         * {@link com.kosherjava.zmanim.hebrewcalendar.HebrewDateFormatter} that will have formatting for this.
3062         * 
3063         * @return the Date representing the moment of the molad. If the molad does not occur on this day, a null will be returned.
3064         * 
3065         * @see #getTchilasZmanKidushLevana3Days()
3066         * @see #getTchilasZmanKidushLevana7Days(Date, Date)
3067         * @see JewishCalendar#getMoladAsDate()
3068         */
3069        public Date getZmanMolad() {
3070                JewishCalendar jewishCalendar = new JewishCalendar();
3071                jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH),
3072                                getCalendar().get(Calendar.DAY_OF_MONTH));
3073                
3074                // Optimize to not calculate for impossible dates, but account for extreme cases. The molad in the extreme case of Rapa
3075                // Iti in French Polynesia on Dec 2027 occurs on the night of the 27th of Kislev. In the case of Anadyr, Russia on
3076                // Jan 2071, the molad will be on the 2nd day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).
3077                if(jewishCalendar.getJewishDayOfMonth() > 2 && jewishCalendar.getJewishDayOfMonth() < 27) {
3078                        return null;
3079                }
3080                Date molad = getMoladBasedTime(jewishCalendar.getMoladAsDate(), null, null, true);
3081
3082                // deal with molad that happens on the end of the previous month
3083                if(molad == null && jewishCalendar.getJewishDayOfMonth() > 26 ) {
3084                        jewishCalendar.forward(Calendar.MONTH, 1);
3085                        molad = getMoladBasedTime(jewishCalendar.getMoladAsDate(), null, null, true);
3086                }
3087                return molad;
3088        }
3089        
3090        /**
3091         * Used by Molad based zmanim to determine if zmanim occur during the current day.
3092         * @see #getMoladBasedTime(Date, Date, Date, boolean)
3093         * @return previous midnight
3094         */
3095        private Date getMidnightLastNight() {
3096                Calendar midnight = (Calendar)getCalendar().clone();
3097                // reset hour, minutes, seconds and millis
3098                midnight.set(Calendar.HOUR_OF_DAY, 0);
3099                midnight.set(Calendar.MINUTE, 0);
3100                midnight.set(Calendar.SECOND, 0);
3101                midnight.set(Calendar.MILLISECOND, 0);
3102                return midnight.getTime();
3103        }
3104        
3105        /**
3106         * Used by Molad based zmanim to determine if zmanim occur during the current day.
3107         * @see #getMoladBasedTime(Date, Date, Date, boolean)
3108         * @return following midnight
3109         */
3110        private Date getMidnightTonight() {
3111                Calendar midnight = (Calendar)getCalendar().clone();
3112                midnight.add(Calendar.DAY_OF_YEAR, 1);//roll to tonight
3113                midnight.set(Calendar.HOUR_OF_DAY, 0);
3114                midnight.set(Calendar.MINUTE, 0);
3115                midnight.set(Calendar.SECOND, 0);
3116                midnight.set(Calendar.MILLISECOND, 0);
3117                return midnight.getTime();
3118        }
3119
3120        /**
3121         * Returns the earliest time of <em>Kiddush Levana</em> according to the opinions that it should not be said until 7
3122         * days after the molad. If the time of <em>tchilas zman Kiddush Levana</em> occurs during the day (between
3123         * <em>{@link ZmanimCalendar#getAlos72() Alos}</em> and <em>{@link ZmanimCalendar#getTzais72() tzais}</em>) it
3124         * return the next <em>tzais</em>. This method is available in the current release of the API but may change or be
3125         * removed in the future since it depends on the still changing {@link JewishCalendar} and related classes.
3126         * 
3127         * @param alos
3128         *            the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending
3129         *            at tzais), the time returned will be tzais. If either the alos or tzais parameters are null, no daytime
3130         *            adjustment will be made.
3131         * @param tzais
3132         *            the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at
3133         *            tzais), the time returned will be tzais. If either the alos or tzais parameters are null, no daytime
3134         *            adjustment will be made.
3135         *
3136         * @return the Date representing the moment 7 days after the molad. If the time occurs between <em>alos</em> and
3137         *         <em>tzais</em>, <em>tzais</em> will be returned
3138         * @see #getTchilasZmanKidushLevana3Days(Date, Date)
3139         * @see #getTchilasZmanKidushLevana7Days()
3140         * @see JewishCalendar#getTchilasZmanKidushLevana7Days()
3141         */
3142        public Date getTchilasZmanKidushLevana7Days(Date alos, Date tzais) {
3143                JewishCalendar jewishCalendar = new JewishCalendar();
3144                jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH),
3145                                getCalendar().get(Calendar.DAY_OF_MONTH));
3146                
3147                // Optimize to not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 7 days for
3148                // the extreme case of Rapa Iti in French Polynesia on Jan 2028 (when kiddush Levana 3 days can be said on the evening
3149                // of the 30th, the second night of Rosh Chodesh), the 7th day after the molad will be on the 4th of the month.
3150                // In the case of Anadyr, Russia on Jan, 2071, when sof zman kiddush levana is on the 17th of the month, the 7th day
3151                // from the molad will be on the 9th day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).
3152                if(jewishCalendar.getJewishDayOfMonth() < 4 || jewishCalendar.getJewishDayOfMonth() > 9) { 
3153                        return null;
3154                }
3155                
3156                return getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana7Days(), alos, tzais, true);
3157        }
3158
3159        /**
3160         * Returns the earliest time of <em>Kiddush Levana</em> according to the opinions that it should not be said until 7
3161         * days after the molad. The time will be returned even if it occurs during the day when <em>Kiddush
3162         * Levana</em> can't be said. Use {@link #getTchilasZmanKidushLevana7Days(Date, Date)} if you want to limit the time
3163         * to night hours.
3164         * This method is available in the current release of the API but may change or be removed in the future
3165         * since it depends on the still changing {@link JewishCalendar} and related classes.
3166         * 
3167         * @return the Date representing the moment 7 days after the molad regardless of it is day or night.
3168         * @see #getTchilasZmanKidushLevana7Days(Date, Date)
3169         * @see JewishCalendar#getTchilasZmanKidushLevana7Days()
3170         * @see #getTchilasZmanKidushLevana3Days()
3171         */
3172        public Date getTchilasZmanKidushLevana7Days() {
3173                return getTchilasZmanKidushLevana7Days(null, null);
3174        }
3175
3176        /**
3177         * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the opinion of the
3178         * <em><a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a></em>. This time is identical to the {@link
3179         * #getSofZmanTfilaGRA() Sof zman tfilah GRA} and is provided as a convenience method for those who are unaware how
3180         * this zman is calculated. This time is 4 hours into the day based on the opinion of the <em><a href=
3181         * "https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a></em> that the day is calculated from sunrise to sunset. This
3182         * returns the time 4 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea level sunrise}.
3183         * 
3184         * @see ZmanimCalendar#getShaahZmanisGra()
3185         * @see ZmanimCalendar#getSofZmanTfilaGRA()
3186         * @return the <code>Date</code> one is allowed eating chametz on Erev Pesach. If the calculation can't be computed
3187         *         such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
3188         *         where it does not set, a null will be returned. See detailed explanation on top of the
3189         *         {@link AstronomicalCalendar} documentation.
3190         */
3191        public Date getSofZmanAchilasChametzGRA() {
3192                return getSofZmanTfilaGRA();
3193        }
3194
3195        /**
3196         * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the opinion of the
3197         * <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}.
3198         * This time is identical to the {@link #getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time
3199         * is 4 <em>{@link #getShaahZmanisMGA() shaos zmaniyos}</em> (temporal hours) after {@link #getAlos72() dawn} based
3200         * on the opinion of the <em>MGA</em> that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes
3201         * before sunrise to {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 4 *
3202         * {@link #getShaahZmanisMGA()} after {@link #getAlos72() dawn}.
3203         * 
3204         * @return the <code>Date</code> of the latest time of eating chametz. If the calculation can't be computed such as
3205         *         in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
3206         *         does not set), a null will be returned. See detailed explanation on top of the
3207         *         {@link AstronomicalCalendar} documentation.
3208         * @see #getShaahZmanisMGA()
3209         * @see #getAlos72()
3210         * @see #getSofZmanTfilaMGA72Minutes()
3211         */
3212        public Date getSofZmanAchilasChametzMGA72Minutes() {
3213                return getSofZmanTfilaMGA72Minutes();
3214        }
3215
3216        /**
3217         * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the opinion of the
3218         * <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos16Point1Degrees() 16.1&deg;} before
3219         * {@link #getSunrise() sunrise}. This time is 4 <em>{@link #getShaahZmanis16Point1Degrees() shaos zmaniyos}</em>
3220         * (solar hours) after {@link #getAlos16Point1Degrees() dawn} based on the opinion of the <em>MGA</em> that the day
3221         * is calculated from dawn to nightfall with both being 16.1&deg; below sunrise or sunset. This returns the time of
3222         * 4 {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.
3223         * 
3224         * @return the <code>Date</code> of the latest time of eating chametz. If the calculation can't be computed such as
3225         *         northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where
3226         *         the sun may not reach low enough below the horizon for this calculation, a null will be returned. See
3227         *         detailed explanation on top of the {@link AstronomicalCalendar} documentation.
3228         * 
3229         * @see #getShaahZmanis16Point1Degrees()
3230         * @see #getAlos16Point1Degrees()
3231         * @see #getSofZmanTfilaMGA16Point1Degrees()
3232         */
3233        public Date getSofZmanAchilasChametzMGA16Point1Degrees() {
3234                return getSofZmanTfilaMGA16Point1Degrees();
3235        }
3236
3237        /**
3238         * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of the
3239         * <em><a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a></em> This time is 5 hours into the day based on the opinion of the
3240         * <em><a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a></em> that the day is calculated from sunrise to sunset. This returns the
3241         * time 5 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea level sunrise}.
3242         * 
3243         * @see ZmanimCalendar#getShaahZmanisGra()
3244         * @return the <code>Date</code> of the latest time for burning chametz on Erev Pesach. If the calculation can't be
3245         *         computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,
3246         *         and one where it does not set, a null will be returned. See detailed explanation on top of the
3247         *         {@link AstronomicalCalendar} documentation.
3248         */
3249        public Date getSofZmanBiurChametzGRA() {
3250                return getTimeOffset(getElevationAdjustedSunrise(), getShaahZmanisGra() * 5);
3251        }
3252
3253        /**
3254         * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of the
3255         * <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}.
3256         * This time is 5 <em>{@link #getShaahZmanisMGA() shaos zmaniyos}</em> (temporal hours) after {@link #getAlos72()
3257         * dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a {@link #getAlos72() dawn} of 72
3258         * minutes before sunrise to {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 5
3259         * * {@link #getShaahZmanisMGA()} after {@link #getAlos72() dawn}.
3260         * 
3261         * @return the <code>Date</code> of the latest time for burning chametz on Erev Pesach. If the calculation can't be
3262         *         computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,
3263         *         and one where it does not set), a null will be returned. See detailed explanation on top of the
3264         *         {@link AstronomicalCalendar} documentation.
3265         * @see #getShaahZmanisMGA()
3266         * @see #getAlos72()
3267         */
3268        public Date getSofZmanBiurChametzMGA72Minutes() {
3269                return getTimeOffset(getAlos72(), getShaahZmanisMGA() * 5);
3270        }
3271
3272        /**
3273         * This method returns the latest time for burning <em>chametz</em> on <em>Erev Pesach</em> according to the opinion
3274         * of the <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA)</a></em> based on <em>alos</em> being {@link #getAlos16Point1Degrees() 16.1&deg;} before
3275         * {@link #getSunrise() sunrise}. This time is 5 <em>{@link #getShaahZmanis16Point1Degrees() shaos zmaniyos}</em>
3276         * (solar hours) after {@link #getAlos16Point1Degrees() dawn} based on the opinion of the <em>MGA</em> that the day
3277         * is calculated from dawn to nightfall with both being 16.1&deg; below sunrise or sunset. This returns the time of
3278         * 5 {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.
3279         * 
3280         * @return the <code>Date</code> of the latest time for burning chametz on Erev Pesach. If the calculation can't be
3281         *         computed such as northern and southern locations even south of the Arctic Circle and north of the
3282         *         Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a null
3283         *         will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
3284         * 
3285         * @see #getShaahZmanis16Point1Degrees()
3286         * @see #getAlos16Point1Degrees()
3287         */
3288        public Date getSofZmanBiurChametzMGA16Point1Degrees() {
3289                return getTimeOffset(getAlos16Point1Degrees(), getShaahZmanis16Point1Degrees() * 5);
3290        }
3291
3292        /**
3293         * A method that returns "solar" midnight, or the time when the sun is at its <a
3294         * href="http://en.wikipedia.org/wiki/Nadir">nadir</a>.
3295         * <b>Note:</b> this method is experimental and might be removed.
3296         * 
3297         * @return the <code>Date</code> of Solar Midnight (chatzos layla). If the calculation can't be computed such as in
3298         *         the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
3299         *         does not set, a null will be returned. See detailed explanation on top of the
3300         *         {@link AstronomicalCalendar} documentation.
3301         */
3302        public Date getSolarMidnight() {
3303                ZmanimCalendar clonedCal = (ZmanimCalendar) clone();
3304                clonedCal.getCalendar().add(Calendar.DAY_OF_MONTH, 1);
3305                Date sunset = getSeaLevelSunset();
3306                Date sunrise = clonedCal.getSeaLevelSunrise();
3307                return getTimeOffset(sunset, getTemporalHour(sunset, sunrise) * 6);
3308        }
3309        
3310        /**
3311         * A method that returns the <em><a href="https://en.wikipedia.org/wiki/Shneur_Zalman_of_Liadi">Baal Hatanya</a></em>'s
3312         * <em>netz amiti</em> (sunrise) without {@link AstronomicalCalculator#getElevationAdjustment(double)
3313         * elevation adjustment}. This forms the base for the <em>Baal Hatanya</em>'s dawn based calculations that are
3314         * calculated as a dip below the horizon before sunrise.
3315         *
3316         * According to the <em>Baal Hatanya</em>, <em>netz amiti</em>, or true (halachic) sunrise, is when the top of the sun's
3317         * disk is visible at an elevation similar to the mountains of Eretz Yisrael. The time is calculated as the point at which
3318         * the center of the sun's disk is 1.583&deg; below the horizon. This degree based calculation can be found in Rabbi Shalom
3319         * DovBer Levine's commentary on The <a href="http://www.chabadlibrary.org/books/pdf/Seder-Hachnosas-Shabbos.pdf">Baal
3320         * Hatanya's Seder Hachnasas Shabbos</a>. From an elevation of 546 meters, the top of <a href=
3321         * "https://en.wikipedia.org/wiki/Mount_Carmel">Har Hacarmel</a>, the sun disappears when it is 1&deg; 35' or 1.583&deg;
3322         * below the sea level horizon. This in turn is based on the Gemara <a href=
3323         * "http://www.hebrewbooks.org/shas.aspx?mesechta=2&amp;daf=35">Shabbos 35a</a>. There are other opinions brought down by
3324         * Rabbi Levine, including Rabbi Yosef Yitzchok
3325         * Feigelstock who calculates it as the degrees below the horizon 4 minutes after sunset in Yerushalaym (on the equinox). That
3326         * is brought down as 1.583&deg;. This is identical to the 1&deg; 35' zman and is probably a typo and should be 1.683&deg;.
3327         * These calculations are used by most <a href="https://en.wikipedia.org/wiki/Chabad">Chabad</a> calendars that use the
3328         * <em>Baal Hatanya</em>'s Zmanim. See
3329         * <a href="https://www.chabad.org/library/article_cdo/aid/3209349/jewish/About-Our-Zmanim-Calculations.htm">About Our Zmanim
3330         * Calculations @ Chabad.org</a>.
3331         *
3332         * Note: <em>netz amiti</em> is used only for calculating certain zmanim, and is intentionally unpublished. For practical purposes, 
3333         * daytime mitzvos like shofar and lulav should not be done until after the published time for netz-sunrise.
3334         * 
3335         * @return the <code>Date</code> representing the exact sea-level <em>netz amiti</em> (sunrise) time. If the calculation can't be
3336         *         computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
3337         *         where it does not set, a null will be returned. See detailed explanation on top of the page.
3338         * 
3339         * @see #getSunrise()
3340         * @see #getSeaLevelSunrise()
3341         * @see #getSunsetBaalHatanya()
3342         * @see #ZENITH_1_POINT_583
3343         */
3344        private Date getSunriseBaalHatanya() {
3345                return getSunriseOffsetByDegrees(ZENITH_1_POINT_583);
3346        }
3347
3348        /**
3349         * A method that returns the <em><a href="https://en.wikipedia.org/wiki/Shneur_Zalman_of_Liadi">Baal Hatanya</a></em>'s
3350         * <em>shkiah amiti</em> (sunset) without {@link AstronomicalCalculator#getElevationAdjustment(double)
3351         * elevation adjustment}. This forms the base for the <em>Baal Hatanya</em>'s  dusk based calculations that are calculated
3352         * as a dip below the horizon after sunset.
3353         * 
3354         * According to the <em>Baal Hatanya</em>, <em>shkiah amiti</em>, true (halachic) sunset, is when the top of the 
3355         * sun's disk disappears from view at an elevation similar to the mountains of Eretz Yisrael.
3356         * This time is calculated as the point at which the center of the sun's disk is 1.583 degrees below the horizon.
3357         *
3358         * Note: <em>shkiah amiti</em> is used only for calculating certain zmanim, and is intentionally unpublished. For practical 
3359         * purposes, all daytime mitzvos should be completed before the published time for shkiah-sunset.
3360         *
3361         * For further explanation of the calculations used for the <em>Baal Hatanya</em>'s Zmanim in this library, see
3362         * <a href="https://www.chabad.org/library/article_cdo/aid/3209349/jewish/About-Our-Zmanim-Calculations.htm">About Our Zmanim
3363         * Calculations @ Chabad.org</a>.
3364         * 
3365         * @return the <code>Date</code> representing the exact sea-level <em>shkiah amiti</em> (sunset) time. If the calculation
3366         *         can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not
3367         *         rise, and one where it does not set, a null will be returned. See detailed explanation on top of the
3368         *         {@link AstronomicalCalendar} documentation.
3369         * 
3370         * @see #getSunset()
3371         * @see #getSeaLevelSunset()
3372         * @see #getSunriseBaalHatanya()
3373         * @see #ZENITH_1_POINT_583
3374         */
3375        private Date getSunsetBaalHatanya() {
3376                return getSunsetOffsetByDegrees(ZENITH_1_POINT_583);
3377        }
3378
3379        /**
3380         * A method that returns the <em><a href="https://en.wikipedia.org/wiki/Shneur_Zalman_of_Liadi">Baal Hatanya</a></em>'s
3381         * a <em>shaah zmanis</em> ({@link #getTemporalHour(Date, Date) temporal hour}). This forms the base for the
3382         * <em>Baal Hatanya</em>'s  day  based calculations that are calculated
3383         * as a 1.583&deg; dip below the horizon after sunset.
3384         * 
3385         * According to the <em>Baal Hatanya</em>, <em>shkiah amiti</em>, true (halachic) sunset, is when the top of the 
3386         * sun's disk disappears from view at an elevation similar to the mountains of Eretz Yisrael.
3387         * This time is calculated as the point at which the center of the sun's disk is 1.583 degrees below the horizon.
3388         * 
3389         * 
3390         * 
3391         * A method that returns a <em>shaah zmanis</em> ( {@link #getTemporalHour(Date, Date) temporal hour}) calculated 
3392         * based on the <em><a href="https://en.wikipedia.org/wiki/Shneur_Zalman_of_Liadi">Baal Hatanya</a></em>'s <em>netz
3393         * amiti</em> and <em>shkiah amiti</em> using a dip of 1.583&deg; below the sea level horizon. This calculation divides
3394         * the day based on the opinion of the <em>Baal Hatanya</em> that the day runs from {@link #getSunriseBaalHatanya()
3395         * netz amiti} to {@link #getSunsetBaalHatanya() shkiah amiti}. The calculations are based on a day from {@link
3396         * #getSunriseBaalHatanya() sea level netz amiti} to {@link #getSunsetBaalHatanya() sea level shkiah amiti}. The day
3397         * is split into 12 equal parts with each one being a <em>shaah zmanis</em>. This method is similar to {@link
3398         * #getTemporalHour}, but all calculations are based on a sea level sunrise and sunset.
3399         * @todo Copy sunrise and sunset comments here as applicable.
3400         * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em> calculated from
3401         *         {@link #getSunriseBaalHatanya() <em>netz amiti</em> (sunrise)} to {@link #getSunsetBaalHatanya() <em>shkiah amiti</em>
3402         *         ("real" sunset)}. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a
3403         *         year where the sun does not rise, and one where it does not set, {@link Long#MIN_VALUE} will be returned. See
3404         *         detailed explanation on top of the {@link AstronomicalCalendar} documentation.
3405         * 
3406         * @see #getTemporalHour(Date, Date)
3407         * @see #getSunriseBaalHatanya()
3408         * @see #getSunsetBaalHatanya()
3409         * @see #ZENITH_1_POINT_583
3410         */
3411        public long getShaahZmanisBaalHatanya() {
3412                return getTemporalHour(getSunriseBaalHatanya(), getSunsetBaalHatanya());
3413        }
3414
3415        /**
3416         * Returns the <em><a href="https://en.wikipedia.org/wiki/Shneur_Zalman_of_Liadi">Baal Hatanya</a></em>'s <em>alos</em> (dawn)
3417         * calculated as the time when the sun is 16.9&deg; below the eastern
3418         * {@link #GEOMETRIC_ZENITH geometric horizon} before {@link #getSunrise sunrise}. For more information the source
3419         * of 16.9&deg; see {@link #ZENITH_16_POINT_9}.
3420         * 
3421         * @see #ZENITH_16_POINT_9
3422         * @return The <code>Date</code> of dawn. If the calculation can't be computed such as northern and southern
3423         *         locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach
3424         *         low enough below the horizon for this calculation, a null will be returned. See detailed explanation on
3425         *         top of the {@link AstronomicalCalendar} documentation.
3426         */
3427        public Date getAlosBaalHatanya() {
3428                return getSunriseOffsetByDegrees(ZENITH_16_POINT_9);
3429        }
3430
3431        /**
3432         * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning). This time is 3
3433         * <em>{@link #getShaahZmanisBaalHatanya() shaos zmaniyos}</em> (solar hours) after {@link #getSunriseBaalHatanya() 
3434         * <em>netz amiti</em> (sunrise)} based on the opinion of the <em>Baal Hatanya</em> that the day is calculated from
3435         * sunrise to sunset. This returns the time 3 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() 
3436         * <em>netz amiti</em> (sunrise)}.
3437         * 
3438         * @see ZmanimCalendar#getSofZmanShma(Date, Date)
3439         * @see #getShaahZmanisBaalHatanya()
3440         * @return the <code>Date</code> of the latest zman shema according to the Baal Hatanya. If the calculation
3441         *         can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does
3442         *         not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the
3443         *         {@link AstronomicalCalendar} documentation.
3444         */
3445        public Date getSofZmanShmaBaalHatanya() {
3446                return getSofZmanShma(getSunriseBaalHatanya(), getSunsetBaalHatanya());
3447        }
3448
3449        /**
3450         * This method returns the latest <em>zman tfilah</em> (time to recite the morning prayers). This time is 4
3451         * hours into the day based on the opinion of the <em>Baal Hatanya</em> that the day is
3452         * calculated from sunrise to sunset. This returns the time 4 * {@link #getShaahZmanisBaalHatanya()} after
3453         * {@link #getSunriseBaalHatanya() <em>netz amiti</em> (sunrise)}.
3454         * 
3455         * @see ZmanimCalendar#getSofZmanTfila(Date, Date)
3456         * @see #getShaahZmanisBaalHatanya()
3457         * @return the <code>Date</code> of the latest zman tfilah. If the calculation can't be computed such as in the
3458         *         Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
3459         *         not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
3460         *         documentation.
3461         */
3462        public Date getSofZmanTfilaBaalHatanya() {
3463                return getSofZmanTfila(getSunriseBaalHatanya(), getSunsetBaalHatanya());
3464        }
3465
3466        /**
3467         * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the opinion of the
3468         * <em>Baal Hatanya</em>. This time is identical to the {@link #getSofZmanTfilaBaalHatanya() Sof zman
3469         * tfilah Baal Hatanya}. This time is 4 hours into the day based on the opinion of the <em>Baal
3470         * Hatanya</em> that the day is calculated from sunrise to sunset. This returns the time 4 *
3471         * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() <em>netz amiti</em> (sunrise)}.
3472         * 
3473         * @see #getShaahZmanisBaalHatanya()
3474         * @see #getSofZmanTfilaBaalHatanya()
3475         * @return the <code>Date</code> one is allowed eating chametz on Erev Pesach. If the calculation can't be computed
3476         *         such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one
3477         *         where it does not set, a null will be returned. See detailed explanation on top of the
3478         *         {@link AstronomicalCalendar} documentation.
3479         */
3480        public Date getSofZmanAchilasChametzBaalHatanya() {
3481                return getSofZmanTfilaBaalHatanya();
3482        }
3483
3484        /**
3485         * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of the
3486         * <em>Baal Hatanya</em>. This time is 5 hours into the day based on the opinion of the
3487         * <em>Baal Hatanya</em> that the day is calculated from sunrise to sunset. This returns the
3488         * time 5 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() <em>netz amiti</em> (sunrise)}.
3489         * 
3490         * @see #getShaahZmanisBaalHatanya()
3491         * @return the <code>Date</code> of the latest time for burning chametz on Erev Pesach. If the calculation can't be
3492         *         computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,
3493         *         and one where it does not set, a null will be returned. See detailed explanation on top of the
3494         *         {@link AstronomicalCalendar} documentation.
3495         */
3496        public Date getSofZmanBiurChametzBaalHatanya() {
3497                return getTimeOffset(getSunriseBaalHatanya(), getShaahZmanisBaalHatanya() * 5);
3498        }
3499
3500        /**
3501         * This method returns the time of <em>mincha gedola</em>. <em>Mincha gedola</em> is the earliest time one can pray
3502         * mincha. The <em><a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a></em> is of the opinion that it is
3503         * better to delay <em>mincha</em> until <em>{@link #getMinchaKetanaBaalHatanya() mincha ketana}</em> while the
3504         * <em><a href="https://en.wikipedia.org/wiki/Asher_ben_Jehiel">Ra"sh</a></em>,
3505         * <em><a href="https://en.wikipedia.org/wiki/Jacob_ben_Asher">Tur</a></em>, <em><a href=
3506         * "https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a></em> and others are of the opinion that <em>mincha</em> can be prayed
3507         * <em>lechatchila</em> starting at <em>mincha gedola</em>. This is calculated as 6.5 {@link #getShaahZmanisBaalHatanya()
3508         * sea level solar hours} after {@link #getSunriseBaalHatanya() <em>netz amiti</em> (sunrise)}. This calculation is based
3509         * on the opinion of the <em>Baal Hatanya</em> that the day is calculated from sunrise to sunset. This returns the time 6.5 *
3510         * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() <em>netz amiti</em> ("real" sunrise)}.
3511         * 
3512         * @see #getMinchaGedola(Date, Date)
3513         * @see #getShaahZmanisBaalHatanya()
3514         * @see #getMinchaKetanaBaalHatanya()
3515         * @return the <code>Date</code> of the time of mincha gedola. If the calculation can't be computed such as in the
3516         *         Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
3517         *         not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
3518         *         documentation.
3519         */
3520        public Date getMinchaGedolaBaalHatanya() {
3521                return getMinchaGedola(getSunriseBaalHatanya(), getSunsetBaalHatanya());
3522        }
3523
3524        /**
3525         * This is a convenience method that returns the later of {@link #getMinchaGedolaBaalHatanya()} and
3526         * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a <em>{@link #getShaahZmanisBaalHatanya() shaah zmanis}</em> is
3527         * less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise {@link #getMinchaGedolaBaalHatanya()}
3528         * will be returned.
3529         * 
3530         * @return the <code>Date</code> of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}.
3531         *         If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year
3532         *         where the sun does not rise, and one where it does not set, a null will be returned. See detailed
3533         *         explanation on top of the {@link AstronomicalCalendar} documentation.
3534         */
3535        public Date getMinchaGedolaBaalHatanyaGreaterThan30() {
3536                if (getMinchaGedola30Minutes() == null || getMinchaGedolaBaalHatanya() == null) {
3537                        return null;
3538                } else {
3539                        return getMinchaGedola30Minutes().compareTo(getMinchaGedolaBaalHatanya()) > 0 ? getMinchaGedola30Minutes()
3540                                        : getMinchaGedolaBaalHatanya();
3541                }
3542        }
3543
3544        /**
3545         * This method returns the time of <em>mincha ketana</em>. This is the preferred earliest time to pray
3546         * <em>mincha</em> in the opinion of the <em><a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a></em> and others.
3547         * For more information on this see the documentation on <em>{@link #getMinchaGedolaBaalHatanya() mincha gedola}</em>.
3548         * This is calculated as 9.5 {@link #getShaahZmanisBaalHatanya()  sea level solar hours} after {@link #getSunriseBaalHatanya()
3549         * <em>netz amiti</em> (sunrise)}. This calculation is calculated based on the opinion of the <em>Baal Hatanya</em> that the
3550         * day is calculated from sunrise to sunset. This returns the time 9.5 * {@link #getShaahZmanisBaalHatanya()} after {@link
3551         * #getSunriseBaalHatanya() <em>netz amiti</em> (sunrise)}.
3552         * 
3553         * @see #getMinchaKetana(Date, Date)
3554         * @see #getShaahZmanisBaalHatanya()
3555         * @see #getMinchaGedolaBaalHatanya()
3556         * @return the <code>Date</code> of the time of mincha ketana. If the calculation can't be computed such as in the
3557         *         Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
3558         *         not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
3559         *         documentation.
3560         */
3561        public Date getMinchaKetanaBaalHatanya() {
3562                return getMinchaKetana(getSunriseBaalHatanya(), getSunsetBaalHatanya());
3563        }
3564
3565        /**
3566         * This method returns the time of <em>plag hamincha</em>. This is calculated as 10.75 hours after sunrise. This
3567         * calculation is based on the opinion of the <em>Baal Hatanya</em> that the day is calculated
3568         * from sunrise to sunset. This returns the time 10.75 * {@link #getShaahZmanisBaalHatanya()} after
3569         * {@link #getSunriseBaalHatanya() <em>netz amiti</em> (sunrise)}.
3570         * 
3571         * @see #getPlagHamincha(Date, Date)
3572         * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as
3573         *         in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
3574         *         does not set, a null will be returned. See detailed explanation on top of the
3575         *         {@link AstronomicalCalendar} documentation.
3576         */
3577        public Date getPlagHaminchaBaalHatanya() {
3578                return getPlagHamincha(getSunriseBaalHatanya(), getSunsetBaalHatanya());
3579        }
3580
3581        /**
3582         * A method that returns <em>tzais</em> (nightfall) when the sun is 6&deg; below the western geometric horizon
3583         * (90&deg;) after {@link #getSunset sunset}. For information on the source of this calculation see
3584         * {@link #ZENITH_6_DEGREES}.
3585         * 
3586         * @return The <code>Date</code> of nightfall. If the calculation can't be computed such as northern and southern
3587         *         locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach
3588         *         low enough below the horizon for this calculation, a null will be returned. See detailed explanation on
3589         *         top of the {@link AstronomicalCalendar} documentation.
3590         * @see #ZENITH_6_DEGREES
3591         */
3592        public Date getTzaisBaalHatanya() {
3593                return this.getSunsetOffsetByDegrees(ZENITH_6_DEGREES);
3594        }
3595}