001/* 002 * Zmanim Java API 003 * Copyright © 2004-2026 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; version 2.1 of the License. 007 * 008 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 009 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 010 * details. 011 * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to 012 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA, 013 * or connect to: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html 014 */ 015package com.kosherjava.zmanim; 016 017import java.time.Duration; 018import java.time.Instant; 019import java.time.LocalTime; 020import java.time.temporal.ChronoUnit; 021 022import com.kosherjava.zmanim.util.AstronomicalCalculator; 023import com.kosherjava.zmanim.util.GeoLocation; 024import com.kosherjava.zmanim.hebrewcalendar.JewishCalendar; 025 026/** 027 * <p>This class extends ZmanimCalendar and provides many more <em>zmanim</em> than available in the ZmanimCalendar. The basis 028 * for most <em>zmanim</em> in this class are from the <em>sefer</em> <b><a href="https://hebrewbooks.org/9765">Yisroe 029 * Vehazmanim</a></b> by <b><a href="https://en.wikipedia.org/wiki/Yisroel_Dovid_Harfenes">Rabbi Yisrael Dovid Harfenes</a></b>. 030 * As an example of the number of different <em>zmanim</em> made available by this class, there are methods to return 18 different 031 * calculations for <em>alos</em> (dawn), 18 for <em>plag hamincha</em> and 29 for <em>tzais</em> available in this API. The real 032 * power of this API is the ease in calculating <em>zmanim</em> that are not part of the library. The methods for <em>zmanim</em> 033 * calculations not present in this class or its superclass {@link ZmanimCalendar} are contained in the {@link 034 * AstronomicalCalendar}, the base class of the calendars in our API since they are generic methods for calculating time based on 035 * degrees or time before or after {@link #getSunrise()} and {@link #getSunset() sunset} and are of interest for calculation 036 * beyond <em>zmanim</em> calculations. Here are some examples. <p>First create the Calendar for the location you would like to 037 * calculate: 038 * 039 * {@snippet lang='java' : 040 * String locationName = "Lakewood, NJ"; 041 * double latitude = 40.0828; // Lakewood, NJ 042 * double longitude = -74.222; // Lakewood, NJ 043 * double elevation = 20; // optional elevation correction in Meters 044 * // @link region="target_zone_link" substring="getAvailableZoneIds()" target="java.time.ZoneId#getAvailableZoneIds()" 045 * ZoneId zoneId = ZoneId.of("America/New_York"); // set the zoneId to a valid ZoneId listed in getAvailableZoneIds() 046 * // @end 047 * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, zoneId); 048 * ComprehensiveZmanimCalendar czc = new ComprehensiveZmanimCalendar(location); 049 * // Optionally set the date or it will default to today's date 050 * ZonedDateTime dateTime = ZonedDateTime.of(1969, Month.FEBRUARY.getValue(), 8, 0, 0, 0, 0, location.getZoneId()); 051 * czc.setZonedDateTime(dateTime); 052 * } 053 * 054 * <b>Note:</b> For locations such as Israel where the beginning and end of daylight savings time used to fluctuate from 055 * year to year, if your version of Java does not have an <a href= 056 * "https://www.oracle.com/java/technologies/tzdata-versions.html">up to date time zone database</a>, create a 057 * {@link java.time.ZoneId} with the known start and end of DST. 058 * To get <em>alos</em> calculated as 14° below the horizon (as calculated in the calendars published in Montreal), 059 * add {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90) to the 14° offset to get the desired time: 060 * {@snippet lang='java' : 061 * Instant alos14 = czc.getSunriseOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + 14); 062 * } 063 * To get <em>mincha gedola</em> calculated based on the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham 064 * (MGA)</a> using a <em>shaah zmanis</em> based on the day starting 16.1° below the horizon (and ending 16.1° after sunset) the 065 * following calculation can be used: 066 * 067 * {@snippet lang='java' : 068 * Instant minchaGedola = czc.getTimeOffset(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees() * 6.5); 069 * } 070 * or even simpler using the included convenience methods 071 * {@snippet lang='java' : 072 * Instant minchaGedola = czc.getMinchaGedola(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees()); 073 * } 074 * A little more complex example would be calculating <em>zmanim</em> that rely on a <em>shaah zmanis</em> that is 075 * not present in this library. While a drop more complex, it is still rather easy. An example would be to calculate 076 * the <a href="https://en.wikipedia.org/wiki/Israel_Isserlein">Trumas Hadeshen</a>'s <em>alos</em> to 077 * <em>tzais</em> based <em>plag hamincha</em> as calculated in the Machzikei Hadass calendar in Manchester, England. 078 * A number of this calendar's <em>zmanim</em> are calculated based on a day starting at <em>alos</em> of 12° before 079 * sunrise and ending at <em>tzais</em> of 7.083° after sunset. Be aware that since the <em>alos</em> and <em>tzais</em> 080 * do not use identical degree-based offsets, this leads to <em>chatzos</em> being at a time other than the 081 * {@link #getSunTransit() solar transit} (solar midday). To calculate this <em>zman</em>, use the following steps. Note 082 * that <em>plag hamincha</em> is 10.75 hours after the start of the day, and the following steps are all that it takes. 083 * {@snippet lang='java' : 084 * Instant plag = czc.getPlagHamincha(czc.getSunriseOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + 12), 085 * czc.getSunsetOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + ZmanimCalendar.ZENITH_7_POINT_083)); 086 * } 087 * Something a drop more challenging, but still simple, would be calculating a <em>zman</em> using the same "complex" 088 * offset day used in the above-mentioned Manchester calendar, but for a <em>shaos zmaniyos</em> based <em>zman</em> not 089 * supported by this library, such as calculating the point that one should be <em>makpid</em> 090 * not to eat on <em>erev Shabbos</em> or <em>erev Yom Tov</em>. This is 9 <em>shaos zmaniyos</em> into the day. 091 * <ol> 092 * <li>Calculate the <em>shaah zmanis</em> {@code Duration} for this day</li> 093 * <li>Add 9 of these <em>shaos zmaniyos</em> to <em>alos</em> starting at 12°</li> 094 * </ol> 095 * {@snippet lang='java' : 096 * Duration shaahZmanis = czc.getTemporalHour(czc.getSunriseOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH} + 12), 097 * czc.getSunsetOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + ZmanimCalendar.ZENITH_7_POINT_083)); 098 * Instant sofZmanAchila = getTimeOffset(czc.getSunriseOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH} + 12), 099 * shaahZmanis * 9); 100 * } 101 * Calculating this <em>sof zman achila</em> according to the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a> 102 * is simplicity itself. 103 * {@snippet lang='java' : 104 * Instant sofZmanAchila = czc.getTimeOffset(czc.getSunrise(), czc.getShaahZmanisGRA() * 9); 105 * } 106 * 107 * <h2>See documentation from the {@link ZmanimCalendar} parent class</h2> 108 * 109 * @author © Eliyahu Hershfeld 2004 - 2026 110 */ 111public class ComprehensiveZmanimCalendar extends ZmanimCalendar { 112 113 /** 114 * The zenith of 3.7° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 115 * @see #getTzaisGeonim3Point7Degrees() 116 */ 117 protected static final double ZENITH_3_POINT_7 = GEOMETRIC_ZENITH + 3.7; 118 119 /** 120 * The zenith of 3.8° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 121 * @see #getTzaisGeonim3Point8Degrees() 122 */ 123 protected static final double ZENITH_3_POINT_8 = GEOMETRIC_ZENITH + 3.8; 124 125 /** 126 * The zenith of 5.95° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 127 * @see #getTzaisGeonim5Point95Degrees() 128 */ 129 protected static final double ZENITH_5_POINT_95 = GEOMETRIC_ZENITH + 5.95; 130 131 /** 132 * The zenith of 7.083° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). This is often referred to as 133 * 7°5' (7° and 5 minutes). 134 * 135 * @see #getTzaisGeonim7Point083Degrees() 136 * @see #getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() 137 */ 138 protected static final double ZENITH_7_POINT_083 = GEOMETRIC_ZENITH + 7 + (5.0 / 60); 139 140 /** 141 * The zenith of 10.2° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 142 * @see #getMisheyakir10Point2Degrees() 143 */ 144 protected static final double ZENITH_10_POINT_2 = GEOMETRIC_ZENITH + 10.2; 145 146 /** 147 * The zenith of 11° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 148 * @see #getMisheyakir11Degrees() 149 */ 150 protected static final double ZENITH_11_DEGREES = GEOMETRIC_ZENITH + 11; 151 152 /** 153 * The zenith of 11.5° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 154 * @see #getMisheyakir11Point5Degrees() 155 */ 156 protected static final double ZENITH_11_POINT_5 = GEOMETRIC_ZENITH + 11.5; 157 158 /** 159 * The zenith of 12.85° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 160 * @see #getMisheyakir12Point85Degrees() 161 */ 162 protected static final double ZENITH_12_POINT_85 = GEOMETRIC_ZENITH + 12.85; 163 164 /** 165 * The zenith of 13.24° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 166 * @see #getBainHashmashosRT13Point24Degrees 167 */ 168 protected static final double ZENITH_13_POINT_24 = GEOMETRIC_ZENITH + 13.24; 169 170 /** 171 * The zenith of 19° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 172 * @see #getAlos19Degrees() 173 * @see #ZENITH_19_POINT_8 174 */ 175 protected static final double ZENITH_19_DEGREES = GEOMETRIC_ZENITH + 19; 176 177 /** 178 * The zenith of 19.8° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 179 * @see #getTzais19Point8Degrees() 180 * @see #getAlos19Point8Degrees() 181 * @see #ZENITH_19_DEGREES 182 */ 183 protected static final double ZENITH_19_POINT_8 = GEOMETRIC_ZENITH + 19.8; 184 185 /** 186 * The zenith of 26° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 187 * @see #getAlos26Degrees() 188 * @see #getTzais26Degrees() 189 * @see #getAlos120Minutes() 190 * @see #getTzais120Minutes() 191 */ 192 protected static final double ZENITH_26_DEGREES = GEOMETRIC_ZENITH + 26.0; 193 194 /** 195 * The zenith of 4.42° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 196 * @see #getTzaisGeonim4Point42Degrees() 197 */ 198 protected static final double ZENITH_4_POINT_42 = GEOMETRIC_ZENITH + 4.42; 199 200 /** 201 * The zenith of 4.66° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 202 * @see #getTzaisGeonim4Point66Degrees() 203 */ 204 protected static final double ZENITH_4_POINT_66 = GEOMETRIC_ZENITH + 4.66; 205 206 /** 207 * The zenith of 4.8° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 208 * @see #getTzaisGeonim4Point8Degrees() 209 */ 210 protected static final double ZENITH_4_POINT_8 = GEOMETRIC_ZENITH + 4.8; 211 212 /** 213 * The zenith of 16.9° below geometric zenith (90°). 214 * 215 * @see #getAlosBaalHatanya() 216 */ 217 protected static final double ZENITH_16_POINT_9 = GEOMETRIC_ZENITH + 16.9; 218 219 /** 220 * The zenith of 6° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 221 * @see #getTzaisBaalHatanya() 222 */ 223 protected static final double ZENITH_6_DEGREES = GEOMETRIC_ZENITH + 6; 224 225 /** 226 * The zenith of 6.45° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 227 * @see #getTzaisGeonim6Point45Degrees() 228 */ 229 protected static final double ZENITH_6_POINT_45 = GEOMETRIC_ZENITH + 6.45; 230 231 /** 232 * The zenith of 7.65° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 233 * @see #getMisheyakir7Point65Degrees() 234 */ 235 protected static final double ZENITH_7_POINT_65 = GEOMETRIC_ZENITH + 7.65; 236 237 /** 238 * The zenith of 7.67° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 239 * @see #getTzaisGeonim7Point67Degrees() 240 */ 241 protected static final double ZENITH_7_POINT_67 = GEOMETRIC_ZENITH + 7.67; 242 243 /** 244 * The zenith of 9.3° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 245 * @see #getTzaisGeonim9Point3Degrees() 246 */ 247 protected static final double ZENITH_9_POINT_3 = GEOMETRIC_ZENITH + 9.3; 248 249 /** 250 * The zenith of 9.5° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). 251 * @see #getMisheyakir9Point5Degrees() 252 */ 253 protected static final double ZENITH_9_POINT_5 = GEOMETRIC_ZENITH + 9.5; 254 255 /** 256 * The zenith of 9.75° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). This calculation is used for 257 * calculating <em>alos</em> (dawn) and <em>tzais</em> (nightfall) according to some opinions. 258 * 259 * @see #getTzaisGeonim9Point75Degrees() 260 */ 261 protected static final double ZENITH_9_POINT_75 = GEOMETRIC_ZENITH + 9.75; 262 263 /** 264 * The zenith of 2.1° <b>above</b> {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). This calculation is used for calculating 265 * the start of <em>bain hashmashos</em> (twilight) of 13.5 minutes before sunset converted to degrees according to the Yereim. 266 * As is traditional with degrees below the horizon, this is calculated without refraction and from the center of the sun. It 267 * would be 0.833° less without this. 268 * 269 * @see #getBainHashmashosYereim2Point1Degrees() 270 */ 271 protected static final double ZENITH_MINUS_2_POINT_1 = GEOMETRIC_ZENITH - 2.1; 272 273 /** 274 * The zenith of 2.8° above {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). This calculation is used for 275 * calculating the start of <em>bain hashmashos</em> (twilight) of 16.875 minutes before sunset converted to degrees 276 * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction 277 * and from the center of the sun. It would be 0.833° less without this. 278 * 279 * @see #getBainHashmashosYereim2Point8Degrees() 280 */ 281 protected static final double ZENITH_MINUS_2_POINT_8 = GEOMETRIC_ZENITH - 2.8; 282 283 /** 284 * The zenith of 3.05° above {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). This calculation is used for 285 * calculating the start of <em>bain hashmashos</em> (twilight) of 18 minutes before sunset converted to degrees 286 * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction 287 * and from the center of the sun. It would be 0.833° less without this. 288 * 289 * @see #getBainHashmashosYereim3Point05Degrees() 290 */ 291 protected static final double ZENITH_MINUS_3_POINT_05 = GEOMETRIC_ZENITH - 3.05; 292 293 /** 294 * The offset in minutes (defaults to 40) after sunset used for <em>tzeit</em> based on calculations of 295 * <em>Chacham</em> Yosef Harari-Raful of Yeshivat Ateret Torah. 296 * @see #getTzaisAteretTorah() 297 * @see #getAteretTorahSunsetOffset() 298 * @see #setAteretTorahSunsetOffset(double) 299 */ 300 private double ateretTorahSunsetOffset = 40; 301 302 /** 303 * A constructor that takes a {@link GeoLocation} as a parameter. 304 * @param location the location 305 * @see ZmanimCalendar#ZmanimCalendar(GeoLocation) 306 */ 307 public ComprehensiveZmanimCalendar(GeoLocation location) { 308 super(location); 309 } 310 311 /** 312 * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default 313 * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date. 314 * 315 * @see AstronomicalCalendar#AstronomicalCalendar() 316 * @see ComprehensiveZmanimCalendar(GeoLocation) 317 */ 318 public ComprehensiveZmanimCalendar() { 319 super(); 320 } 321 322 /** 323 * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a 19.8° dip. This calculation 324 * divides the day based on the opinion of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen 325 * Avraham (MGA)</a> that the day runs from dawn to dusk. Dawn for this calculation is when the sun is 19.8° 326 * below the eastern geometric horizon before sunrise. Dusk for this is when the sun is 19.8° below the western 327 * geometric horizon after sunset. This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. 328 * 329 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as northern and 330 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach low 331 * enough below the horizon for this calculation, a {@code null} will be returned. See detailed explanation on top 332 * of the {@link AstronomicalCalendar} documentation. 333 */ 334 public Duration getShaahZmanis19Point8Degrees() { 335 return getTemporalHour(getAlos19Point8Degrees(), getTzais19Point8Degrees()); 336 } 337 338 /** 339 * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a 18° dip. This calculation divides 340 * the day based on the opinion of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham 341 * (MGA)</a> that the day runs from dawn to dusk. Dawn for this calculation is when the sun is 18° below the 342 * eastern geometric horizon before sunrise. Dusk for this is when the sun is 18° below the western geometric 343 * horizon after sunset. This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. 344 * 345 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as northern and 346 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach low 347 * enough below the horizon for this calculation, a {@code null} will be returned. See detailed explanation on top 348 * of the {@link AstronomicalCalendar} documentation. 349 */ 350 public Duration getShaahZmanis18Degrees() { 351 return getTemporalHour(getAlos18Degrees(), getTzais18Degrees()); 352 } 353 354 /** 355 * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a dip of 26°. This calculation divides the day based 356 * on the opinion of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> that the day runs from 357 * dawn to dusk. Dawn for this calculation is when the sun is {@link #getAlos26Degrees() 26°} below the eastern geometric horizon 358 * before sunrise. Dusk for this is when the sun is {@link #getTzais26Degrees() 26°} below the western geometric horizon after 359 * sunset. This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. Since <em>zmanim</em> that use this 360 * method are extremely late or early and at a point when the sky is a long time past the 18° point where the darkest point is 361 * reached, <em>zmanim</em> that use this should only be used <em>lechumra</em>, such as delaying the start of nighttime 362 * <em>mitzvos</em>. 363 * 364 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as northern and southern 365 * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach low enough below 366 * the horizon for this calculation, a {@code null} will be returned. See detailed explanation on top of the 367 * {@link AstronomicalCalendar} documentation. 368 * @see #getShaahZmanis120Minutes() 369 */ 370 public Duration getShaahZmanis26Degrees() { 371 return getTemporalHour(getAlos26Degrees(), getTzais26Degrees()); 372 } 373 374 /** 375 * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a dip of 16.1°. This calculation divides the day based 376 * on the opinion that the day runs from dawn to dusk. Dawn for this calculation is when the sun is 16.1° below the eastern 377 * geometric horizon before sunrise and dusk is when the sun is 16.1° below the western geometric horizon after sunset. This day is 378 * split into 12 equal parts with each part being a <em>shaah zmanis</em>. 379 * 380 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as northern and 381 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach low 382 * enough below the horizon for this calculation, a {@code null} will be returned. See detailed explanation on top 383 * of the {@link AstronomicalCalendar} documentation. 384 * @see #getAlos16Point1Degrees() 385 * @see #getTzais16Point1Degrees() 386 * @see #getSofZmanShmaMGA16Point1Degrees() 387 * @see #getSofZmanTfilaMGA16Point1Degrees() 388 * @see #getMinchaGedola16Point1Degrees() 389 * @see #getMinchaKetana16Point1Degrees() 390 * @see #getPlagHamincha16Point1Degrees() 391 */ 392 public Duration getShaahZmanis16Point1Degrees() { 393 return getTemporalHour(getAlos16Point1Degrees(), getTzais16Point1Degrees()); 394 } 395 396 /** 397 * Method to return a <em>shaah zmanis</em> (solar hour) according to the opinion of the <a href= 398 * "https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a>. This calculation divides the day based on the opinion 399 * of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 60 minutes before sunrise and dusk is 60 minutes 400 * after sunset. This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. Alternate methods of 401 * calculating a <em>shaah zmanis</em> are available in the subclass {@link ComprehensiveZmanimCalendar}. 402 * 403 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as in the Arctic 404 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 405 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 406 * @see #getAlos60Minutes() 407 * @see #getTzais60Minutes() 408 * @see #getPlagHamincha60Minutes() 409 */ 410 public Duration getShaahZmanis60Minutes() { 411 return getTemporalHour(getAlos60Minutes(), getTzais60Minutes()); 412 } 413 414 /** 415 * Method to return a <em>shaah zmanis</em> (temporal hour) according to the opinion of the <a href= 416 * "https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 417 * #getAlos72Zmanis() 72 minutes <em>zmaniyos</em>} before {@link #getSunrise()} sunrise}. This calculation divides the day based 418 * on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 72 minutes <em>zmaniyos</em> 419 * before sunrise and dusk is 72 minutes <em>zmaniyos</em> after sunset. This day is split into 12 equal parts with each part 420 * being a <em>shaah zmanis</em>. This is identical to 1/10th of the day from {@link #getSunrise()} to {@link #getSunset()}. 421 * 422 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as in the Arctic 423 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 424 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 425 * @see #getAlos72Zmanis() 426 * @see #getTzais72Zmanis() 427 */ 428 public Duration getShaahZmanis72MinutesZmanis() { 429 return getTemporalHour(getAlos72Zmanis(), getTzais72Zmanis()); 430 } 431 432 /** 433 * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a dip of 90 minutes. This calculation 434 * divides the day based on the opinion of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen 435 * Avraham (MGA)</a> that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes before sunrise 436 * and dusk is 90 minutes after sunset. This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. 437 * 438 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as in the Arctic 439 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 440 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 441 */ 442 public Duration getShaahZmanis90Minutes() { 443 return getTemporalHour(getAlos90Minutes(), getTzais90Minutes()); 444 } 445 446 /** 447 * Method to return a <em>shaah zmanis</em> (temporal hour) according to the opinion of the <a href= 448 * "https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 449 * #getAlos90Zmanis() 90} minutes <em>zmaniyos</em> before {@link #getSunrise()}. This calculation divides the day 450 * based on the opinion of the MGA that the day runs from dawn to dusk. Dawn is calculated as 90 minutes <em>zmaniyos</em> 451 * before sunrise and dusk is 90 minutes <em>zmaniyos</em> after sunset. This day is split into 12 equal parts with each part 452 * being a <em>shaah zmanis</em>. This is 1/8th of the day from {@link #getSunrise()} to {@link #getSunset() sunset}. 453 * 454 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as in the Arctic 455 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 456 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 457 * @see #getAlos90Zmanis() 458 * @see #getTzais90Zmanis() 459 */ 460 public Duration getShaahZmanis90MinutesZmanis() { 461 return getTemporalHour(getAlos90Zmanis(), getTzais90Zmanis()); 462 } 463 464 /** 465 * Method to return a <em>shaah zmanis</em> (temporal hour) according to the opinion of the <a href= 466 * "https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link #getAlos96Zmanis() 467 * 96} minutes <em>zmaniyos</em> before {@link #getSunrise()}. This calculation divides the day based on the opinion of the 468 * MGA that the day runs from dawn to dusk. Dawn is calculated as 96 minutes <em>zmaniyos</em> before sunrise and dusk is 96 minutes 469 * <em>zmaniyos</em> after sunset. This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. This is 470 * identical to 1/7.5th of the day from {@link #getSunrise()} to {@link #getSunset() sunset}. 471 * 472 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as in the Arctic 473 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 474 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 475 * @see #getAlos96Zmanis() 476 * @see #getTzais96Zmanis() 477 */ 478 public Duration getShaahZmanis96MinutesZmanis() { 479 return getTemporalHour(getAlos96Zmanis(), getTzais96Zmanis()); 480 } 481 482 /** 483 * Method to return a <em>shaah zmanis</em> (temporal hour) according to the opinion of the <em>Chacham</em> Yosef Harari-Raful 484 * of Yeshivat Ateret Torah calculated with <em>alos</em> being 1/10th of sunrise to sunset day, or {@link #getAlos72Zmanis() 72} 485 * minutes <em>zmaniyos</em> of such a day before {@link #getSunrise()}, and <em>tzais</em> is usually calculated as {@link 486 * #getTzaisAteretTorah() 40 minutes} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}) after {@link 487 * #getSunset() sunset}. This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. Note that with this 488 * system, <em>chatzos</em> (midday) will not be the point that the sun is {@link #getSunTransit() halfway across the sky}. 489 * 490 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as in the Arctic 491 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 492 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 493 * @see #getAlos72Zmanis() 494 * @see #getTzaisAteretTorah() 495 * @see #getAteretTorahSunsetOffset() 496 * @see #setAteretTorahSunsetOffset(double) 497 */ 498 public Duration getShaahZmanisAteretTorah() { 499 return getTemporalHour(getAlos72Zmanis(), getTzaisAteretTorah()); 500 } 501 502 /** 503 * Method to return a <em>shaah zmanis</em> (temporal hour) used by some <em>zmanim</em> according to the opinion of <a href= 504 * "https://en.wikipedia.org/wiki/Yaakov_Moshe_Hillel">Rabbi Yaakov Moshe Hillel</a> as published in the <em>luach</em> of the 505 * Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before sunrise in degrees {@link 506 * #getAlos16Point1Degrees() <em>alos</em> 16.1°} and ending 14 minutes after sunset in degrees {@link 507 * #getTzaisGeonim3Point8Degrees() <em>tzais</em> 3.8°}. This day is split into 12 equal parts with each part being a <em>shaah 508 * zmanis</em>. Note that with this system, <em>chatzos</em> (midday) will not be the point that the sun is {@link 509 * #getSunTransit() halfway across the sky}. These <em>shaos zmaniyos</em> are used for <em>Mincha Ketana</em> and <em>Plag 510 * Hamincha</em>. The 14 minutes are based on 3/4 of an 18 minute <a href="https://en.wikipedia.org/wiki/Biblical_mile">mil</a>, 511 * with half a minute added for Rav Yosi's <em>Bain Hashmashos</em>. Sources for an asymmetrical day-based calculation can be 512 * seen in the documentation of {@link #getSofZmanShmaAlos16Point1DegreesToTzaisGeonim7Point083Degrees}. 513 * 514 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as in the Arctic 515 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 516 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 517 * @see #getMinchaKetanaAhavatShalom() 518 * @see #getPlagAhavatShalom() 519 * @see #getShaahZmanisAlos16Point1DegreesToTzaisGeonim3Point7Degrees() 520 * @see #getShaahZmanisAlos16Point1DegreesToTzaisGeonim7Point083Degrees() 521 */ 522 public Duration getShaahZmanisAlos16Point1DegreesToTzaisGeonim3Point8Degrees() { 523 return getTemporalHour(getAlos16Point1Degrees(), getTzaisGeonim3Point8Degrees()); 524 } 525 526 527 /** 528 * Method to return a <em>shaah zmanis</em> (temporal hour) used by some <em>zmanim</em> according to the opinion of <a href= 529 * "https://en.wikipedia.org/wiki/Yaakov_Moshe_Hillel">Rabbi Yaakov Moshe Hillel</a> as published in the <em>luach</em> of the 530 * Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before sunrise in degrees {@link 531 * #getAlos16Point1Degrees() <em>alos</em> 16.1°} and ending 13.5 minutes after sunset in degrees {@link 532 * #getTzaisGeonim3Point7Degrees() <em>tzais</em> 3.7°}. This day is split into 12 equal parts with each part being a <em>shaah 533 * zmanis</em>. Note that with this system, <em>chatzos</em> (midday) will not be the point that the sun is {@link 534 * #getSunTransit() halfway across the sky}. These <em>shaos zmaniyos</em> are used for <em>Mincha Gedola</em> calculation. 535 * Sources for an asymmetrical day-based calculation can be seen in the documentation of 536 * {@link #getSofZmanShmaAlos16Point1DegreesToTzaisGeonim7Point083Degrees}. 537 * 538 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as in the Arctic 539 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 540 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 541 * @see #getMinchaGedolaAhavatShalom() 542 * @see #getShaahZmanisAlos16Point1DegreesToTzaisGeonim3Point8Degrees() 543 * @see #getShaahZmanisAlos16Point1DegreesToTzaisGeonim7Point083Degrees() 544 */ 545 public Duration getShaahZmanisAlos16Point1DegreesToTzaisGeonim3Point7Degrees() { 546 return getTemporalHour(getAlos16Point1Degrees(), getTzaisGeonim3Point7Degrees()); 547 } 548 549 /** 550 * Method to return a <em>shaah zmanis</em> (temporal hour) used by some <em>zmanim</em> according to some opinions that is based 551 * on a day starting at {@link #getAlos16Point1Degrees() <em>alos</em> 16.1°} and ending {@link 552 * #getTzaisGeonim7Point083Degrees <em>tzais</em> 8.083°}. This day is split into 12 equal parts with each part being a <em>shaah 553 * zmanis</em>. Note that with this system, <em>chatzos</em> (midday) will not be the point that the sun is {@link 554 * #getSunTransit() halfway across the sky}. Sources for an asymmetrical day-based calculation can be seen in the documentation 555 * of {@link #getSofZmanShmaAlos16Point1DegreesToTzaisGeonim7Point083Degrees}. 556 * 557 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as in the Arctic 558 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 559 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 560 * @see #getShaahZmanisAlos16Point1DegreesToTzaisGeonim3Point7Degrees() 561 * @see #getShaahZmanisAlos16Point1DegreesToTzaisGeonim3Point8Degrees() 562 */ 563 public Duration getShaahZmanisAlos16Point1DegreesToTzaisGeonim7Point083Degrees() { 564 return getTemporalHour(getAlos16Point1Degrees(), getTzaisGeonim7Point083Degrees()); 565 } 566 567 /** 568 * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a dip of 96 minutes. This calculation divides the 569 * day based on the opinion of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> that the day 570 * runs from dawn to dusk. Dawn for this calculation is 96 minutes before sunrise and dusk is 96 minutes after sunset. This day 571 * is split into 12 equal parts with each part being a <em>shaah zmanis</em>. 572 * 573 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as in the Arctic 574 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 575 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 576 */ 577 public Duration getShaahZmanis96Minutes() { 578 return getTemporalHour(getAlos96Minutes(), getTzais96Minutes()); 579 } 580 581 /** 582 * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a dip of 120 minutes. This calculation divides the 583 * day based on the opinion of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> that the day 584 * runs from dawn to dusk. Dawn for this calculation is 120 minutes before sunrise and dusk is 120 minutes after sunset. This day 585 * is split into 12 equal parts with each part being a <em>shaah zmanis</em>. Since <em>zmanim</em> that use this method are 586 * extremely late or early and at a point when the sky is a long time past the 18° point where the darkest point is reached, 587 * <em>zmanim</em> that use this should only be used <em>lechumra</em> only, such as delaying the start of nighttime 588 * <em>mitzvos</em>. 589 * 590 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as inin the Arctic 591 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 592 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 593 * @see #getShaahZmanis26Degrees() 594 */ 595 public Duration getShaahZmanis120Minutes() { 596 return getTemporalHour(getAlos120Minutes(), getTzais120Minutes()); 597 } 598 599 /** 600 * Method to return a <em>shaah zmanis</em> (temporal hour) according to the opinion of the <a href= 601 * "https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 602 * #getAlos120Zmanis() 120} minutes <em>zmaniyos</em> before {@link #getSunrise()}. This calculation divides the day 603 * based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 120 minutes <em>zmaniyos</em> 604 * before sunrise and dusk is 120 minutes <em>zmaniyos</em> after sunset. This day is split into 12 equal parts with each part 605 * being a <em>shaah zmanis</em>. This is identical to 1/6th of the day from {@link #getSunrise()} to {@link #getSunset() 606 * sunset}. Since <em>zmanim</em> that use this method are extremely late or early and at a point when the sky is a long time 607 * past the 18° point where the darkest point is reached, <em>zmanim</em> that use this should only be used <em>lechumra</em> 608 * such as delaying the start of nighttime <em>mitzvos</em>. 609 * 610 * @return the {@code Duration} of a <em>shaah zmanis</em>. If the calculation can't be computed such as in the Arctic 611 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 612 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 613 * @see #getAlos120Zmanis() 614 * @see #getTzais120Zmanis() 615 */ 616 public Duration getShaahZmanis120MinutesZmanis() { 617 return getTemporalHour(getAlos120Zmanis(), getTzais120Zmanis()); 618 } 619 620 /** 621 * This method should be used <em>lechumra</em> only and returns the time of <em>plag hamincha</em> based on sunrise being 120 622 * minutes <em>zmaniyos</em> or 1/6th of the day before sunrise. This is calculated as 10.75 hours after {@link 623 * #getAlos120Zmanis() dawn}. The formula used is 10.75 * {@link #getShaahZmanis120MinutesZmanis()} after {@link 624 * #getAlos120Zmanis() dawn}. Since the <em>zman</em> based on an extremely early <em>alos</em> and a very late <em>tzais</em>, 625 * it should only be used <em>lechumra</em>. 626 * 627 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time (often after <em>shkiah</em>), 628 * and if used <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no current plan to remove this method 629 * from the API, and this deprecation is intended to alert developers of the danger of using it. 630 * @return the {@code Instant} of the time of <em>plag hamincha</em>. If the calculation can't be computed such as in the 631 * Arctic Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 632 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 633 * @see #getShaahZmanis120MinutesZmanis() 634 * @see #getAlos120Minutes() 635 * @see #getTzais120Minutes() 636 * @see #getPlagHamincha26Degrees() 637 * @see #getPlagHamincha120Minutes() 638 */ 639 @Deprecated (forRemoval=false) 640 public Instant getPlagHamincha120MinutesZmanis() { 641 return getPlagHamincha(getAlos120Zmanis(), getTzais120Zmanis(), true); 642 } 643 644 /** 645 * {@summary This method <em>plag hamincha</em> according to the Magen Avraham with the day starting at {@link 646 * #getAlos120Minutes()}. It should be used <em>lechumra</em> only}. This is calculated as 10.75 * {@link 647 * #getShaahZmanis120Minutes()} after {@link #getAlos120Minutes()}. Since the <em>zman</em> based on an extremely early 648 * <em>alos</em> and a very late <em>tzais</em>, it returns a very late time (often after <em>shkiah</em> and can result in 649 * <em>chillul Shabbos</em> etc.) and should only be used <em>lechumra</em>. 650 * 651 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time (often after <em>shkiah</em>), 652 * and if used <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no current plan to remove this method 653 * from the API, and this deprecation is intended to alert developers of the danger of using it. 654 * @return the {@code Instant} of the time of <em>plag hamincha</em>. If the calculation can't be computed such as in the 655 * Arctic Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 656 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 657 * @see #getShaahZmanis120Minutes() 658 * @see #getPlagHamincha26Degrees() 659 */ 660 @Deprecated (forRemoval=false) 661 public Instant getPlagHamincha120Minutes() { 662 return getPlagHamincha(getAlos120Minutes(), getTzais120Minutes(), true); 663 } 664 665 /** 666 * Method to return <em>alos</em> (dawn) calculated as 60 minutes before {@link #getSunriseBasedOnElevationSetting()} (depends on 667 * the {@link #isUseElevation()} setting). This is the time to walk the distance of 4 <a href= 668 * "https://en.wikipedia.org/wiki/Biblical_mile">mil</a> at 15 minutes a mil. This seems to be the opinion of the <a href= 669 * "https://en.wikipedia.org/wiki/Yair_Bacharach">Chavas Yair</a> in the Mekor Chaim, Orach Chaim Ch. 90, though the Mekor Chaim 670 * in Ch. 58 and in the <a href="https://hebrewbooks.org/pdfpager.aspx?req=45193&pgnum=214">Chut Hashani Ch. 97</a> states that a 671 * person walks 3 and a 1/3 mil in an hour, or an 18-minute mil. Also see the <a href= 672 * "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" 673 * >Divrei Malkiel</a> <a href="https://hebrewbooks.org/pdfpager.aspx?req=803&pgnum=33">Vol. 4, Ch. 20, page 34</a>) who mentions 674 * the 15 minute mil <em>lechumra</em> by baking matzos. Also see the <a href= 675 * "https://en.wikipedia.org/wiki/Joseph_Colon_Trabotto">Maharik</a> <a href= 676 * "https://hebrewbooks.org/pdfpager.aspx?req=1142&pgnum=216">Ch. 173</a> where the questioner quoting the <a href= 677 * "https://en.wikipedia.org/wiki/Eliezer_ben_Nathan">Ra'avan</a> is of the opinion that the time to walk a mil is 15 minutes (5 678 * mil in a little over an hour). There are many who believe that there is a <em>ta'us sofer</em> (scribe's error) in the Ra'avan, 679 * and it should 4 mil in a little over an hour, or an 18-minute mil. Time based offset calculations are based on the opinions 680 * that the time of the <em>neshef</em> (time between dawn and sunrise) does not vary by the time of year or location but purely 681 * depends on the time it takes to walk the distance of 4* mil. {@link #getTzaisGeonim9Point75Degrees()} is a related 682 * <em>zman</em> that is a degree-based calculation 683 * based on 60 minutes. 684 * 685 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic Circle 686 * where there is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} 687 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 688 * @see #getTzais60Minutes() 689 * @see #getTzaisGeonim9Point75Degrees() 690 * @see #getPlagHamincha60Minutes() 691 * @see #getShaahZmanis60Minutes() 692 */ 693 public Instant getAlos60Minutes() { 694 return getTimeOffset(getSunriseBasedOnElevationSetting(), Duration.ofMinutes(-60)); 695 } 696 697 /** 698 * Method to return <em>alos</em> (dawn) calculated using 72 minutes <em>zmaniyos</em> or 1/10th of the day before sunrise. This 699 * is based on an 18-minute <a href="https://en.wikipedia.org/wiki/Biblical_mile">mil</a> so the 700 * time for 4 mil is 72 minutes which is 1/10th of a day (12 * 60 = 720) based on the day being from {@link #getSeaLevelSunrise()} 701 * to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunrise()} to {@link #getSunset()} (depending on the 702 * {@link #isUseElevation()} setting). The actual calculation is {@link #getSunriseBasedOnElevationSetting()} - ({@link 703 * #getShaahZmanisGRA()} * 1.2). This calculation is used in the calendars published by the <a href= 704 * "https://en.wikipedia.org/wiki/Central_Rabbinical_Congress">Hisachdus Harabanim D'Artzos Habris Ve'Canada</a>. 705 * 706 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic Circle where 707 * there is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} will 708 * be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 709 * @see #getShaahZmanisGRA() 710 */ 711 public Instant getAlos72Zmanis() { 712 return getZmanisBasedOffset(-1.2); 713 } 714 715 /** 716 * Method to return <em>alos</em> (dawn) calculated using 96 minutes before {@link #getSunriseBasedOnElevationSetting()} 717 * (depends on the {@link #isUseElevation()} setting) that is based on the time to walk the distance of 4 <a href= 718 * "https://en.wikipedia.org/wiki/Biblical_mile">mil</a> at 24 minutes a mil. Time based offset calculations for <em>alos</em> 719 * are based on the opinion that the time of the <em>Neshef</em> (time between dawn and sunrise) does not vary by the time of 720 * year or location but purely depends on the time it takes to walk the distance of 4 mil. 721 * 722 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic Circle 723 * where there is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} 724 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 725 */ 726 public Instant getAlos96Minutes() { 727 return getTimeOffset(getSunriseBasedOnElevationSetting(), Duration.ofMinutes(-96)); 728 } 729 730 /** 731 * Method to return <em>alos</em> (dawn) calculated using 90 minutes <em>zmaniyos</em> or 1/8th of the day before {@link 732 * #getSunrise()} or {@link #getSeaLevelSunrise()} (depending on the {@link #isUseElevation()} setting). This is based on a 733 * 22.5-minute <a href="https://en.wikipedia.org/wiki/Biblical_mile">mil</a> so the time for 4 mil is 90 minutes which is 1/8th 734 * of a day (12 * 60) / 8 = 90. The actual calculation used is {@link #getSunriseBasedOnElevationSetting()} - 735 * ({@link #getShaahZmanisGRA()} * 1.5). 736 * 737 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic Circle where 738 * there is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} will 739 * be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 740 * @see #getShaahZmanisGRA() 741 */ 742 public Instant getAlos90Zmanis() { 743 return getZmanisBasedOffset(-1.5); 744 } 745 746 /** 747 * This method returns <em>alos</em> (dawn) calculated using 96 minutes <em>zmaniyos</em> or 1/7.5th of the day before {@link 748 * #getSunriseBasedOnElevationSetting()} (depends on the {@link #isUseElevation()} setting). This is based on a 24-minute 749 * <a href="https://en.wikipedia.org/wiki/Biblical_mile">mil</a> so the time for 4 mil is 96 minutes which is 1/7.5th of a day 750 * (12 * 60 / 7.5 = 96). The day is calculated from {@link #getSunriseBasedOnElevationSetting()} to to {@link 751 * #getSunsetBasedOnElevationSetting()} (depends on the {@link #isUseElevation()}. The actual calculation used is {@link 752 * #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGRA()} * 1.6). 753 * 754 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic Circle where 755 * there is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} will be 756 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 757 * @see #getShaahZmanisGRA() 758 */ 759 public Instant getAlos96Zmanis() { 760 return getZmanisBasedOffset(-1.6); 761 } 762 763 /** 764 * Method to return <em>alos</em> (dawn) calculated using 90 minutes before {@link #getSunriseBasedOnElevationSetting()} 765 * (depends on the {@link #isUseElevation()} setting) based on the time to walk the distance of 4 <a href= 766 * "https://en.wikipedia.org/wiki/Biblical_mile">mil</a> at 22.5 minutes a mil. Time-based offset calculations for <em>alos</em> 767 * are based on the opinion that the time of the <em>Neshef</em> (time between dawn and sunrise) does not vary by the time of 768 * year or location but purely depends on the time it takes to walk the distance of 4 mil. 769 * 770 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic Circle where there 771 * is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} will be returned. 772 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 773 */ 774 public Instant getAlos90Minutes() { 775 return getTimeOffset(getSunriseBasedOnElevationSetting(), Duration.ofMinutes(-90)); 776 } 777 778 /** 779 * This method should be used <em>lechumra</em> only and returns <em>alos</em> (dawn) calculated using 120 minutes before {@link 780 * #getSunriseBasedOnElevationSetting()} (that depends on the {@link #isUseElevation()} setting) based on the time to walk the 781 * distance of 5 <a href="https://en.wikipedia.org/wiki/Biblical_mile">mil</a> (<em>Ula</em>) at 24 minutes a mil. Time based 782 * offset calculations for <em>alos</em> are based on the* opinions that the time of the <em>neshef</em> (time between dawn and 783 * sunrise) does not vary by the time of year or location but purely depends on the time it takes to walk the distance of 5 mil 784 * (<em>Ula</em>). Since this time is extremely early, it should only be used <em>lechumra</em>, such as not eating after this 785 * time on a fast day, and not as the start time for <em>mitzvos</em> that can only be performed during the day. 786 * 787 * @deprecated This method should be used <em>lechumra</em> only (such as stopping to eat at this time on a fast day), 788 * since it returns a very early time, and if used <em>lekula</em> can result in doing <em>mitzvos hayom</em> 789 * too early according to most opinions. There is no current plan to remove this method from the API, and this 790 * deprecation is intended to alert developers of the danger of using it. 791 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic Circle where 792 * there is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} will be 793 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 794 * @see #getTzais120Minutes() 795 * @see #getAlos26Degrees() 796 */ 797 @Deprecated (forRemoval=false) 798 public Instant getAlos120Minutes() { 799 return getTimeOffset(getSunriseBasedOnElevationSetting(), Duration.ofMinutes(-120)); 800 } 801 802 /** 803 * This method should be used <em>lechumra</em> only and method returns <em>alos</em> (dawn) calculated using 804 * 120 minutes <em>zmaniyos</em> or 1/6th of the day before {@link #getSunriseBasedOnElevationSetting()} (depends on the {@link 805 * #isUseElevation()} setting). This is based on a 24-minute <a href="https://en.wikipedia.org/wiki/Biblical_mile">mil</a> so 806 * the time for 5 mil is 120 minutes which is 1/6th of a day (12 * 60 / 6 = 120). The day is calculated from {@link 807 * #getSunriseBasedOnElevationSetting()} to {@link #getSunsetBasedOnElevationSetting()} (depends on the {@link #isUseElevation()}. 808 * The actual calculation used is {@link #getSunset()} - ({@link #getShaahZmanisGRA()} * 2). Since this time is extremely early, 809 * it should only be used <em>lechumra</em>, such as not eating after this time on a fast day, and not as the start time for 810 * <em>mitzvos</em> that can only be performed during the day. 811 * 812 * @deprecated This method should be used <em>lechumra</em> only (such as stopping to eat at this time on a fast day), 813 * since it returns a very early time, and if used <em>lekula</em> can result in doing <em>mitzvos hayom</em> 814 * too early according to most opinions. There is no current plan to remove this method from the API, and this 815 * deprecation is intended to alert developers of the danger of using it. 816 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic Circle where there 817 * is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} will be returned. 818 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 819 * @see #getAlos120Minutes() 820 * @see #getAlos26Degrees() 821 */ 822 @Deprecated (forRemoval=false) 823 public Instant getAlos120Zmanis() { 824 return getZmanisBasedOffset(-2.0); 825 } 826 827 /** 828 * This method should be used <em>lechumra</em> only and returns <em>alos</em> (dawn) calculated when the sun is {@link 829 * #ZENITH_26_DEGREES 26°} below the eastern geometric horizon before sunrise. This calculation is based on the same 830 * calculation of {@link #getAlos120Minutes() 120 minutes} but uses a degree-based calculation instead of 120 exact minutes. 831 * This calculation is based on the position of the sun 120 minutes before sunrise in Jerusalem <a href= 832 * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a>, which 833 * calculates to 26° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH}. Since this time is extremely early, it should 834 * only be used <em>lechumra</em> only, such as not eating after this time on a fast day, and not as the start time for 835 * <em>mitzvos</em> that can only be performed during the day. 836 * 837 * @deprecated This method should be used <em>lechumra</em> only (such as stopping to eat at this time on a fast day), 838 * since it returns a very early time, and if used <em>lekula</em> can result in doing <em>mitzvos hayom</em> 839 * too early according to most opinions. There is no current plan to remove this method from the API, and this 840 * deprecation is intended to alert developers of the danger of using it. 841 * @return the {@code Instant} representing <em>alos</em>. If the calculation can't be computed such as northern 842 * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun 843 * may not reach low enough below the horizon for this calculation, a {@code null} will be returned. See 844 * detailed explanation on top of the {@link AstronomicalCalendar} documentation. 845 * @see #getAlos120Minutes() 846 * @see #getTzais120Minutes() 847 * @see #getTzais26Degrees() 848 */ 849 @Deprecated (forRemoval=false) 850 public Instant getAlos26Degrees() { 851 return getSunriseOffsetByDegrees(ZENITH_26_DEGREES); 852 } 853 854 /** 855 * A method to return <em>alos</em> (dawn) calculated when the sun is {@link ASTRONOMICAL_ZENITH 18°} below the 856 * eastern geometric horizon before sunrise. 857 * 858 * @return the {@code Instant} representing <em>alos</em>. If the calculation can't be computed such as northern 859 * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun 860 * may not reach low enough below the horizon for this calculation, a {@code null} will be returned. 861 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 862 * @see ASTRONOMICAL_ZENITH 863 */ 864 public Instant getAlos18Degrees() { 865 return getSunriseOffsetByDegrees(ASTRONOMICAL_ZENITH); 866 } 867 868 /** 869 * A method to return <em>alos</em> (dawn) calculated when the sun is {@link #ZENITH_19_DEGREES 19°} below the 870 * eastern geometric horizon before sunrise. This is the <a href="https://en.wikipedia.org/wiki/Maimonides" 871 * >Rambam</a>'s <em>alos</em> according to Rabbi Moshe Kosower's <a href= 872 * "https://www.worldcat.org/oclc/145454098">Maaglei Tzedek</a>, page 88, <a href= 873 * "https://hebrewbooks.org/pdfpager.aspx?req=33464&pgnum=13">Ayeles Hashachar Vol. I, page 12</a>, <a href= 874 * "https://hebrewbooks.org/pdfpager.aspx?req=55960&pgnum=258">Yom Valayla Shel Torah, Ch. 34, p. 222</a> and 875 * Rabbi Yaakov Shakow's <a href="https://www.worldcat.org/oclc/1043573513">Luach Ikvei Hayom</a>. 876 * 877 * @return the {@code Instant} representing <em>alos</em>. If the calculation can't be computed such as northern 878 * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun 879 * may not reach low enough below the horizon for this calculation, a {@code null} will be returned. 880 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 881 */ 882 public Instant getAlos19Degrees() { 883 return getSunriseOffsetByDegrees(ZENITH_19_DEGREES); 884 } 885 886 /** 887 * Method to return <em>alos</em> (dawn) calculated when the sun is {@link #ZENITH_19_POINT_8 19.8°} below the 888 * eastern geometric horizon before sunrise. This calculation is based on the same calculation of 889 * {@link #getAlos90Minutes() 90 minutes} before sunrise, but uses a degree-based calculation instead of 90 exact minutes. 890 * This calculation is based on the position of the sun 90 minutes before sunrise in Jerusalem <a href= 891 * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a>, which 892 * calculates to 19.8° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH}. 893 * 894 * @return the {@code Instant} representing <em>alos</em>. If the calculation can't be computed such as northern 895 * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun 896 * may not reach low enough below the horizon for this calculation, a {@code null} will be returned. See 897 * detailed explanation on top of the {@link AstronomicalCalendar} documentation. 898 * @see #getAlos90Minutes() 899 * @see #getTzais19Point8Degrees() 900 */ 901 public Instant getAlos19Point8Degrees() { 902 return getSunriseOffsetByDegrees(ZENITH_19_POINT_8); 903 } 904 905 /** 906 * This method returns <em>misheyakir</em> based on the position of the sun {@link #ZENITH_12_POINT_85 12.85°} 907 * below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). This is based on the position of the sun slightly 908 * later than 57 minutes before {@link #getSunrise()} in Jerusalem <a href= 909 * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a>. This 910 * <em>zman</em> is mentioned for use <b><em>bish'as hadchak</em></b> in the Birur Halacha <a href= 911 * "https://hebrewbooks.org/pdfpager.aspx?req=50535&st=&pgnum=88">Tinyana</a> and <a href= 912 * "https://hebrewbooks.org/pdfpager.aspx?req=50537&st=&pgnum=31">Tlisa'ah</a> in Orach Chaim siman 18 as 12.85°. 913 * Actual calculations show it to be slightly more than 12.9°, but the Birur Halacha indicates that 12.85° is a 914 * slight <em>chumra</em> (on a <em>bedieved</em> time) VS the 12.9° that 57 minutes calculates as (a difference of 915 * about 14 seconds at the equinox/equilux in Jerusalem). The <em>zman</em> of 12.9° is also mentioned in the Piskei 916 * Tshuvos siman 18, page 190 (where a typo indicates that this is the degree equivalent to 60 minutes before sunrise, 917 * when in fact at that point the sun is about 13.5° below the horizon). The 57 minute based time is mentioned by the 918 * Minchas Yitzchak <a href="https://hebrewbooks.org/pdfpager.aspx?req=1601&st=&pgnum=21">vol. 9, siman 9</a> as 15 minutes 919 * before <em>alos hashachar</em> (though he is not clear what location he refers to, and does not mention a degree-based 920 * conversion). The Kaf Hachaim <a href="https://hebrewbooks.org/pdfpager.aspx?req=8140&st=&pgnum=81">vol.1 siman 18, no. 921 * 18</a> states that in Yerushalayim 60 fixed minutes are used year round. Calculations show that 60 fixed minutes in 922 * Yerushalayim ranges from 13.5° at the spring equinox to 11.5° at the summer solstice. 57-minute 923 * <em>misheyakir</em> range from 12.9° at the winter equinox to 11° at the summer solstice. 924 * Analysis of the difference between 12.85° and 12.9°, shows that the maximum difference occurs at the summer 925 * solstice. In Lakewood, NJ at a latitude of 40.096°, the maximum difference throughout the year is 23 seconds. 926 * In the winter where there is the greatest need for very early <em>misheyakir</em> times, the difference is in the 16 927 * second range. Going north to Montreal at latitude 45.5°, the maximum is 29 seconds and is about 18 seconds in the 928 * winter. Moving farther north to the latitude of Vilnius at a latitude of 54.68°, things change. Firstly, around the 929 * summer solstice it will not reach that far below the horizon. On the dates that both can be calculated, the maximum 930 * difference can be pretty high on one or two days of the year (around Jul 8), with about a week having over a two minute 931 * difference between the two. Even at the latitude of Vilna, from Dec - March, the difference is about 22 seconds. 932 * 933 * @deprecated This method returns a very early <em>misheyakir</em> time that should only be used <b><em>bish'as 934 * hadchak</em></b>. <em>Lechatchila</em>, a later <em>zman</em> should be used. There is no current plan to remove 935 * this method from the API, and this deprecation is intended to notify developers to add an alert to users of 936 * the risk of using it. 937 * @return The {@code Instant} of <em>misheyakir</em>. If the calculation can't be computed such as northern and 938 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may 939 * not reach low enough below the horizon for this calculation, a {@code null} will be returned. See 940 * detailed explanation on top of the {@link AstronomicalCalendar} documentation. 941 * @see #ZENITH_12_POINT_85 942 */ 943 @Deprecated (forRemoval=false) 944 public Instant getMisheyakir12Point85Degrees() { 945 return getSunriseOffsetByDegrees(ZENITH_12_POINT_85); 946 } 947 948 /** 949 * This method returns <em>misheyakir</em> based on the position of the sun when it is {@link #ZENITH_11_DEGREES 950 * 11.5°} below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). This calculation is used for calculating 951 * <em>misheyakir</em> according to some opinions. This calculation is based on the position of the sun 52 minutes 952 * before {@link #getSunrise()} in Jerusalem <a href= 953 * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a>, 954 * which calculates to 11.5° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH}. 955 * @todo recalculate. 956 * @return the {@code Instant} of <em>misheyakir</em>. If the calculation can't be computed such as northern and 957 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may 958 * not reach low enough below the horizon for this calculation, a {@code null} will be returned. See 959 * detailed explanation on top of the {@link AstronomicalCalendar} documentation. 960 * @see #ZENITH_11_POINT_5 961 */ 962 public Instant getMisheyakir11Point5Degrees() { 963 return getSunriseOffsetByDegrees(ZENITH_11_POINT_5); 964 } 965 966 /** 967 * This method returns <em>misheyakir</em> based on the position of the sun when it is {@link #ZENITH_11_DEGREES 968 * 11°} below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). This calculation is used for calculating 969 * <em>misheyakir</em> according to some opinions. This calculation is based on the position of the sun 48 minutes 970 * before {@link #getSunrise()} in Jerusalem <a href= 971 * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a>, 972 * which calculates to 11° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH}. 973 * 974 * @return If the calculation can't be computed such as northern and southern locations even south of the Arctic Circle and north 975 * of the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a {@code null} 976 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 977 * @see #ZENITH_11_DEGREES 978 */ 979 public Instant getMisheyakir11Degrees() { 980 return getSunriseOffsetByDegrees(ZENITH_11_DEGREES); 981 } 982 983 /** 984 * This method returns <em>misheyakir</em> based on the position of the sun when it is {@link #ZENITH_10_POINT_2 10.2°} below 985 * {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). This calculation is used for calculating 986 * <em>misheyakir</em> according to some opinions. This calculation is based on the position of the sun 45 minutes 987 * before {@link #getSunrise()} in Jerusalem <a href= 988 * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox</a> which calculates 989 * to 10.2° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH}. 990 * 991 * @return the {@code Instant} of <em>misheyakir</em>. If the calculation can't be computed such as 992 * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 993 * the sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned 994 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 995 * @see #ZENITH_10_POINT_2 996 */ 997 public Instant getMisheyakir10Point2Degrees() { 998 return getSunriseOffsetByDegrees(ZENITH_10_POINT_2); 999 } 1000 1001 /** 1002 * This method returns <em>misheyakir</em> based on the position of the sun when it is {@link #ZENITH_7_POINT_65 7.65°} below 1003 * {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). The degrees are based on a 35/36 minute <em>zman</em> <a href= 1004 * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a>, when the 1005 * <em>neshef</em> (twilight) is the shortest. This time is based on <a href= 1006 * "https://en.wikipedia.org/wiki/Moshe_Feinstein">Rabbi Moshe Feinstein</a> who writes in <a href= 1007 * "https://hebrewbooks.org/pdfpager.aspx?req=14677&pgnum=7">Ohr Hachaim Vol. 4, Ch. 6</a> that <em>misheyakir</em> in New York 1008 * is 35-40 minutes before sunrise, something that is a drop less than 8°. <a href="https://en.wikipedia.org/wiki/Yisroel_Taplin" 1009 * >Rabbi Yisroel Taplin</a> in <a href="https://www.worldcat.org/oclc/889556744">Zmanei Yisrael</a> (page 117) notes that 1010 * <a href="https://en.wikipedia.org/wiki/Yaakov_Kamenetsky">Rabbi Yaakov Kamenetsky</a> stated that it is not less than 36 1011 * minutes before sunrise (maybe it is 40 minutes). Sefer Yisrael Vehazmanim (p. 7) quotes the Tamar Yifrach in the name of the 1012 * <a href="https://en.wikipedia.org/wiki/Joel_Teitelbaum">Satmar Rov</a> that one should be stringent not consider 1013 * <em>misheyakir</em> before 36 minutes. This is also the accepted <a href="https://en.wikipedia.org/wiki/Minhag">minhag</a> in 1014 * <a href="https://en.wikipedia.org/wiki/Lakewood_Township,_New_Jersey">Lakewood</a> that is used in the <a href= 1015 * "https://en.wikipedia.org/wiki/Beth_Medrash_Govoha">Yeshiva</a>. This follows the opinion of <a href= 1016 * "https://en.wikipedia.org/wiki/Shmuel_Kamenetsky">Rabbi Shmuel Kamenetsky</a> who provided the time of 35/36 minutes, but did 1017 * not provide a degree-based time. Since this <em>zman</em> depends on the level of light, Rabbi Yaakov Shakow presented this 1018 * degree-based calculations to Rabbi Shmuel Kamenetsky who agreed to them. 1019 * 1020 * @return the {@code Instant} of <em>misheyakir</em>. If the calculation can't be computed such as 1021 * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 1022 * the sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned. 1023 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1024 * @see #ZENITH_7_POINT_65 1025 * @see #getMisheyakir9Point5Degrees() 1026 */ 1027 public Instant getMisheyakir7Point65Degrees() { 1028 return getSunriseOffsetByDegrees(ZENITH_7_POINT_65); 1029 } 1030 1031 /** 1032 * This method returns <em>misheyakir</em> based on the position of the sun when it is {@link #ZENITH_9_POINT_5 1033 * 9.5°} below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°). This calculation is based on <a href= 1034 * "https://en.wikipedia.org/wiki/Dovid_Kronglas">Rabbi Dovid Kronglass's</a> Calculation of 45 minutes in Baltimore 1035 * as mentioned in <a href="https://hebrewbooks.org/pdfpager.aspx?req=20287&pgnum=29">Divrei Chachamim No. 24</a> 1036 * brought down by the <a href="https://hebrewbooks.org/pdfpager.aspx?req=50535&pgnum=87">Birur Halacha, Tinyana, Ch. 1037 * 18</a>. This calculates to 9.5°. Also see <a href="https://en.wikipedia.org/wiki/Jacob_Isaac_Neiman">Rabbi Yaakov 1038 * Yitzchok Neiman</a> in Kovetz Eitz Chaim Vol. 9, p. 202 that the Vya'an Yosef did not want to rely on times earlier 1039 * than 45 minutes in New York. This <em>zman</em> is also used in the calendars published by Rabbi Hershel Edelstein. 1040 * As mentioned in Yisroel Vehazmanim, Rabbi Edelstein who was given the 45 minute <em>zman</em> by Rabbi Bick. The 1041 * calendars published by the <em><a href="https://en.wikipedia.org/wiki/Mizrahi_Jews">Edot Hamizrach</a></em> communities 1042 * also use this <em>zman</em>. This also follows the opinion of <a href="https://en.wikipedia.org/wiki/Shmuel_Kamenetsky" 1043 * >Rabbi Shmuel Kamenetsky</a> who provided the time of 36 and 45 minutes, but did not provide a degree-based time. Since 1044 * this <em>zman</em> depends on the level of light, Rabbi Yaakov Shakow presented these degree-based times to Rabbi Shmuel 1045 * Kamenetsky who agreed to them. 1046 * 1047 * @return the {@code Instant} of <em>misheyakir</em>. If the calculation can't be computed such as 1048 * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 1049 * the sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned. 1050 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1051 * @see #ZENITH_9_POINT_5 1052 * @see #getMisheyakir7Point65Degrees() 1053 */ 1054 public Instant getMisheyakir9Point5Degrees() { 1055 return getSunriseOffsetByDegrees(ZENITH_9_POINT_5); 1056 } 1057 1058 /** 1059 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the 1060 * opinion of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on 1061 * <em>alos</em> being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise()}. This 1062 * time is 3 {@link #getShaahZmanis19Point8Degrees() <em>shaos zmaniyos</em>} (solar hours) after {@link 1063 * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall 1064 * with both being 19.8° below sunrise or sunset. This returns the time of 3 * 1065 * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}. 1066 * 1067 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1068 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 1069 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be 1070 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1071 * @see #getShaahZmanis19Point8Degrees() 1072 * @see #getAlos19Point8Degrees() 1073 */ 1074 public Instant getSofZmanShmaMGA19Point8Degrees() { 1075 return getSofZmanShma(getAlos19Point8Degrees(), getTzais19Point8Degrees(), true); 1076 } 1077 1078 /** 1079 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the opinion of 1080 * the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 1081 * #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise()}. This time is 3 {@link 1082 * #getShaahZmanis16Point1Degrees() <em>shaos zmaniyos</em>} (solar hours) after {@link #getAlos16Point1Degrees() dawn} based on 1083 * the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° below sunrise or sunset. 1084 * This returns the time of 3 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}. 1085 * 1086 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1087 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 1088 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be 1089 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1090 * @see #getShaahZmanis16Point1Degrees() 1091 * @see #getAlos16Point1Degrees() 1092 */ 1093 public Instant getSofZmanShmaMGA16Point1Degrees() { 1094 return getSofZmanShma(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); 1095 } 1096 1097 /** 1098 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the 1099 * opinion of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based 1100 * on <em>alos</em> being {@link #getAlos18Degrees() 18°} before {@link #getSunrise()}. This time is 3 1101 * {@link #getShaahZmanis18Degrees() <em>shaos zmaniyos</em>} (solar hours) after {@link #getAlos18Degrees() dawn} 1102 * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18° 1103 * below sunrise or sunset. This returns the time of 3 * {@link #getShaahZmanis18Degrees()} after 1104 * {@link #getAlos18Degrees() dawn}. 1105 * 1106 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1107 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 1108 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be 1109 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1110 * @see #getShaahZmanis18Degrees() 1111 * @see #getAlos18Degrees() 1112 */ 1113 public Instant getSofZmanShmaMGA18Degrees() { 1114 return getSofZmanShma(getAlos18Degrees(), getTzais18Degrees(), true); 1115 } 1116 1117 /** 1118 * This method returns the latest <em>zman krias shema</em> (time to recite <em>Shema</em> in the morning) according 1119 * to the opinion of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based 1120 * on <em>alos</em> being {@link #getAlos72Zmanis() 72} minutes <em>zmaniyos</em>, or 1/10th of the day before 1121 * {@link #getSunrise()}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() <em>shaos zmaniyos</em>} 1122 * (solar hours) after {@link #getAlos72Zmanis() dawn} based on the opinion of the MGA that the day is calculated 1123 * from a {@link #getAlos72Zmanis() dawn} of 72 minutes <em>zmaniyos</em>, or 1/10th of the day before 1124 * {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getTzais72Zmanis() nightfall} of 72 minutes 1125 * <em>zmaniyos</em> after {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 3 * 1126 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}. 1127 * 1128 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such as in the Arctic 1129 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} 1130 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1131 * @see #getShaahZmanis72MinutesZmanis() 1132 * @see #getAlos72Zmanis() 1133 * @see #isUseAstronomicalChatzosForOtherZmanim() 1134 */ 1135 public Instant getSofZmanShmaMGA72MinutesZmanis() { 1136 return getSofZmanShma(getAlos72Zmanis(), getTzais72Zmanis(), true); 1137 } 1138 1139 /** 1140 * This method returns the latest <em>zman krias shema</em> (time to recite <em>Shema</em> in the morning) according 1141 * to the opinion of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on 1142 * <em>alos</em> being {@link #getAlos90Minutes() 90} minutes before {@link #getSunrise()}. This time is 3 1143 * {@link #getShaahZmanis90Minutes() <em>shaos zmaniyos</em>} (solar hours) after {@link #getAlos90Minutes() dawn} based on 1144 * the opinion of the MGA that the day is calculated from a {@link #getAlos90Minutes() dawn} of 90 minutes before sunrise to 1145 * {@link #getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 3 * 1146 * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90Minutes() dawn}. 1147 * 1148 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1149 * as in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where 1150 * it does not set, a {@code null} will be returned. See detailed explanation on top of the 1151 * {@link AstronomicalCalendar} documentation. 1152 * @see #getShaahZmanis90Minutes() 1153 * @see #getAlos90Minutes() 1154 * @see #isUseAstronomicalChatzosForOtherZmanim() 1155 */ 1156 public Instant getSofZmanShmaMGA90Minutes() { 1157 return getSofZmanShma(getAlos90Minutes(), getTzais90Minutes(), true); 1158 } 1159 1160 /** 1161 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the 1162 * opinion of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based 1163 * on <em>alos</em> being {@link #getAlos90Zmanis() 90} minutes <em>zmaniyos</em> before {@link #getSunset() 1164 * sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() <em>shaos zmaniyos</em>} (solar hours) after 1165 * {@link #getAlos90Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link 1166 * #getAlos90Zmanis() dawn} of 90 minutes <em>zmaniyos</em> before sunrise to {@link #getTzais90Zmanis() nightfall} 1167 * of 90 minutes <em>zmaniyos</em> after sunset. This returns the time of 3 * {@link #getShaahZmanis90MinutesZmanis()} 1168 * after {@link #getAlos90Zmanis() dawn}. 1169 * 1170 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1171 * as in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where 1172 * it does not set, a {@code null} will be returned. See detailed explanation on top of the 1173 * {@link AstronomicalCalendar} documentation. 1174 * @see #getShaahZmanis90MinutesZmanis() 1175 * @see #getAlos90Zmanis() 1176 * @see #isUseAstronomicalChatzosForOtherZmanim() 1177 */ 1178 public Instant getSofZmanShmaMGA90MinutesZmanis() { 1179 return getSofZmanShma(getAlos90Zmanis(), getTzais90Zmanis(), true); 1180 } 1181 1182 /** 1183 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the opinion of 1184 * the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 1185 * #getAlos96Minutes() 96} minutes before {@link #getSunrise()}. This time is 3 {@link 1186 * #getShaahZmanis96Minutes() <em>shaos zmaniyos</em>} (solar hours) after {@link #getAlos96Minutes() dawn} based on the opinion 1187 * of the MGA that the day is calculated from a {@link #getAlos96Minutes() dawn} of 96 minutes before sunrise to {@link 1188 * #getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link #getShaahZmanis96Minutes()} 1189 * after {@link #getAlos96Minutes() dawn}. 1190 * 1191 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1192 * as in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where 1193 * it does not set, a {@code null} will be returned. See detailed explanation on top of the 1194 * {@link AstronomicalCalendar} documentation. 1195 * @see #getShaahZmanis96Minutes() 1196 * @see #getAlos96Minutes() 1197 * @see #isUseAstronomicalChatzosForOtherZmanim() 1198 */ 1199 public Instant getSofZmanShmaMGA96Minutes() { 1200 return getSofZmanShma(getAlos96Minutes(), getTzais96Minutes(), true); 1201 } 1202 1203 /** 1204 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the opinion of the 1205 * <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 1206 * #getAlos90Zmanis() 96} minutes <em>zmaniyos</em> before {@link #getSunrise()}. This time is 3 {@link 1207 * #getShaahZmanis96MinutesZmanis() <em>shaos zmaniyos</em>} (solar hours) after {@link #getAlos96Zmanis() dawn} based on the 1208 * opinion of the MGA that the day is calculated from a {@link #getAlos96Zmanis() dawn} of 96 minutes <em>zmaniyos</em> before 1209 * sunrise to {@link #getTzais90Zmanis() nightfall} of 96 minutes <em>zmaniyos</em> after sunset. This returns the time of 3 * 1210 * {@link #getShaahZmanis96MinutesZmanis()} after {@link #getAlos96Zmanis() dawn}. 1211 * 1212 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1213 * as in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where 1214 * it does not set, a {@code null} will be returned. See detailed explanation on top of the 1215 * {@link AstronomicalCalendar} documentation. 1216 * @see #getShaahZmanis96MinutesZmanis() 1217 * @see #getAlos96Zmanis() 1218 * @see #isUseAstronomicalChatzosForOtherZmanim() 1219 */ 1220 public Instant getSofZmanShmaMGA96MinutesZmanis() { 1221 return getSofZmanShma(getAlos96Zmanis(), getTzais96Zmanis(), true); 1222 } 1223 1224 /** 1225 * This method returns the latest <em>zman krias shema</em> (time to recite <em>Shema</em> in the morning) calculated as 3 hours 1226 * (regular clock hours and not <em>shaos zmaniyos</em>) before {@link #getChatzosHayom()}. Generally known as part of the 1227 * "Komarno" <em>zmanim</em> after <a href="https://en.wikipedia.org/wiki/Komarno_(Hasidic_dynasty)#Rabbi_Yitzchak_Eisik_Safrin" 1228 * >Rav Yitzchak Eizik of Komarno</a>, a proponent of this calculation, it actually predates him a lot. It is the opinion of the 1229 * <em>Shach</em> in the Nekudas Hakesef (Yoreh Deah 184), <a href= 1230 * "https://hebrewbooks.org/pdfpager.aspx?req=21638&st=&pgnum=30">Rav Moshe Lifshitz</a> in his commentary <a href= 1231 * "https://hebrewbooks.org/pdfpager.aspx?req=21638&st=&pgnum=50">Lechem Mishneh on Brachos 1:2</a>. It is next brought down 1232 * about 100 years later by the <a href="https://en.wikipedia.org/wiki/Jacob_Emden">Yaavetz</a> (in his <em>siddur</em>, 1233 * <a href="https://hebrewbooks.org/pdfpager.aspx?req=7920&st=&pgnum=6">Mor Uktziah Orach 1234 * Chaim 1</a>, <a href="https://hebrewbooks.org/pdfpager.aspx?req=22309&st=&pgnum=30">Lechem Shamayim, Brachos 1:2</a> and 1235 * <a href="https://hebrewbooks.org/pdfpager.aspx?req=1408&st=&pgnum=69">She'elos Yaavetz vol. 1 no. 40</a>), Rav Yitzchak Eizik 1236 * of Komarno in the Ma'aseh Oreg on Mishnayos Brachos 11:2, Shevus Yaakov, Chasan Sofer and others. See Yisrael Vehazmanim 1237 * <a href="https://hebrewbooks.org/pdfpager.aspx?req=9765&st=&pgnum=83">vol. 1 7:3, page 55 - 62</a>. 1238 * 1239 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1240 * as in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where 1241 * it does not set, a {@code null} will be returned. See detailed explanation on top of the 1242 * {@link AstronomicalCalendar} documentation. 1243 * @see #getChatzosHayom() 1244 * @see #getSofZmanTfila2HoursBeforeChatzos() 1245 * @see #isUseAstronomicalChatzos() 1246 */ 1247 public Instant getSofZmanShma3HoursBeforeChatzos() { 1248 return getTimeOffset(getChatzosHayom(), Duration.ofHours(-3)); 1249 } 1250 1251 /** 1252 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the opinion of the 1253 * <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 1254 * #getAlos120Minutes() 120} minutes or 1/6th of the day before {@link #getSunrise()}. This time is 3 {@link 1255 * #getShaahZmanis120Minutes() <em>shaos zmaniyos</em>} (solar hours) after {@link #getAlos120Minutes() dawn} based on the 1256 * opinion of the MGA that the day is calculated from a {@link #getAlos120Minutes() dawn} of 120 minutes before sunrise to {@link 1257 * #getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of 3 {@link #getShaahZmanis120Minutes()} 1258 * after {@link #getAlos120Minutes() dawn}. This is an extremely early <em>zman</em> that is very much a <em>chumra</em>. 1259 * 1260 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1261 * as in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where 1262 * it does not set, a {@code null} will be returned. See detailed explanation on top of the 1263 * {@link AstronomicalCalendar} documentation. 1264 * @see #getShaahZmanis120Minutes() 1265 * @see #getAlos120Minutes() 1266 * @see #isUseAstronomicalChatzosForOtherZmanim() 1267 */ 1268 public Instant getSofZmanShmaMGA120Minutes() { 1269 return getSofZmanShma(getAlos120Minutes(), getTzais120Minutes(), true); 1270 } 1271 1272 /** 1273 * This method returns the latest <em>zman krias shema</em> (time to recite <em>Shema</em> in the morning) based on the opinion 1274 * that the day starts at {@link #getAlos16Point1Degrees() <em>alos</em> 16.1°} and ends at {@link 1275 * #getSeaLevelSunset() sea level sunset}. This is the opinion of the <a href= 1276 * "https://hebrewbooks.org/40357">חידושי וכללות הרז״ה</a> in <a href="https://hebrewbooks.org/pdfpager.aspx?req=40357&pgnum=71" 1277 * >סימן ב׳ סע״ג וסע״ד</a> and <a href="https://hebrewbooks.org/pdfpager.aspx?req=40357&pgnum=93">סימן ז׳ סע״ב</a> and the <a href= 1278 * "https://hebrewbooks.org/14799">מנורה הטהורה</a> as mentioned by <span lang="he">ישראל והזמנים</span> <a href= 1279 * "https://hebrewbooks.org/pdfpager.aspx?req=9765&pgnum=81">ח״א סי׳ ז׳ פ״ג או׳ ט״ז</a>. Also see <a href= 1280 * "https://hebrewbooks.org/pdfpager.aspx?req=67890&pgnum=29">אשר לשלמה, מועד, סי׳ ה׳</a>. Three <em>shaos zmaniyos</em> are calculated 1281 * based on this day and added to {@link #getAlos16Point1Degrees() <em>alos</em>} to reach this time. This time is 3 <em>shaos 1282 * zmaniyos</em> (solar hours) after {@link #getAlos16Point1Degrees()} based on the opinion that the day is calculated from 1283 * <em>alos</em> 16.1° to {@link #getSeaLevelSunset()}. <b>Note: </b> Based on this calculation <em>chatzos</em> will not be at 1284 * midday and {@link #isUseAstronomicalChatzosForOtherZmanim()} will be ignored. Sources for an asymmetrical day-based 1285 * calculation can be seen in the documentation of {@link #getSofZmanShmaAlos16Point1DegreesToTzaisGeonim7Point083Degrees}. 1286 * 1287 * @return the {@code Instant} of the latest <em>zman krias shema</em> based on this day. If the calculation can't 1288 * be computed such as northern and southern locations even south of the Arctic Circle and north of the 1289 * Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a null 1290 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1291 * @see #getAlos16Point1Degrees() 1292 * @see #getSeaLevelSunset() 1293 */ 1294 public Instant getSofZmanShmaAlos16Point1ToSunset() { 1295 return getSofZmanShma(getAlos16Point1Degrees(), getSunsetBasedOnElevationSetting(), false); 1296 } 1297 1298 /** 1299 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) based on the opinion that the 1300 * day is an asymmetrical day that starts at {@link #getAlos16Point1Degrees() <em>alos</em> 16.1°} and ends at {@link 1301 * #getTzaisGeonim7Point083Degrees() <em>tzais</em> 7.083°}. 3 <em>shaos zmaniyos</em> (temporal hours) are calculated based on 1302 * this day and added to {@link #getAlos16Point1Degrees() <em>alos</em>} to reach this time. Sefer <a href= 1303 * "https://hebrewbooks.org/9765">Yisroel</a> <a href="https://hebrewbooks.org/9764">Vehazmanim</a> V. III in the explanation of 1304 * <a href="https://hebrewbooks.org/pdfpager.aspx?req=9764&st=&pgnum=260"><em>zman</em> no. 22 on page 1015</a> attributes the 1305 * origin of this <em>zman</em> to <a href="https://en.wikipedia.org/wiki/Jacob_al-Faraji">Rabbi Yaakov al-Faraji's</a> <a href= 1306 * "https://hebrewbooks.org/1151">שו״ת מהרי״ף</a> (who discusses <em>zmanim</em> in various places including chapters 6, 46, 47 1307 * and 49), <a href="https://en.wikipedia.org/wiki/Joseph_Schwarz_(geographer)">Rabbi Yehosef Schwarz</a> in the <a href= 1308 * "https://hebrewbooks.org/31703">דברי יוסף</a> in the name of <a href="https://en.wikipedia.org/wiki/Nathan_Adler" 1309 * >Rabbi Nosson Adler</a>, the <a href="https://en.wikipedia.org/wiki/Yosef_Hayyim">Ben Ish Chai</a> in <a href= 1310 * "https://hebrewbooks.org/pdfpager.aspx?req=14054&st=&pgnum=108">שנה א׳ פ׳ ויקהל</a>, <a href= 1311 * "https://he.wikipedia.org/wiki/%D7%A0%D7%A1%D7%99%D7%9D_%D7%9B%D7%93%D7%95%D7%A8%D7%99_%D7%97%D7%96%D7%9F">Rabbi Nissim 1312 * Kaduri Chazan's</a> <a href="https://www.nli.org.il/he/books/NNL_ALEPH990019649990205171/NLI">מעשה נסים</a> (in the calendar at 1313 * the end), <a href="https://he.wikipedia.org/wiki/%D7%9E%D7%A6%D7%9C%D7%99%D7%97_%D7%9E%D7%90%D7%96%D7%95%D7%96">Rabbi Matzliach 1314 * Mazuz's</a> שו״ת איש מצליח, in Dr. Baruch (Berthold) Cohn's <em>luach</em> <a href= 1315 * "https://sammlungen.ub.uni-frankfurt.de/freimann/content/titleinfo/983088">Tabellen enthaltend die Zeitangaben für den Beginn 1316 * der Nacht und des Tages für die Breitengrade + 66 bis -38</a>, שו״ת תשובות והנהגות ח״א <a href= 1317 * "https://hebrewbooks.org/pdfpager.aspx?req=20025&st=&pgnum=50">no. 55</a> and <a href= 1318 * "https://hebrewbooks.org/pdfpager.aspx?req=20025&st=&pgnum=218">307</a> (<em>lechumra</em> in the name of the <a href= 1319 * "https://en.wikipedia.org/wiki/Yehoshua_Leib_Diskin">מהרי״ל דיסקין</a> and others) who calculate <em>shaos zmaniyos</em> based on 1320 * an asymmetrical day from an early <em>alos</em> to an early <em>tzais</em> <b>Note: </b> Based on this calculation 1321 * <em>chatzos</em> will not be at midday and {@link #isUseAstronomicalChatzosForOtherZmanim()} will be ignored. There are many 1322 * variations of this type of zman, with varying start and end times. The Yisroel Vehazmanim gave this as a relatively common one. 1323 * Variations using this library are very simple. For example to calculate <em>sof zman krias shema</em> starting the day at the 1324 * Rambam's alos of 18° and ending it at 3.7°, use the following code. 1325 * {@snippet lang='java' : 1326 * Instant sofZmanKS = czc.getSofZmanShma(czc.getAlos18Degrees(), czc.getTzaisGeonim3Point7Degrees(), false); 1327 * } 1328 * 1329 * @return the {@code Instant} of the latest <em>zman krias shema</em> based on this calculation. If the calculation can't be 1330 * computed such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 1331 * the sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned. See detailed 1332 * explanation on top of the {@link AstronomicalCalendar} documentation. 1333 * @see #getAlos16Point1Degrees() 1334 * @see #getTzaisGeonim7Point083Degrees() 1335 * @see #getPlagAlos16Point1DegreesToTzaisGeonim7Point083Degrees() 1336 * @see #getShaahZmanisAlos16Point1DegreesToTzaisGeonim7Point083Degrees() 1337 */ 1338 public Instant getSofZmanShmaAlos16Point1DegreesToTzaisGeonim7Point083Degrees() { 1339 return getSofZmanShma(getAlos16Point1Degrees(), getTzaisGeonim7Point083Degrees(), false); 1340 } 1341 1342 /** 1343 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion of the 1344 * <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 1345 * #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise()}. This time is 4 {@link #getShaahZmanis19Point8Degrees()} after 1346 * {@link #getAlos19Point8Degrees()} based on the opinion that the day is calculated from dawn to nightfall with both being 19.8° 1347 * below sunrise or sunset. 1348 * 1349 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1350 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 1351 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be 1352 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1353 * @see #getShaahZmanis19Point8Degrees() 1354 * @see #getAlos19Point8Degrees() 1355 * @see #isUseAstronomicalChatzosForOtherZmanim() 1356 */ 1357 public Instant getSofZmanTfilaMGA19Point8Degrees() { 1358 return getSofZmanTfila(getAlos19Point8Degrees(), getTzais19Point8Degrees(), true); 1359 } 1360 1361 /** 1362 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion of the 1363 * <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on * <em>alos</em> being {@link 1364 * #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise()}. This time is 4 {@link #getShaahZmanis16Point1Degrees()} after 1365 * {@link #getAlos16Point1Degrees()} based on the opinion that the day is calculated from dawn to nightfall with both being 16.1° 1366 * below sunrise or sunset. 1367 * 1368 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1369 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 1370 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be 1371 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1372 * @see #getShaahZmanis16Point1Degrees() 1373 * @see #getAlos16Point1Degrees() 1374 */ 1375 public Instant getSofZmanTfilaMGA16Point1Degrees() { 1376 return getSofZmanTfila(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); 1377 } 1378 1379 /** 1380 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion of the 1381 * <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 1382 * #getAlos18Degrees()} before {@link #getSunrise()}. This time is 4 {@link #getShaahZmanis18Degrees()} after {@link 1383 * #getAlos18Degrees() dawn} based on the opinion that the day is calculated from dawn to nightfall with both being 18° below 1384 * sunrise and sunset. 1385 * 1386 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such as northern and 1387 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach low 1388 * enough below the horizon for this calculation, a {@code null} will be returned. See detailed explanation on top of the 1389 * {@link AstronomicalCalendar} documentation. 1390 * @see #getShaahZmanis18Degrees() 1391 * @see #getAlos18Degrees() 1392 */ 1393 public Instant getSofZmanTfilaMGA18Degrees() { 1394 return getSofZmanTfila(getAlos18Degrees(), getTzais18Degrees(), true); 1395 } 1396 1397 /** 1398 * This method returns the latest <em>zman tfila</em> (time to the morning prayers) according to the opinion of the 1399 * <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> 1400 * being {@link #getAlos72Zmanis()} 72 minutes <em>zmaniyos</em> or a 10th of the day before {@link #getSunrise()}. This time 1401 * is 4 {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis()} based on the opinion that the day is calculated 1402 * from a {@link #getAlos72Zmanis()} before sunrise to {@link #getTzais72Zmanis()} of 72 minutes <em>zmaniyos</em> after sunset. 1403 * 1404 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such as in the Arctic 1405 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} 1406 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1407 * @see #getShaahZmanis72MinutesZmanis() 1408 * @see #getAlos72Zmanis() 1409 */ 1410 public Instant getSofZmanTfilaMGA72MinutesZmanis() { 1411 return getSofZmanTfila(getAlos72Zmanis(), getTzais72Zmanis(), true); 1412 } 1413 1414 /** 1415 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion of the 1416 * <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 1417 * #getAlos90Minutes()} minutes before {@link #getSunrise()}. This time is 4 {@link #getShaahZmanis90Minutes()} after {@link 1418 * #getAlos90Minutes()} based on the opinion that the day is calculated from a {@link #getAlos90Minutes()} before sunrise to 1419 * {@link #getTzais90Minutes()} after sunset. 1420 * 1421 * @return the {@code Instant} of the latest <em>zman tfila</em>. If the calculation can't be computed such as in the Arctic 1422 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} 1423 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1424 * @see #getShaahZmanis90Minutes() 1425 * @see #getAlos90Minutes() 1426 */ 1427 public Instant getSofZmanTfilaMGA90Minutes() { 1428 return getSofZmanTfila(getAlos90Minutes(), getTzais90Minutes(), true); 1429 } 1430 1431 /** 1432 * This method returns the latest <em>zman tfila</em> (time to the morning prayers) according to the opinion of the <a href= 1433 * "https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 1434 * #getAlos90Zmanis()} 90 minutes <em>zmaniyos</em> or 1/8th of the day before {@link #getSunrise()}. This time is 4 {@link 1435 * #getShaahZmanis90MinutesZmanis()} after {@link #getAlos90Zmanis()} based on the opinion that the day is calculated from a {@link 1436 * #getAlos90Zmanis()} to {@link #getTzais90Zmanis()}. 1437 * 1438 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such as in the Arctic 1439 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} 1440 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1441 * @see #getShaahZmanis90MinutesZmanis() 1442 * @see #getAlos90Zmanis() 1443 */ 1444 public Instant getSofZmanTfilaMGA90MinutesZmanis() { 1445 return getSofZmanTfila(getAlos90Zmanis(), getTzais90Zmanis(), true); 1446 } 1447 1448 /** 1449 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion 1450 * of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on 1451 * <em>alos</em> being {@link #getAlos96Minutes()} minutes before {@link #getSunrise()}. This time is 4 1452 * {@link #getShaahZmanis96Minutes() <em>shaos zmaniyos</em>} (solar hours) after {@link #getAlos96Minutes() dawn} based on 1453 * the opinion of the MGA that the day is calculated from a {@link #getAlos96Minutes() dawn} of 96 minutes before 1454 * sunrise to {@link #getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 4 * 1455 * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96Minutes() dawn}. 1456 * 1457 * @return the {@code Instant} of the latest <em>zman tfila</em>. If the calculation can't be computed such as in the Arctic Circle 1458 * where there is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} will be 1459 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1460 * @see #getShaahZmanis96Minutes() 1461 * @see #getAlos96Minutes() 1462 */ 1463 public Instant getSofZmanTfilaMGA96Minutes() { 1464 return getSofZmanTfila(getAlos96Minutes(), getTzais96Minutes(), true); 1465 } 1466 1467 /** 1468 * This method returns the latest <em>zman tfila</em> (time to the morning prayers) according to the opinion of the <a href= 1469 * "https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 1470 * #getAlos96Zmanis()} 96 minutes <em>zmaniyos</em> before {@link #getSunrise()}. This time is 4 {@link 1471 * #getShaahZmanis96MinutesZmanis()} after {@link #getAlos96Zmanis()} based on the opinion that the day is calculated from a 1472 * {@link #getAlos96Zmanis()} before sunrise to {@link #getTzais96Zmanis()} after sunset. This returns the time of 4 * {@link 1473 * #getShaahZmanis96MinutesZmanis()} after {@link #getAlos96Zmanis()}. 1474 * 1475 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such as in the Arctic 1476 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} 1477 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1478 * @see #getShaahZmanis90MinutesZmanis() 1479 * @see #getAlos90Zmanis() 1480 */ 1481 public Instant getSofZmanTfilaMGA96MinutesZmanis() { 1482 return getSofZmanTfila(getAlos96Zmanis(), getTzais96Zmanis(), true); 1483 } 1484 1485 /** 1486 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion of the 1487 * <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 1488 * #getAlos120Minutes()} before {@link #getSunrise()} . This time is 4 {@link #getShaahZmanis120Minutes()} after {@link 1489 * #getAlos120Minutes()} based on the opinion that the day is calculated from a {@link #getAlos120Minutes()}, 120 minutes before 1490 * sunrise to {@link #getTzais120Minutes()}, 120 minutes after sunset. This is an extremely early <em>zman</em> that is very 1491 * stringent <em>chumra</em>. 1492 * 1493 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1494 * as in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where 1495 * it does not set, a {@code null} will be returned. See detailed explanation on top of the 1496 * {@link AstronomicalCalendar} documentation. 1497 * @see #getShaahZmanis120Minutes() 1498 * @see #getAlos120Minutes() 1499 */ 1500 public Instant getSofZmanTfilaMGA120Minutes() { 1501 return getSofZmanTfila(getAlos120Minutes(), getTzais120Minutes(), true); 1502 } 1503 1504 /** 1505 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) calculated as 2 hours before {@link 1506 * #getChatzosHayom()}. This is based on the opinions that calculate <em>sof zman krias shema</em> as {@link 1507 * #getSofZmanShma3HoursBeforeChatzos()}. This returns the time of 2 hours before {@link #getChatzosHayom()}. 1508 * 1509 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1510 * as in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where 1511 * it does not set, a {@code null} will be returned. See detailed explanation on top of the 1512 * {@link AstronomicalCalendar} documentation. 1513 * @see #getChatzosHayom() 1514 * @see #getSofZmanShma3HoursBeforeChatzos() 1515 */ 1516 public Instant getSofZmanTfila2HoursBeforeChatzos() { 1517 return getTimeOffset(getChatzosHayom(), Duration.ofHours(-2)); 1518 } 1519 1520 /** 1521 * This method returns <em>mincha gedola</em> calculated as 30 minutes after {@link #getChatzosHayom() <em>chatzos</em>} 1522 * and not 1/2 of a {@link #getShaahZmanisGRA() <em>shaah zmanis</em>} after {@link #getChatzosHayom() <em>chatzos</em>} as 1523 * calculated by {@link #getMinchaGedola}. Some use this time to delay the start of <em>mincha</em> in the winter when 1524 * 1/2 of a {@link #getShaahZmanisGRA() <em>shaah zmanis</em>} is less than 30 minutes. See {@link 1525 * #getMinchaGedolaGreaterThan30(Instant)} for a convenience method that returns the later of the 2 calculations. One should not 1526 * use this time to start <em>mincha</em> before the standard {@link #getMinchaGedolaGRA() <em>mincha gedola</em>}. See Shulchan 1527 * Aruch <a href="https://hebrewbooks.org/pdfpager.aspx?req=49624&st=&pgnum=291">Orach Chayim 234:1</a> and the Shaar Hatziyon 1528 * <em>seif katan ches</em>. Since this calculation is a fixed 30 minutes of regular clock time after <em>chatzos</em>, even if 1529 * {@link #isUseAstronomicalChatzosForOtherZmanim()} is {@code false}, this <em>mincha gedola</em> time will be affected by 1530 * {@link #isUseAstronomicalChatzos()} and not by {@link #isUseAstronomicalChatzosForOtherZmanim()}. 1531 * 1532 * @return the {@code Instant} of 30 minutes after <em>chatzos</em>. If the calculation can't be computed such as in the Arctic 1533 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} 1534 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1535 * @todo Consider adjusting this to calculate the time as half an hour after {@link #getChatzosHayom()} that uses 1536 * {@link #isUseAstronomicalChatzos()} to determine the type of <em>chatzos</em> to utilize. that support it, 1537 * based on {@link #isUseAstronomicalChatzos()}. 1538 * @see #getMinchaGedolaGRA() 1539 * @see #getMinchaGedolaGreaterThan30(Instant) 1540 * @see #getChatzosHayom() 1541 * @see #isUseAstronomicalChatzos() 1542 * @see #isUseAstronomicalChatzosForOtherZmanim() 1543 */ 1544 public Instant getMinchaGedola30Minutes() { 1545 return getTimeOffset(getChatzosHayom(), Duration.ofMinutes(30)); 1546 } 1547 1548 /** 1549 * This method returns the time of <em>mincha gedola</em> according to the Magen Avraham with the day starting 72 1550 * minutes before sunrise and ending 72 minutes after sunset. This is the earliest time to pray <em>mincha</em>. For 1551 * more information on this see the documentation on {@link #getMinchaGedolaGRA() <em>mincha gedola</em>}. This is 1552 * calculated as 6.5 {@link #getTemporalHour() solar hours} after <em>alos</em>. The calculation used is 6.5 * 1553 * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72Minutes() <em>alos</em>}. If {@link 1554 * #isUseAstronomicalChatzosForOtherZmanim()} is set to {@code true}, the calculation will be based on 0.5 1555 * {@link #getHalfDayBasedShaahZmanis(Instant, Instant) half-day based <em>sha'ah zmanis</em>} between 1556 * {@link #getChatzosHayom()} and {@link #getTzais72Minutes()} after {@link #getChatzosHayom()}. 1557 * 1558 * @see #getAlos72Minutes() 1559 * @see #getMinchaGedolaGRA() 1560 * @see #getMinchaKetanaGRA() 1561 * @see #getMinchaGedolaGRA() 1562 * @see #getChatzosHayom() 1563 * @see #isUseAstronomicalChatzosForOtherZmanim() 1564 * @return the {@code Instant} of the time of <em>mincha gedola</em>. If the calculation can't be computed such as in the Arctic 1565 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} 1566 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1567 */ 1568 public Instant getMinchaGedola72Minutes() { 1569 if (isUseAstronomicalChatzosForOtherZmanim()) { 1570 return getHalfDayBasedZman(getChatzosHayom(), getTzais72Minutes(), 0.5); 1571 } else { 1572 return getMinchaGedola(getAlos72Minutes(), getTzais72Minutes(), true); 1573 } 1574 } 1575 1576 /** 1577 * This method returns the time of <em>mincha gedola</em> according to the Magen Avraham with the day starting and ending 16.1° 1578 * below the horizon. This is the earliest time to pray <em>mincha</em>. For more information on <em>mincha gedola</em>, see 1579 * {@link #getMinchaGedolaGRA()}. This is calculated as 6.5 {@link #getShaahZmanis16Point1Degrees()} after <em>alos</em>. If 1580 * {@link #isUseAstronomicalChatzosForOtherZmanim()} is set to {@code true}, the calculation will be based on 0.5 {@link 1581 * #getHalfDayBasedShaahZmanis(Instant, Instant) half-day based <em>sha'ah zmanis</em>} between {@link #getChatzosHayom()} and 1582 * {@link #getAlos16Point1Degrees()} after {@link #getChatzosHayom()}. 1583 * @return the {@code Instant} of the time of <em>mincha gedola</em>. If the calculation can't be computed such as 1584 * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 1585 * the sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned. 1586 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1587 * @see #getShaahZmanis16Point1Degrees() 1588 * @see #getMinchaGedolaGRA() 1589 * @see #getMinchaKetanaGRA() 1590 */ 1591 public Instant getMinchaGedola16Point1Degrees() { 1592 if (isUseAstronomicalChatzosForOtherZmanim()) { 1593 return getHalfDayBasedZman(getChatzosHayom(), getTzais16Point1Degrees(), 0.5); 1594 } else { 1595 return getMinchaGedola(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); 1596 } 1597 } 1598 1599 /** 1600 * This method returns the time of <em>mincha gedola</em> based on the opinion of <a href= 1601 * "https://en.wikipedia.org/wiki/Yaakov_Moshe_Hillel">Rabbi Yaakov Moshe Hillel</a> as published in the <em>luach</em> of the 1602 * Bais Horaah of Yeshivat Chevrat Ahavat Shalom that <em>mincha gedola</em> is calculated as half a <em>shaah zmanis</em> after 1603 * <em>chatzos</em> with <em>shaos zmaniyos</em> calculated based on a day starting at {@link #getAlos16Point1Degrees()} and 1604 * ending at {@link #getTzaisGeonim3Point7Degrees()}. The later of this time or 30 clock minutes after <em>chatzos</em> is 1605 * returned. See {@link #getMinchaGedolaGreaterThan30(Instant)} for a way to calculate the later of 30 minutes or this <em>mincha 1606 * gedola</em>. For more information about <em>mincha gedola</em> see the documentation on {@link #getMinchaGedolaGRA() 1607 * <em>mincha gedola</em>}. Since calculation of this <em>zman</em> involves <em>chatzos</em> that is offset from the center of 1608 * the astronomical day, {@link #isUseAstronomicalChatzosForOtherZmanim()} is N/A here. Sources for an asymmetrical day-based 1609 * calculation can be seen in the documentation of {@link #getSofZmanShmaAlos16Point1DegreesToTzaisGeonim7Point083Degrees}. 1610 * @return the {@code Instant} of the <em>mincha gedola</em>. If the calculation can't be computed such as northern and 1611 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not 1612 * reach low enough below the horizon for this calculation, a {@code null} will be returned. See detailed 1613 * explanation on top of the {@link AstronomicalCalendar} documentation. 1614 * @see #getAlos16Point1Degrees() 1615 * @see #getTzaisGeonim3Point7Degrees() 1616 * @see #getShaahZmanisAlos16Point1DegreesToTzaisGeonim3Point7Degrees() 1617 * @see #getMinchaGedolaGreaterThan30(Instant) 1618 */ 1619 public Instant getMinchaGedolaAhavatShalom() { 1620 Instant chatzos = getChatzosHayom(); 1621 Instant minchaGedola30 = getMinchaGedola30Minutes(); 1622 Duration shaahZmanis = getShaahZmanisAlos16Point1DegreesToTzaisGeonim3Point7Degrees(); 1623 1624 if (chatzos == null || minchaGedola30 == null || shaahZmanis == null) { 1625 return null; 1626 } 1627 1628 Instant minchaGedolaAhavatShalom = getTimeOffset(chatzos, shaahZmanis.dividedBy(2)); 1629 return minchaGedola30.compareTo(minchaGedolaAhavatShalom) > 0 ? minchaGedola30 : minchaGedolaAhavatShalom; 1630 } 1631 1632 /** 1633 * This is a convenience method that returns the later of the mincha gedola passed in and {@link 1634 * #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisGRA() <em>shaah zmanis</em>} is less 1635 * than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise the mincha gedola passed in will be 1636 * returned. Since this calculation can be an offset of <em>chatzos</em> (if 30 clock minutes > 1/2 of a <em>shaah 1637 * zmanis</em>), even if {@link #isUseAstronomicalChatzosForOtherZmanim()} is {@code false}, this <em>mincha</em> 1638 * time may be affected by {@link #isUseAstronomicalChatzos()}. 1639 * 1640 * @param minchaGedola the mincha gedola to be compared to {@link #getMinchaGedola30Minutes()}. 1641 * @return the {@code Instant} of the later of {@link #getMinchaGedolaGRA()} and {@link #getMinchaGedola30Minutes()}. 1642 * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year 1643 * where the sun does not rise, and one where it does not set, a {@code null} will be returned. See detailed 1644 * explanation on top of the {@link AstronomicalCalendar} documentation. 1645 * @see #getMinchaGedolaGRA() 1646 * @see #getMinchaGedola30Minutes() 1647 * @see #isUseAstronomicalChatzos() 1648 * 1649 */ 1650 public Instant getMinchaGedolaGreaterThan30(Instant minchaGedola) { 1651 if (getMinchaGedola30Minutes() == null || minchaGedola == null) { 1652 return null; 1653 } else { 1654 return getMinchaGedola30Minutes().compareTo(minchaGedola) > 0 ? getMinchaGedola30Minutes() 1655 : minchaGedola; 1656 } 1657 } 1658 1659 /** 1660 * This is a convenience method that returns the later of {@link #getMinchaGedolaGRA()} and {@link #getMinchaGedola30Minutes()}. 1661 * In the winter when 1/2 of a {@link #getShaahZmanisGRA() <em>shaah zmanis</em>} is less than 30 minutes {@link 1662 * #getMinchaGedola30Minutes()} will be returned, otherwise {@link #getMinchaGedolaGRA()} will be returned. Since this 1663 * calculation can be an offset of <em>chatzos</em> (if 30 clock minutes > 1/2 of a <em>shaah zmanis</em>), even if {@link 1664 * #isUseAstronomicalChatzosForOtherZmanim()} is {@code false}, this <em>mincha</em> time may be affected by 1665 * {@link #isUseAstronomicalChatzos()}. 1666 * 1667 * @return the {@code Instant} of the later of {@link #getMinchaGedolaGRA()} and {@link #getMinchaGedola30Minutes()}. 1668 * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year 1669 * where the sun does not rise, and one where it does not set, a {@code null} will be returned. See detailed 1670 * explanation on top of the {@link AstronomicalCalendar} documentation. 1671 * @todo Consider adjusting this to calculate the time as 30 minutes after {@link #getChatzosHayom()} that uses {@link 1672 * isUseAstronomicalChatzos()} to determine the type of <em>chatzos</em> to utilize (if the {@link 1673 * com.kosherjava.zmanim.util.AstronomicalCalculator calculator} support astronomical <em>chatzos</em>), 1674 * based on the {@link #isUseAstronomicalChatzos()} setting. 1675 * @see #getMinchaGedolaGRA() 1676 * @see #getMinchaGedola30Minutes() 1677 * @see #getMinchaGedolaGreaterThan30(Instant) 1678 * @see #isUseAstronomicalChatzos() 1679 */ 1680 public Instant getMinchaGedolaGRAGreaterThan30() { 1681 return getMinchaGedolaGreaterThan30(getMinchaGedolaGRA()); 1682 } 1683 1684 /** 1685 * This method returns the time of <em>mincha ketana</em> according to the Magen Avraham with the day starting and ending 16.1° 1686 * below the horizon. This is the preferred earliest time to pray <em>mincha</em> according to the opinion of the <a href= 1687 * "https://en.wikipedia.org/wiki/Maimonides">Rambam</a> and others. For more information on <em>mincha ketana</em> see the 1688 * documentation on {@link #getMinchaGedolaGRA()}. This is calculated as 9.5 {@link #getShaahZmanis16Point1Degrees()} after 1689 * {@link #getAlos16Point1Degrees()}. 1690 * 1691 * @see #getShaahZmanis16Point1Degrees() 1692 * @see #getMinchaGedolaGRA() 1693 * @see #getMinchaKetanaGRA() 1694 * @return the {@code Instant} of the time of <em>mincha ketana</em>. If the calculation can't be computed such 1695 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 1696 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be 1697 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1698 */ 1699 public Instant getMinchaKetana16Point1Degrees() { 1700 return getMinchaKetana(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); 1701 } 1702 1703 /** 1704 * This method returns the time of <em>mincha ketana</em> based on the opinion of <a href= 1705 * "https://en.wikipedia.org/wiki/Yaakov_Moshe_Hillel">Rabbi Yaakov Moshe Hillel</a> as published in the <em>luach</em> of the 1706 * Bais Horaah of Yeshivat Chevrat Ahavat Shalom that <em>mincha ketana</em> is calculated as 2.5 <em>shaos zmaniyos</em> before 1707 * {@link #getTzaisGeonim3Point8Degrees()} with <em>shaos zmaniyos</em> calculated based on a day starting at {@link 1708 * #getAlos16Point1Degrees()} and ending at {@link #getTzaisGeonim3Point8Degrees()}. <em>Mincha ketana</em> is the preferred 1709 * earliest time to pray <em>mincha</em> according to the opinion of the <a href="https://en.wikipedia.org/wiki/Maimonides" 1710 * >Rambam</a> and others. For more information on <em>mincha ketana</em> see the documentation on {@link #getMinchaKetanaGRA()}. 1711 * 1712 * @return the {@code Instant} of the time of <em>mincha ketana</em>. If the calculation can't be computed such as 1713 * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the 1714 * sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned. 1715 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1716 * 1717 * @see #getShaahZmanisAlos16Point1DegreesToTzaisGeonim3Point8Degrees() 1718 * @see #getMinchaGedolaAhavatShalom() 1719 * @see #getPlagAhavatShalom() 1720 */ 1721 public Instant getMinchaKetanaAhavatShalom() { 1722 Duration shaahZmanis = getShaahZmanisAlos16Point1DegreesToTzaisGeonim3Point8Degrees(); 1723 if(shaahZmanis == null) { 1724 return null; 1725 } 1726 long totalNanos = (long) (-shaahZmanis.toNanos() * 2.5); 1727 return getTimeOffset(getTzaisGeonim3Point8Degrees(), Duration.ofNanos(totalNanos)); 1728 } 1729 1730 /** 1731 * This method returns the time of <em>mincha ketana</em> according to the Magen Avraham with the day starting 72 minutes before 1732 * sunrise and ending 72 minutes after sunset. This is the preferred earliest time to pray <em>mincha</em> according to the 1733 * opinion of the <a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a> and others. For more information on this see the 1734 * documentation on {@link #getMinchaGedolaGRA()}. This is calculated as 9.5 {@link #getShaahZmanis72Minutes()} after 1735 * <em>alos</em>. 1736 * 1737 * @see #getShaahZmanis16Point1Degrees() 1738 * @see #getMinchaGedolaGRA() 1739 * @see #getMinchaKetanaGRA() 1740 * @return the {@code Instant} of the time of <em>mincha ketana</em>. If the calculation can't be computed such as 1741 * in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where it 1742 * does not set, a {@code null} will be returned. See detailed explanation on top of the 1743 * {@link AstronomicalCalendar} documentation. 1744 */ 1745 public Instant getMinchaKetana72Minutes() { 1746 return getMinchaKetana(getAlos72Minutes(), getTzais72Minutes(), true); 1747 } 1748 1749 /** 1750 * This method returns the time of <em>plag hamincha</em> according to the Magen Avraham with the day starting 60 1751 * minutes before sunrise and ending 60 minutes after sunset. This is calculated as 10.75 {@link #getShaahZmanis60Minutes()} 1752 * after {@link #getAlos60Minutes()}. 1753 * 1754 * @return the {@code Instant} of the time of <em>plag hamincha</em>. If the calculation can't be computed such as in the Arctic 1755 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 1756 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1757 * @see #getShaahZmanis60Minutes() 1758 * @see #getAlos60Minutes() 1759 * @see #getTzais60Minutes() 1760 */ 1761 public Instant getPlagHamincha60Minutes() { 1762 return getPlagHamincha(getAlos60Minutes(), getTzais60Minutes(), true); 1763 } 1764 1765 /** 1766 * This method should be used <em>lechumra</em> only and returns the time of <em>plag hamincha</em> according to the Magen 1767 * Avraham with the day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is calculated 1768 * as 10.75 {@link #getShaahZmanis72Minutes()} after {@link #getAlos72Minutes()}. Since <em>plag</em> by this calculation can 1769 * occur after sunset, it should only be used <em>lechumra</em>. 1770 * 1771 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time (often after <em>shkiah</em>), 1772 * and if used <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no current plan to remove this method 1773 * from the API, and this deprecation is intended to alert developers of the danger of using it. 1774 * @return the {@code Instant} of the time of <em>plag hamincha</em>. If the calculation can't be computed such as in the Arctic 1775 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 1776 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1777 * @see #getShaahZmanis72Minutes() 1778 */ 1779 @Deprecated (forRemoval=false) 1780 public Instant getPlagHamincha72Minutes() { 1781 return getPlagHamincha(getAlos72Minutes(), getTzais72Minutes(), true); 1782 } 1783 1784 /** 1785 * This method should be used <em>lechumra</em> only and returns the time of <em>plag hamincha</em> according to the Magen 1786 * Avraham with the day starting 90 minutes before sunrise and ending 90 minutes after sunset. This is calculated as 10.75 * 1787 * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90Minutes()}. Since <em>plag</em> by this calculation can occur after 1788 * sunset, it should only be used <em>lechumra</em>. 1789 * 1790 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time (often after <em>shkiah</em>), 1791 * and if used <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no current plan to remove this method 1792 * from the API, and this deprecation is intended to alert developers of the danger of using it. 1793 * 1794 * @return the {@code Instant} of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1795 * in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where it 1796 * does not set, a {@code null} will be returned. See detailed explanation on top of the 1797 * {@link AstronomicalCalendar} documentation. 1798 * @see #getShaahZmanis90Minutes() 1799 */ 1800 @Deprecated (forRemoval=false) 1801 public Instant getPlagHamincha90Minutes() { 1802 return getPlagHamincha(getAlos90Minutes(), getTzais90Minutes(), true); 1803 } 1804 1805 /** 1806 * This method should be used <em>lechumra</em> only and returns the time of <em>plag hamincha</em> according to the Magen 1807 * Avraham with the day starting 96 minutes before sunrise and ending 96 minutes after sunset. This is calculated as 10.75 1808 * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96Minutes()}. Since <em>plag</em> by this calculation can occur after 1809 * <em>shkiah</em>, it should only be used <em>lechumra</em>. 1810 * 1811 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time (often after <em>shkiah</em>), 1812 * and if used <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no current plan to remove this method 1813 * from the API, and this deprecation is intended to alert developers of the danger of using it. 1814 * @return the {@code Instant} of the time of <em>plag hamincha</em>. If the calculation can't be computed such as in the Arctic 1815 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 1816 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1817 * @see #getShaahZmanis96Minutes() 1818 */ 1819 @Deprecated (forRemoval=false) 1820 public Instant getPlagHamincha96Minutes() { 1821 return getPlagHamincha(getAlos96Minutes(), getTzais96Minutes(), true); 1822 } 1823 1824 /** 1825 * This method should be used <em>lechumra</em> only and returns the time of <em>plag hamincha</em>. This is calculated as 1826 * 10.75 * {@link #getAlos96Zmanis()} after {@link #getAlos96Zmanis() dawn}. Since <em>plag</em> by this calculation can occur 1827 * after <em>shkiah</em>), it should only be used <em>lechumra</em>. 1828 * 1829 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time (often after 1830 * <em>shkiah</em>), and if used <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no 1831 * current plan to remove this method from the API, and this deprecation is intended to alert developers 1832 * of the danger of using it. 1833 * @return the {@code Instant} of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1834 * in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where it 1835 * does not set, a {@code null} will be returned. See detailed explanation on top of the 1836 * {@link AstronomicalCalendar} documentation. 1837 */ 1838 @Deprecated (forRemoval=false) 1839 public Instant getPlagHamincha96MinutesZmanis() { 1840 return getPlagHamincha(getAlos96Zmanis(), getTzais96Zmanis(), true); 1841 } 1842 1843 /** 1844 * This method should be used <em>lechumra</em> only and returns the time of <em>plag hamincha</em>. This is calculated 1845 * as 10.75 hours after {@link #getAlos90Zmanis() dawn}. The formula used is 10.75 * {@link 1846 * #getShaahZmanis90MinutesZmanis()} after {@link #getAlos90Zmanis() dawn}. Since <em>plag</em> by this calculation can 1847 * occur after sunset, it should only be used <em>lechumra</em>. 1848 * 1849 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time (often after 1850 * <em>shkiah</em>), and if used <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no 1851 * current plan to remove this method from the API, and this deprecation is intended to alert developers 1852 * of the danger of using it. 1853 * @return the {@code Instant} of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1854 * in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where it 1855 * does not set, a {@code null} will be returned. See detailed explanation on top of the 1856 * {@link AstronomicalCalendar} documentation. 1857 */ 1858 @Deprecated (forRemoval=false) 1859 public Instant getPlagHamincha90MinutesZmanis() { 1860 return getPlagHamincha(getAlos90Zmanis(), getTzais90Zmanis(), true); 1861 } 1862 1863 /** 1864 * This method should be used <em>lechumra</em> only and returns the time of <em>plag hamincha</em>. This is calculated as 1865 * 10.75 hours after {@link #getAlos72Zmanis()}. The formula used is 10.75 * {@link #getShaahZmanis72MinutesZmanis()} after 1866 * {@link #getAlos72Zmanis() dawn}. Since <em>plag</em> by this calculation can occur after sunset, it should only be used 1867 * <em>lechumra</em>. 1868 * 1869 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time (often after 1870 * <em>shkiah</em>), and if used <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no 1871 * current plan to remove this method from the API, and this deprecation is intended to alert developers 1872 * of the danger of using it. 1873 * @return the {@code Instant} of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1874 * in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where it 1875 * does not set, a {@code null} will be returned. See detailed explanation on top of the 1876 * {@link AstronomicalCalendar} documentation. 1877 */ 1878 @Deprecated (forRemoval=false) 1879 public Instant getPlagHamincha72MinutesZmanis() { 1880 return getPlagHamincha(getAlos72Zmanis(), getTzais72Zmanis(), true); 1881 } 1882 1883 /** 1884 * This method should be used <em>lechumra</em> only and returns the time of <em>plag hamincha</em> based on the opinion that the 1885 * day starts at {@link #getAlos16Point1Degrees()} and ends at {@link #getTzais16Point1Degrees()}. This is calculated as 10.75 * 1886 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees()}. Since <em>plag</em> by this calculation can 1887 * occur after <em>shkiah</em>, it should only be used <em>lechumra</em>. 1888 * 1889 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time (often after <em>shkiah</em>), 1890 * and if used <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no current plan to remove this method 1891 * from the API, and this deprecation is intended to alert developers of the danger of using it. 1892 * @return the {@code Instant} of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1893 * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 1894 * the sun may not reach low enough below the horizon for this calculation, a {@code null} will be 1895 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1896 * @see #getShaahZmanis16Point1Degrees() 1897 */ 1898 @Deprecated (forRemoval=false) 1899 public Instant getPlagHamincha16Point1Degrees() { 1900 return getPlagHamincha(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); 1901 } 1902 1903 /** 1904 * This method should be used <em>lechumra</em> only and returns the time of <em>plag hamincha</em> based on the opinion that the 1905 * day starts at {@link #getAlos19Point8Degrees()} and ends at {@link #getTzais19Point8Degrees()}. This is calculated as 10.75 * 1906 * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}. Since <em>plag</em> by this calculation 1907 * can occur after <em>shkiah</em>, it should only be used <em>lechumra</em>. 1908 * 1909 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time (often after 1910 * <em>shkiah</em>), and if used <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no 1911 * current plan to remove this method from the API, and this deprecation is intended to alert developers 1912 * of the danger of using it. 1913 * @return the {@code Instant} of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1914 * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 1915 * the sun may not reach low enough below the horizon for this calculation, a {@code null} will be 1916 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1917 * @see #getShaahZmanis19Point8Degrees() 1918 */ 1919 @Deprecated (forRemoval=false) 1920 public Instant getPlagHamincha19Point8Degrees() { 1921 return getPlagHamincha(getAlos19Point8Degrees(), getTzais19Point8Degrees(), true); 1922 } 1923 1924 /** 1925 * This method should be used <em>lechumra</em> only and returns the time of <em>plag hamincha</em> based on the 1926 * opinion that the day starts at {@link #getAlos26Degrees()} and ends at {@link #getTzais26Degrees()}. This is calculated as 1927 * 10.75 * {@link #getShaahZmanis26Degrees()} after {@link #getAlos26Degrees()}. Since the <em>zman</em> based on an extremely 1928 * early <em>alos</em> and a very late <em>tzais</em>, it should only be used <em>lechumra</em>. 1929 * 1930 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time (often after <em>shkiah</em>), 1931 * and if used <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no current plan to remove this method 1932 * from the API, and this deprecation is intended to alert developers of the danger of using it. 1933 * @return the {@code Instant} of the time of <em>plag hamincha</em>. If the calculation can't be computed such as northern and 1934 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach low 1935 * enough below the horizon for this calculation, a {@code null} will be returned. See detailed explanation on top of the 1936 * {@link AstronomicalCalendar} documentation. 1937 * @see #getShaahZmanis26Degrees() 1938 * @see #getPlagHamincha120Minutes() 1939 */ 1940 @Deprecated (forRemoval=false) 1941 public Instant getPlagHamincha26Degrees() { 1942 return getPlagHamincha(getAlos26Degrees(), getTzais26Degrees(), true); 1943 } 1944 1945 /** 1946 * This method should be used <em>lechumra</em> only and returns the time of <em>plag hamincha</em> based on the opinion that the 1947 * day starts at {@link #getAlos18Degrees()} and ends at {@link #getTzais18Degrees()}. This is calculated as 10.75* {@link 1948 * #getShaahZmanis18Degrees()} after {@link #getAlos18Degrees()}. Since <em>plag</em> by this calculation can occur after sunset, 1949 * it should only be used <em>lechumra</em>. 1950 * 1951 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time (often after 1952 * <em>shkiah</em>), and if used <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no 1953 * current plan to remove this method from the API, and this deprecation is intended to alert developers 1954 * of the danger of using it. 1955 * @return the {@code Instant} of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1956 * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 1957 * the sun may not reach low enough below the horizon for this calculation, a {@code null} will be 1958 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1959 * @see #getShaahZmanis18Degrees() 1960 */ 1961 @Deprecated (forRemoval=false) 1962 public Instant getPlagHamincha18Degrees() { 1963 return getPlagHamincha(getAlos18Degrees(), getTzais18Degrees(), true); 1964 } 1965 1966 /** 1967 * This method should be used <em>lechumra</em> only and returns the time of <em>plag hamincha</em> based on the opinion that the 1968 * day starts at {@link #getAlos16Point1Degrees()} and ends at {@link #getSunsetBasedOnElevationSetting}. This time is 10.75 * 1969 * <em>shaos zmaniyos</em> after {@link #getAlos16Point1Degrees()}. Since <em>plag</em> by this calculation can occur after 1970 * <em>shkiah</em>, it should only be used <em>lechumra</em>. 1971 * 1972 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time (often after <em>shkiah</em>), 1973 * and if used <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no current plan to remove this method 1974 * from the API, and this deprecation is intended to alert developers of the danger of using it. 1975 * @return the {@code Instant} of the <em>plag</em>. If the calculation can't be computed such as northern and southern locations 1976 * even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach low enough below the 1977 * horizon for this calculation, a {@code null} will be returned. See detailed explanation on top of the 1978 * {@link AstronomicalCalendar} documentation. 1979 * @see #getAlos16Point1Degrees() 1980 * @see #getSeaLevelSunset() 1981 */ 1982 @Deprecated (forRemoval=false) 1983 public Instant getPlagAlosToSunset() { 1984 return getPlagHamincha(getAlos16Point1Degrees(), getSunsetBasedOnElevationSetting(), false); 1985 } 1986 1987 /** 1988 * This method returns the time of <em>plag hamincha</em> based on the opinion that the day starts at {@link 1989 * #getAlos16Point1Degrees()} and ends at {@link #getTzaisGeonim7Point083Degrees()}. The time is 10.75 * {@link 1990 * #getShaahZmanisAlos16Point1DegreesToTzaisGeonim7Point083Degrees()} after {@link #getAlos16Point1Degrees()} to reach this time. 1991 * Sources for an asymmetrical day-based calculation can be seen in the documentation of 1992 * {@link #getSofZmanShmaAlos16Point1DegreesToTzaisGeonim7Point083Degrees}. 1993 * 1994 * @return the {@code Instant} of the <em>plag</em>. If the calculation can't be computed such as northern and southern locations 1995 * even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach low enough below the 1996 * horizon for this calculation, a {@code null} will be returned. See detailed explanation on top of the {@link 1997 * AstronomicalCalendar} documentation. 1998 * @see #getAlos16Point1Degrees() 1999 * @see #getTzaisGeonim7Point083Degrees() 2000 * @see #getSofZmanShmaAlos16Point1DegreesToTzaisGeonim7Point083Degrees() 2001 */ 2002 public Instant getPlagAlos16Point1DegreesToTzaisGeonim7Point083Degrees() { 2003 return getPlagHamincha(getAlos16Point1Degrees(), getTzaisGeonim7Point083Degrees(), false); 2004 } 2005 2006 /** 2007 * This method returns the time of <em>plag hamincha</em> (the earliest time that Shabbos can be started) based on the opinion of 2008 * <a href="https://en.wikipedia.org/wiki/Yaakov_Moshe_Hillel">Rabbi Yaakov Moshe Hillel</a> as published in the <em>luach</em> 2009 * of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that that <em>plag hamincha</em> is calculated as 1.25 * {@link 2010 * #getShaahZmanisAlos16Point1DegreesToTzaisGeonim3Point8Degrees} before {@link #getTzaisGeonim3Point8Degrees()}. Sources for an 2011 * asymmetrical day-based calculation can be seen in the documentation of 2012 * {@link #getSofZmanShmaAlos16Point1DegreesToTzaisGeonim7Point083Degrees}. 2013 * 2014 * @return the {@code Instant} of the <em>plag</em>. If the calculation can't be computed such as northern and 2015 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not 2016 * reach low enough below the horizon for this calculation, a {@code null} will be returned. See detailed 2017 * explanation on top of the {@link AstronomicalCalendar} documentation. 2018 * @see #getShaahZmanisAlos16Point1DegreesToTzaisGeonim3Point8Degrees() 2019 * @see #getMinchaGedolaAhavatShalom() 2020 * @see #getMinchaKetanaAhavatShalom() 2021 */ 2022 public Instant getPlagAhavatShalom() { 2023 Duration shaahZmanis = getShaahZmanisAlos16Point1DegreesToTzaisGeonim3Point8Degrees(); 2024 if(shaahZmanis == null) { 2025 return null; 2026 } 2027 long totalNanos = (long) (-shaahZmanis.toNanos() * 1.25); 2028 return getTimeOffset(getTzaisGeonim3Point8Degrees(), Duration.ofNanos(totalNanos)); 2029 } 2030 2031 /** 2032 * Method to return the beginning of <em>bain hashmashos</em> of Rabbeinu Tam calculated when the sun is 2033 * {@link #ZENITH_13_POINT_24 13.24°} below the western {@link AstronomicalCalendar#GEOMETRIC_ZENITH geometric horizon} (90°) 2034 * after sunset. This calculation is based on the same calculation of {@link #getBainHashmashosRT58Point5Minutes() 2035 * <em>bain hashmashos</em> Rabbeinu Tam 58.5 minutes} but uses a degree-based calculation instead of 58.5 exact 2036 * minutes. This calculation is based on the position of the sun 58.5 minutes after sunset in Jerusalem <a href= 2037 * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a>, 2038 * which calculates to 13.24° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH}. 2039 * NOTE: As per Yisrael Vehazmanim Vol. III page 1025, No. 50, a dip of slightly less than 13° should be used. 2040 * Calculations show that the proper dip to be 13.2456° (truncated to 13.24° that provides about 1.5 second 2041 * earlier (<em>lechumra</em>) time) below the horizon at that time. This makes a difference of 1 minute and 10 2042 * seconds in Jerusalem during the Equinox, and 1 minute 29 seconds during the solstice as compared to the proper 2043 * 13.24° versus 13°. For NY during the solstice, the difference is 1 minute 56 seconds. 2044 * 2045 * @todo recalculate the above based on equilux/equinox calculations. 2046 * @return the {@code Instant} of the sun being 13.24° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} 2047 * (90°). If the calculation can't be computed such as northern and southern locations even south of the 2048 * Arctic Circle and north of the Antarctic Circle where the sun may not reach low enough below the horizon 2049 * for this calculation, a {@code null} will be returned. See detailed explanation on top of the 2050 * {@link AstronomicalCalendar} documentation. 2051 * @see #getBainHashmashosRT58Point5Minutes() 2052 */ 2053 public Instant getBainHashmashosRT13Point24Degrees() { 2054 return getSunsetOffsetByDegrees(ZENITH_13_POINT_24); 2055 } 2056 2057 /** 2058 * This method returns the beginning of <em>Bain hashmashos</em> of Rabbeinu Tam calculated as a 58.5-minute offset after sunset. 2059 * <em>bain hashmashos</em> is 3/4 of a <a href="https://en.wikipedia.org/wiki/Biblical_mile">mil</a> before <em>tzais</em> or 3 2060 * 1/4 mil after sunset. With a mil calculated as 18 minutes, 3.25 * 18 = 58.5 minutes. 2061 * 2062 * @return the {@code Instant} of 58.5 minutes after sunset. If the calculation can't be computed such as in the 2063 * Arctic Circle where there is at least one day a year when the sun does not rise, and one where it does 2064 * not set, a {@code null} will be returned. See detailed explanation on top of the 2065 * {@link AstronomicalCalendar} documentation. 2066 * 2067 */ 2068 public Instant getBainHashmashosRT58Point5Minutes() { 2069 long totalNanos = (long) (58.5 * MINUTE_NANOS); 2070 return getTimeOffset(getSunsetBasedOnElevationSetting(), Duration.ofNanos(totalNanos)); 2071 } 2072 2073 /** 2074 * This method returns the beginning of <em>bain hashmashos</em> based on the calculation of 13.5 minutes (3/4 of an 18-minute 2075 * <a href="https://en.wikipedia.org/wiki/Biblical_mile">mil</a>) before <em>shkiah</em> calculated as 2076 * {@link #getTzaisGeonim7Point083Degrees()}. 2077 * 2078 * @return the {@code Instant} of the <em>bain hashmashos</em> of Rabbeinu Tam in this calculation. If the calculation can't be 2079 * computed such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 2080 * the sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned. See detailed 2081 * explanation on top of the {@link AstronomicalCalendar} documentation. 2082 * @see #getTzaisGeonim7Point083Degrees() 2083 */ 2084 public Instant getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() { 2085 long totalNanos = (long) (-13.5 * MINUTE_NANOS); 2086 return getTimeOffset(getTzaisGeonim7Point083Degrees(), Duration.ofNanos(totalNanos)); 2087 } 2088 2089 /** 2090 * This method returns the beginning of <em>bain hashmashos</em> of Rabbeinu Tam calculated according to the 2091 * opinion of the <em>Divrei Yosef</em> (see Yisrael Vehazmanim) calculated 5/18th (27.77%) of the time between 2092 * <em>alos</em> (calculated as 19.8° before sunrise) and sunrise. This is added to sunset to arrive at the time 2093 * for <em>bain hashmashos</em> of Rabbeinu Tam. 2094 * 2095 * @return the {@code Instant} of <em>bain hashmashos</em> of Rabbeinu Tam for this calculation. If the calculation can't be 2096 * computed such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 2097 * the sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned. See detailed 2098 * explanation on top of the {@link AstronomicalCalendar} documentation. 2099 */ 2100 public Instant getBainHashmashosRT2Stars() { 2101 Instant alos19Point8 = getAlos19Point8Degrees(); 2102 Instant sunrise = getSunriseBasedOnElevationSetting(); 2103 if (alos19Point8 == null || sunrise == null) { 2104 return null; 2105 } 2106 Duration alosToSunrise = Duration.between(alos19Point8, sunrise); 2107 long totalNanos = (long) (alosToSunrise.toNanos() * (5 / 18d)); 2108 return getTimeOffset(getSunsetBasedOnElevationSetting(), Duration.ofNanos(totalNanos)); 2109 } 2110 2111 /** 2112 * This method returns the beginning of <em>bain hashmashos</em> (twilight) according to the <a href= 2113 * "https://en.wikipedia.org/wiki/Eliezer_ben_Samuel">Yereim (Rabbi Eliezer of Metz)</a> calculated as 18 minutes or 3/4 of a 2114 * 24-minute <a href="https://en.wikipedia.org/wiki/Biblical_mile">mil</a> before sunset. According to the Yereim, <em>bain 2115 * hashmashos</em> starts 3/4 of a mil before sunset and <em>tzais</em> or nightfall starts at sunset. 2116 * 2117 * @return the {@code Instant} of 18 minutes before sunset. If the calculation can't be computed such as in the 2118 * Arctic Circle where there is at least one day a year when the sun does not rise, and one where it does 2119 * not set, a {@code null} will be returned. See detailed explanation on top of the 2120 * {@link AstronomicalCalendar} documentation. 2121 * @see #getBainHashmashosYereim3Point05Degrees() 2122 */ 2123 public Instant getBainHashmashosYereim18Minutes() { 2124 return getTimeOffset(getSunsetBasedOnElevationSetting(), Duration.ofMinutes(-18)); 2125 } 2126 2127 /** 2128 * This method returns the beginning of <em>bain hashmashos</em> (twilight) according to the <a href= 2129 * "https://en.wikipedia.org/wiki/Eliezer_ben_Samuel">Yereim (Rabbi Eliezer of Metz)</a> calculated as the sun's 2130 * position 3.05° above the horizon <a href= 2131 * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a>, 2132 * its position 18 minutes or 3/4 of an 24-minute <a href="https://en.wikipedia.org/wiki/Biblical_mile">mil</a> before sunset. 2133 * According to the Yereim, <em>bain hashmashos</em> starts 3/4 of a mil before sunset and <em>tzais</em> or nightfall starts at 2134 * sunset. Note that <em>lechumra</em> (of about 14 seconds) a refraction value of 0.5166° as opposed to the traditional 0.566° 2135 * is used. This is more inline with the actual refraction in <em>Eretz Yisrael</em> and is brought down by <a href= 2136 * "http://beinenu.com/rabbis/%D7%94%D7%A8%D7%91-%D7%99%D7%93%D7%99%D7%93%D7%99%D7%94-%D7%9E%D7%A0%D7%AA">Rabbi Yedidya Manet</a> 2137 * in his <a href="https://www.nli.org.il/en/books/NNL_ALEPH002542826/NLI">Zmanei HaHalacha Lema'aseh</a> (p. 11). That is the 2138 * first source that I am aware of that calculates degree-based Yereim <em>zmanim</em>. The 0.5166° refraction is also used by 2139 * the <a href="https://zmanim.online/">Luach Itim Lebinah</a>. Calculating the Yereim's <em>bain hashmashos</em> using 18-minute 2140 * based degrees is also suggested in the upcoming 8th edition of the zmanim Kehilchasam. For more details, see the article 2141 * <a href="https://kosherjava.com/2020/12/07/the-yereims-bein-hashmashos/">The Yereim's <em>Bain Hashmashos</em></a>. 2142 * 2143 * @todo recalculate based on equinox/equilux 2144 * @return the {@code Instant} of the sun's position 3.05° minutes before sunset. If the calculation can't 2145 * be computed such as in the Arctic Circle where there is at least one day a year when the sun does not 2146 * rise, and one where it does not set, a {@code null} will be returned. See detailed explanation on 2147 * top of the {@link AstronomicalCalendar} documentation. 2148 * @see #ZENITH_MINUS_3_POINT_05 2149 * @see #getBainHashmashosYereim18Minutes() 2150 * @see #getBainHashmashosYereim2Point8Degrees() 2151 * @see #getBainHashmashosYereim2Point1Degrees() 2152 */ 2153 public Instant getBainHashmashosYereim3Point05Degrees() { 2154 return getSunsetOffsetByDegrees(ZENITH_MINUS_3_POINT_05); 2155 } 2156 2157 /** 2158 * This method returns the beginning of <em>bain hashmashos</em> (twilight) according to the <a href= 2159 * "https://en.wikipedia.org/wiki/Eliezer_ben_Samuel">Yereim (Rabbi Eliezer of Metz)</a> calculated as 16.875 minutes or 3/4 of a 2160 * 22.5-minute <a href="https://en.wikipedia.org/wiki/Biblical_milet">mil</a> before sunset. According to the Yereim, <em>bain 2161 * hashmashos</em> starts 3/4 of a mil before sunset and <em>tzais</em> or nightfall starts at sunset. 2162 * 2163 * @return the {@code Instant} of 16.875 minutes before sunset. If the calculation can't be computed such as in the 2164 * Arctic Circle where there is at least one day a year when the sun does not rise, and one where it does 2165 * not set, a {@code null} will be returned. See detailed explanation on top of the 2166 * {@link AstronomicalCalendar} documentation. 2167 * @see #getBainHashmashosYereim2Point8Degrees() 2168 */ 2169 public Instant getBainHashmashosYereim16Point875Minutes() { 2170 long totalNanos = (long) (-16.875 * MINUTE_NANOS); 2171 return getTimeOffset(getSunsetBasedOnElevationSetting(), Duration.ofNanos(totalNanos)); 2172 } 2173 2174 /** 2175 * This method returns the beginning of <em>bain hashmashos</em> (twilight) according to the <a href= 2176 * "https://en.wikipedia.org/wiki/Eliezer_ben_Samuel">Yereim (Rabbi Eliezer of Metz)</a> calculated as the sun's position 2.8° 2177 * above the horizon <a href="https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / 2178 * equilux</a>, its position 16.875 minutes or 3/4 of an 22.5-minute <a href="https://en.wikipedia.org/wiki/Biblical_mile" 2179 * >mil</a> before sunset. According to the Yereim, <em>bain hashmashos</em> starts 3/4 of a mil before sunset and <em>tzais</em> 2180 * or nightfall starts at sunset. Details, including how the degrees were calculated can be seen in the documentation of 2181 * {@link #getBainHashmashosYereim3Point05Degrees()}. 2182 * 2183 * @return the {@code Instant} of the sun's position 2.8° minutes before sunset. If the calculation can't 2184 * be computed such as in the Arctic Circle where there is at least one day a year when the sun does not 2185 * rise, and one where it does not set, a {@code null} will be returned. See detailed explanation on 2186 * top of the {@link AstronomicalCalendar} documentation. 2187 * @see #ZENITH_MINUS_2_POINT_8 2188 * @see #getBainHashmashosYereim16Point875Minutes() 2189 * @see #getBainHashmashosYereim3Point05Degrees() 2190 * @see #getBainHashmashosYereim2Point1Degrees() 2191 */ 2192 public Instant getBainHashmashosYereim2Point8Degrees() { 2193 return getSunsetOffsetByDegrees(ZENITH_MINUS_2_POINT_8); 2194 } 2195 2196 /** 2197 * This method returns the beginning of <em>bain hashmashos</em> (twilight) according to the <a href= 2198 * "https://en.wikipedia.org/wiki/Eliezer_ben_Samuel">Yereim (Rabbi Eliezer of Metz)</a> calculated as 13.5 minutes or 3/4 of 2199 * an 18-minute <a href="https://en.wikipedia.org/wiki/Biblical_mile">mil</a> before sunset. According to the Yereim, <em>bain 2200 * hashmashos</em> starts 3/4 of a mil before sunset and <em>tzais</em> or nightfall starts at sunset. 2201 * 2202 * @return the {@code Instant} of 13.5 minutes before sunset. If the calculation can't be computed such as in the 2203 * Arctic Circle where there is at least one day a year when the sun does not rise, and one where it does 2204 * not set, a {@code null} will be returned. See detailed explanation on top of the 2205 * {@link AstronomicalCalendar} documentation. 2206 * @see #getBainHashmashosYereim2Point1Degrees() 2207 */ 2208 public Instant getBainHashmashosYereim13Point5Minutes() { 2209 long totalNanos = (long) (-13.5 * MINUTE_NANOS); 2210 return getTimeOffset(getSunsetBasedOnElevationSetting(), Duration.ofNanos(totalNanos)); 2211 } 2212 2213 /** 2214 * This method returns the beginning of <em>bain hashmashos</em> according to the <a href= 2215 * "https://en.wikipedia.org/wiki/Eliezer_ben_Samuel">Yereim (Rabbi Eliezer of Metz)</a> calculated as the sun's position 2.1° 2216 * <b>above</b> the horizon <a href="https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the 2217 * equinox / equilux</a> in Yerushalayim, its position 13.5 minutes or 3/4 of an 18-minute <a href= 2218 * "https://en.wikipedia.org/wiki/Biblical_mile">mil</a> before sunset. According to the Yereim, <em>bain hashmashos</em> starts 2219 * 3/4 of a mil before sunset and <em>tzais</em> or nightfall starts at sunset. Details, including how the degrees were 2220 * calculated can be seen in the documentation of {@link #getBainHashmashosYereim3Point05Degrees()}. 2221 * 2222 * @return the {@code Instant} of the sun's position 2.1° minutes before sunset. If the calculation can't be computed such as i 2223 * the Arctic Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 2224 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 2225 * @see #ZENITH_MINUS_2_POINT_1 2226 * @see #getBainHashmashosYereim13Point5Minutes() 2227 * @see #getBainHashmashosYereim2Point8Degrees() 2228 * @see #getBainHashmashosYereim3Point05Degrees() 2229 */ 2230 public Instant getBainHashmashosYereim2Point1Degrees() { 2231 return getSunsetOffsetByDegrees(ZENITH_MINUS_2_POINT_1); 2232 } 2233 2234 /** 2235 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated at the sun's position 2236 * at {@link #ZENITH_3_POINT_7 3.7°} below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°), calculated as the position of the 2237 * sun 13.5 minutes after sunset, the time it takes to walk 3/4 of a <a href="https://en.wikipedia.org/wiki/Biblical_mile">mil</a> 2238 * at 18 minutes a mil, or 13.5 minutes after sunset. The sun is 3.7° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} at this 2239 * time in Jerusalem <a href="https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / 2240 * equilux</a>. This does not cover the 26.46 it takes to walk 49 amos (the <em>heref ayin</em> of <em>bain hashmashos</em> of 2241 * Rav Yosi) at the pace of an 18-minute mil. Rabbi Yedidya Manet in his <a href= 2242 * "https://www.nli.org.il/en/books/NNL_ALEPH002542826/NLI">Zmanei HaHalacha Lema'aseh</a> (5th edition, vol. I page 36, no. 22) 2243 * lists 3.65° as the value for this <em>tzais</em>, however it is based on sunset calculated using a refreaction value of 31′ 2244 * (arcminutes) or 0.516° (page 16) based on his calculations of the refraction value in Israel at the autumn equinox (something 2245 * he himself questions in vol II, page 36). Even for Israel, most consider that refraction value too low. Regardless, the dip for 2246 * <em>tzais</em> must be based on sunset using a specific refraction model (and solar radius), and this library currently uses a 2247 * global average refraction value of 34′ (arcminutes) or 0.566°. Based on the global average refraction for sunset, this 2248 * <em>tzais</em> calculates as 3.7°. 2249 * 2250 * @return the {@code Instant} representing the time when the sun is 3.7° below sea level. 2251 * @deprecated This method should be used <em>lechumra</em> only since it returns a very early time, and if used <em>lekula</em> 2252 * can result in <em>chillul Shabbos</em> etc. There is no current plan to remove this method from the API, and this 2253 * deprecation is intended to alert developers of the danger of using it. 2254 * @see #ZENITH_3_POINT_7 2255 */ 2256 @Deprecated (forRemoval=false) 2257 public Instant getTzaisGeonim3Point7Degrees() { 2258 return getSunsetOffsetByDegrees(ZENITH_3_POINT_7); 2259 } 2260 2261 /** 2262 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated at the sun's position 2263 * at {@link #ZENITH_3_POINT_7 3.8°} below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°), calculated as the position of the 2264 * sun 13.5 minutes after sunset, the time it takes to walk 3/4 of a <a href="https://en.wikipedia.org/wiki/Biblical_mile">mil</a> 2265 * at 18 minutes a mil, plus 30 seconds for the time it takes to walk 49 amos (the <em>heref ayin</em> of <em>bain hashmashos</em> 2266 * of Rav Yosi). With this being an 18-minutes mil, 49 amos would take 26.46, rounded to 30 seconds), for a total of 14 minutes 2267 * after sunset. The sun is {@link #ZENITH_3_POINT_8 3.8°} below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} at this time in 2268 * Jerusalem <a href="https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a>. 2269 * 2270 * @return the {@code Instant} representing the time when the sun is 3.8° below sea level. 2271 * @deprecated This method should be used <em>lechumra</em> only since it returns a very early time, and if used <em>lekula</em> 2272 * can result in <em>chillul Shabbos</em> etc. There is no current plan to remove this method from the API, and this 2273 * deprecation is intended to alert developers of the danger of using it. 2274 * @see #ZENITH_3_POINT_8 2275 */ 2276 @Deprecated (forRemoval=false) 2277 public Instant getTzaisGeonim3Point8Degrees() { 2278 return getSunsetOffsetByDegrees(ZENITH_3_POINT_8); 2279 } 2280 2281 /** 2282 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated at the sun's 2283 * position at {@link #ZENITH_5_POINT_95 5.95°} below {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90°), calculated as the 2284 * position of the sun 24 minutes after sunset in Jerusalem <a href= 2285 * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a>. The 24 minutes 2286 * is based on the Baal Hatanya's calculation of 18 minutes (3/4 of a 24 minute mil) + 4 minutes for <em>shkiah amitis</em> + 2287 * 2 minutes for bain hashmashos of Rav Yosi. See Hazmanim Bahalacha vol II, ch. 50, no. 5, p. 512-513, ch. 47, and Yisrael 2288 * Vehazmanim <a href="https://hebrewbooks.org/pdfpager.aspx?req=9764&st=&pgnum=266">Vol III, ch. 13, no. 53, p. 1026</a>. Among 2289 * sources he mentions for this <em>zman</em> is <a href="https://en.wikipedia.org/wiki/Yehuda_(Leo)_Levi">Rabbi Yehuda (Leo) 2290 * Levi's</a> calculations in Jewish Chrononomy and other sources. Calculations show that the time is closer to 5.93° and was 2291 * seemingly rounded to 5.95°. Chabad calendars usually use the 6°-based {@link #getTzaisBaalHatanya()} that is built on this 2292 * same calculation. Rabbi Yedidya Manet in his <a href="https://www.nli.org.il/en/books/NNL_ALEPH002542826/NLI">Zmanei HaHalacha 2293 * Lema'aseh</a> (5th edition, vol. I page 36, no. 24) lists 5.88° as the value for this <em>tzais</em>, however it is based on 2294 * sunset calculated using a refreaction value of 31′ (arcminutes) or 0.516° (page 16) based on his calculations of the refraction 2295 * value in Israel at the autumn equinox (something he himself questions in vol II, page 36). Even for Israel, most consider that 2296 * refraction value too low. Regardless, the dip for <em>tzais</em> must be based on sunset using a specific refraction model 2297 * (and solar radius), and this library currently uses a global average refraction value of 34′ (arcminutes) or 0.566°. Based on 2298 * the global average refraction for sunset, this <em>tzais</em> calculates as 5.93° (rounded by most calendars to 5.95°). 2299 * 2300 * @return the {@code Instant} representing the time when the sun is 5.95° below sea level. If the calculation can't be computed 2301 * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun 2302 * may not reach low enough below the horizon for this calculation, a {@code null} will be returned. See detailed 2303 * explanation on top of the {@link AstronomicalCalendar} documentation. 2304 * @see #getTzaisBaalHatanya() 2305 */ 2306 public Instant getTzaisGeonim5Point95Degrees() { 2307 return getSunsetOffsetByDegrees(ZENITH_5_POINT_95); 2308 } 2309 2310 /** 2311 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 3/4 of a <a href= 2312 * "https://en.wikipedia.org/wiki/Biblical_mile">mil</a> based on a 24-minute mil, or 18 minutes. It is the sun's position at 2313 * {@link #ZENITH_4_POINT_66 4.66°} below the western horizon. This is a very early <em>zman</em> and should not be relied on 2314 * without Rabbinical guidance. This does not cover the 35.28 seconds it takes to walk 49 amos (the <em>heref ayin</em> of 2315 * <em>bain hashmashos</em> of Rav Yosi) at the pace of a 24-minute mil. See {@link #getTzaisGeonim4Point8Degrees()} for a time 2316 * that covers the <em>heref ayin</em>. Rabbi Yedidya Manet in his <a href= 2317 * "https://www.nli.org.il/en/books/NNL_ALEPH002542826/NLI">Zmanei HaHalacha Lema'aseh</a> (5th edition, vol. I page 36, no. 24) 2318 * lists 4.61° as the value for this <em>tzais</em>, however it is based on sunset calculated using a refreaction value of 31′ 2319 * (arcminutes) or 0.516° (page 16) based on his calculations of the refraction value in Israel at the autumn equinox (something 2320 * he himself questions in vol II, page 36). Even for Israel, most consider that refraction value too low. Regardless, the dip for 2321 * <em>tzais</em> must be based on sunset using a specific refraction model (and solar radius), and this library currently uses a 2322 * global average refraction value of 34′ (arcminutes) or 0.566°. Based on the global average refraction for sunset, this 2323 * <em>tzais</em> calculates as 4.66°. 2324 * 2325 * @return the {@code Instant} representing the time when the sun is 4.66° below sea level. If the calculation can't be computed 2326 * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the 2327 * sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned. See detailed 2328 * explanation on top of the {@link AstronomicalCalendar} documentation. 2329 * @deprecated This method should be used <em>lechumra</em> only since it returns a very early time, and if used <em>lekula</em> 2330 * can result in <em>chillul Shabbos</em> etc. There is no current plan to remove this method from the API, and this 2331 * deprecation is intended to alert developers of the danger of using it. 2332 * @see #ZENITH_4_POINT_66 2333 * @see #getTzaisGeonim4Point8Degrees() 2334 */ 2335 @Deprecated (forRemoval=false) 2336 public Instant getTzaisGeonim4Point66Degrees() { 2337 return getSunsetOffsetByDegrees(ZENITH_4_POINT_66); 2338 } 2339 2340 /** 2341 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 3/4 of a <a href= 2342 * "https://en.wikipedia.org/wiki/Biblical_mile">mil</a>, based on a 22.5-minute mil, or 16.875 minutes. It is the sun's position 2343 * at {@link #ZENITH_4_POINT_42 4.42°} below the western horizon. This is a very early <em>zman</em> and should not be relied on 2344 * without Rabbinical guidance. This does not cover the 33.07 seconds it takes to walk 49 amos (the <em>heref ayin</em> of 2345 * <em>bain hashmashos</em> of Rav Yosi) at the pace of a 22.5 minute-mil. Rabbi Yedidya Manet in his <a href= 2346 * "https://www.nli.org.il/en/books/NNL_ALEPH002542826/NLI">Zmanei HaHalacha Lema'aseh</a> (5th edition, vol. I page 36, no. 23) 2347 * lists 4.37° as the value for this <em>tzais</em>, however it is based on sunset calculated using a refreaction value of 31′ 2348 * (arcminutes) or 0.516° (page 16) based on his calculations of the refraction value in Israel at the autumn equinox (something 2349 * he himself questions in vol II, page 36). Even for Israel, most consider that refraction value too low. Regardless, the dip for 2350 * <em>tzais</em> must be based on sunset using a specific refraction model (and solar radius), and this library currently uses a 2351 * global average refraction value of 34′ (arcminutes) or 0.566°. Based on the global average refraction for sunset, this 2352 * <em>tzais</em> calculates as 4.42°. 2353 * 2354 * @return the {@code Instant} representing the time when the sun is 4.42° below sea level. If the calculation 2355 * can't be computed such as northern and southern locations even south of the Arctic Circle and north of 2356 * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a 2357 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2358 * documentation. 2359 * @deprecated This method should be used <em>lechumra</em> only since it returns a very early time, and if used <em>lekula</em> 2360 * can result in <em>chillul Shabbos</em> etc. There is no current plan to remove this method from the API, and this 2361 * deprecation is intended to alert developers of the danger of using it. 2362 * @see #ZENITH_4_POINT_42 2363 */ 2364 @Deprecated (forRemoval=false) 2365 public Instant getTzaisGeonim4Point42Degrees() { 2366 return getSunsetOffsetByDegrees(ZENITH_4_POINT_42); 2367 } 2368 2369 /** 2370 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as the sun's 2371 * position below the horizon at a time of 18.6 minutes after sunset. This is calculated as 3/4 of a 24-minute <a href= 2372 * "https://en.wikipedia.org/wiki/Biblical_mile">mil</a>, plus 0.6 minutes for the time to walk 49 amos for <em>bain 2373 * hashmashos</em> of Rav Yosi (with this <em>zman</em> based on a 24-minute mil, 49 amos would take 35.28 seconds to walk), for 2374 * a total of 18.6 minutes after sunset. This calculates to the sun's position at {@link #ZENITH_4_POINT_8 4.8°} below the 2375 * western horizon. This is based on <a href= 2376 * "https://he.wikipedia.org/wiki/%D7%99%D7%97%D7%99%D7%90%D7%9C_%D7%9E%D7%99%D7%9B%D7%9C_%D7%A9%D7%9C%D7%96%D7%99%D7%A0%D7%92%D7%A8" 2377 * >Rav Yechiel Michel Shlezinger's</a> <em>sefer</em> <a href="https://www.nli.org.il/he/books/NNL_ALEPH997010042055805171/NLI" 2378 * >Aizehu Bain Hashmashos</a>, <a href="https://en.wikipedia.org/wiki/Yehuda_(Leo)_Levi">Rabbi Yehuda (Leo) Levi's</a> 2379 * calculations in <a href="https://www.nli.org.il/en/items/NNL_ALEPH990022548970205171/NLI">Zmanei Hayom BaHalacha</a> p. 37. 2380 * At this point, 3 medium sized stars are visible to a non-expert with good vision with effort. An expert knowing where to 2381 * look can see the 3 medium stars as early as 15 minutes after sunset. This is explained in detail in Hazmanim Bahalacha vol 2382 * II, ch. 41, no. 6 (p. 372-373, ch. 47, no. 11-12 (p. 491-493) where it is clear that medium sized stars would be visible as 2383 * early as 14 minutes after sunset (13.5 minutes for 3/4 of an 18 minute Mil, plus 0.5 minutes for <em>bain Hashmashos</em> 2384 * of Rav Yosi) to an expert. See more details on this earlier <em>zman</em> at {@link #getTzaisGeonim3Point8Degrees()}. 2385 * This is an early <em>zman</em> for <em>tzais</em>and should not be relied on without Rabbinical guidance. 2386 * 2387 * @return the {@code Instant} representing the time when the sun is 4.8° below sea level. If the calculation can't be computed 2388 * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the 2389 * sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned. See detailed 2390 * explanation on top of the {@link AstronomicalCalendar} documentation. 2391 * @see #ZENITH_4_POINT_8 2392 */ 2393 public Instant getTzaisGeonim4Point8Degrees() { 2394 return getSunsetOffsetByDegrees(ZENITH_4_POINT_8); 2395 } 2396 2397 /** 2398 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> as calculated by <a href= 2399 * "https://en.wikipedia.org/wiki/Yechiel_Michel_Tucazinsky">Rabbi Yechiel Michel Tucazinsky</a> as the position of 2400 * the sun no later than 31 minutes after sea-level sunset in Jerusalem (the Birur halacha shows that Rav Tucazinsky's 2401 * calculations for sunset, listed as 28 minutes in this case, were about 3 minutes later than reality), and at the height of 2402 * the summer solstice, this <em>zman</em>, calculations show that 30.75 minutes after <em>shkiah</em> computes to 6.45° below 2403 * {@link AstronomicalCalendar#GEOMETRIC_ZENITH}. This calculation is found in the <a href= 2404 * "https://hebrewbooks.org/pdfpager.aspx?req=50536&st=&pgnum=51">Birur Halacha Yoreh Deah 262</a> and it is the commonly used 2405 * <em>zman</em> in Israel. It is also used in the <a href="https://www.worldcat.org/oclc/243303103">Luach Itim Lebinah</a>. it 2406 * should be noted that this differs from the 6.1° / 6.2° calculation for Rabbi Tucazinsky's time as calculated by the 2407 * Hazmanim Bahalacha Vol II chapter 50:7 (page 515). Calculations show that 6.45° at the equinox is 26.5 minutes after 2408 * <em>shkiah</em> <a href="https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / 2409 * equilux</a>. 2410 * 2411 * @return the {@code Instant} representing the time when the sun is 6.45° below sea level. If the 2412 * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and 2413 * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this 2414 * calculation, a {@code null} will be returned. See detailed explanation on top of the 2415 * {@link AstronomicalCalendar} documentation. 2416 * @see #ZENITH_6_POINT_45 2417 */ 2418 public Instant getTzaisGeonim6Point45Degrees() { 2419 return getSunsetOffsetByDegrees(ZENITH_6_POINT_45); 2420 } 2421 2422 /** 2423 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated when the sun's 2424 * position {@link #ZENITH_7_POINT_083 7.083° (or 7° 5′}) below the western horizon. This is often referred to as 7° 5′ or 7° and 2425 * 5′ minutes. This calculation is based on the observation of 3 medium-sized stars by Dr. Baruch (Berthold) Cohn in his 2426 * <em>luach</em> <a href="https://sammlungen.ub.uni-frankfurt.de/freimann/content/titleinfo/983088">Tabellen enthaltend die 2427 * Zeitangaben für den Beginn der Nacht und des Tages für die Breitengrade + 66 bis -38</a> published in Strasbourg, France in 2428 * 1899. This calendar was very popular in Europe, and many other calendars based their <em>tzais</em> time on it. <a href= 2429 * "https://en.wikipedia.org/wiki/David_Zvi_Hoffmann">Rav Dovid Tzvi Hoffman</a> in his <a href="https://hebrewbooks.org/1053" 2430 * >שו״ת מלמד להועיל</a> in an exchange of letters with Baruch Cohn in <a href= 2431 * "https://hebrewbooks.org/pdfpager.aspx?req=1053&st=&pgnum=37">Orach Chaim 30</a> agreed to this <em>zman</em> (page 36), as 2432 * did the שו״ת בני ציון and the <a href="https://hebrewbooks.org/67373">תנובת שדה</a>. It is very close to the time of the <a href= 2433 * "https://hebrewbooks.org/22044">מקור חסד</a> of the Sefer chasidim. It is close to the position of the sun 30 minutes after 2434 * sunset in Jerusalem <a href="https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / 2435 * equilux</a>, but not Exactly. The actual position of the sun 30 minutes after sunset in Jerusalem at the equilux is 7.205° 2436 * and 7.199° at the equinox. See Hazmanim Bahalacha vol 2, pages 520-521 for more details. 2437 * 2438 * @return the {@code Instant} representing the time when the sun is 7.083° below sea level. If the calculation can't be 2439 * computed such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 2440 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned. 2441 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 2442 * @see #ZENITH_7_POINT_083 2443 */ 2444 public Instant getTzaisGeonim7Point083Degrees() { 2445 return getSunsetOffsetByDegrees(ZENITH_7_POINT_083); 2446 } 2447 2448 /** 2449 * This method returns <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 45 minutes 2450 * after sunset during the summer solstice in New York, when the <em>neshef</em> (twilight) is the longest. The sun's 2451 * position at this time computes to {@link #ZENITH_7_POINT_67 7.67°} below the western horizon. See <a href= 2452 * "https://hebrewbooks.org/pdfpager.aspx?req=921&pgnum=149">Igros Moshe Even Haezer 4, Ch. 4</a> (regarding 2453 * <em>tzais</em> for <em>krias Shema</em>). It is also mentioned in Rabbi Heber's <a href= 2454 * "https://hebrewbooks.org/53000">Shaarei Zmanim</a> on in 2455 * <a href="https://hebrewbooks.org/pdfpager.aspx?req=53055&pgnum=101">chapter 10 (page 87)</a> and 2456 * <a href="https://hebrewbooks.org/pdfpager.aspx?req=53055&pgnum=122">chapter 12 (page 108)</a>. Also see the 2457 * time of 45 minutes in <a href="https://en.wikipedia.org/wiki/Simcha_Bunim_Cohen">Rabbi Simcha Bunim Cohen's</a> <a 2458 * href="https://www.worldcat.org/oclc/179728985">The radiance of Shabbos</a> as the earliest <em>zman</em> for New York. 2459 * This <em>zman</em> is also listed in the <a href="https://hebrewbooks.org/pdfpager.aspx?req=1927&pgnum=90">Divrei 2460 * Shalom Vol. III, chapter 75</a>, and <a href="https://hebrewbooks.org/pdfpager.aspx?req=892&pgnum=431">Bais Av"i 2461 * Vol. III, chapter 117</a>. This <em>zman</em> is also listed in the Divrei Shalom etc. chapter 177. Since this 2462 * <em>zman</em> depends on the level of light, Rabbi Yaakov Shakow presented this degree-based calculation to Rabbi 2463 * <a href="https://en.wikipedia.org/wiki/Shmuel_Kamenetsky">Rabbi Shmuel Kamenetsky</a> who agreed to it. 2464 * @todo add hyperlinks to source of Divrei Shalom once it is located. 2465 * @return the {@code Instant} representing the time when the sun is 7.67° below sea level. If the 2466 * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and 2467 * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this 2468 * calculation, a {@code null} will be returned. See detailed explanation on top of the 2469 * {@link AstronomicalCalendar} documentation. 2470 * @see #ZENITH_7_POINT_67 2471 */ 2472 public Instant getTzaisGeonim7Point67Degrees() { 2473 return getSunsetOffsetByDegrees(ZENITH_7_POINT_67); 2474 } 2475 2476 /** 2477 * This method returns the <em>tzais</em> (nightfall) based on the calculations used in the <a href= 2478 * "https://www.worldcat.org/oclc/243303103">Luach Itim Lebinah</a> as the stringent time for <em>tzais</em>. It is calculated 2479 * as the sun's position at {@link #ZENITH_9_POINT_3 9.3°} below the western horizon. 2480 * 2481 * @return the {@code Instant} representing the time when the sun is 9.3° below sea level. If the calculation can't be 2482 * computed such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 2483 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned. 2484 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 2485 */ 2486 public Instant getTzaisGeonim9Point3Degrees() { 2487 return getSunsetOffsetByDegrees(ZENITH_9_POINT_3); 2488 } 2489 2490 /** 2491 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 60 minutes after 2492 * sunset <a href="https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a>, 2493 * the day that a solar hour is 60 minutes in New York. The sun's position at this time computes to {@link #ZENITH_9_POINT_75 2494 * 9.75°} below the western horizon. This is the opinion of <a href="https://en.wikipedia.org/wiki/Yosef_Eliyahu_Henkin" 2495 * >Rabbi Eliyahu Henkin</a>. This also follows the opinion of <a href="https://en.wikipedia.org/wiki/Shmuel_Kamenetsky">Rabbi 2496 * Shmuel Kamenetsky</a>. Rabbi Yaakov Shakow presented these degree-based times to Rabbi Shmuel Kamenetsky who agreed to them. 2497 * 2498 * @todo recalculate based on equinox / equilux. 2499 * @return the {@code Instant} representing the time when the sun is 9.75° below sea level. If the calculation can't be 2500 * computed such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 2501 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned. 2502 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 2503 * 2504 * @see #getTzais60Minutes() 2505 */ 2506 public Instant getTzaisGeonim9Point75Degrees() { 2507 return getSunsetOffsetByDegrees(ZENITH_9_POINT_75); 2508 } 2509 2510 /** 2511 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <a href= 2512 * "https://en.wikipedia.org/wiki/Yair_Bacharach">Chavas Yair</a> and <a href= 2513 * "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" 2514 * >Divrei Malkiel</a> that the time to walk the distance of a <a href= 2515 * "https://en.wikipedia.org/wiki/Biblical_mile">mil</a> is 15 minutes, for a total of 60 minutes for 4 mil after {@link 2516 * #getSunsetBasedOnElevationSetting()}(depends on the {@link #isUseElevation()} setting). See detailed documentation explaining 2517 * the 60 minute concept at {@link #getAlos60Minutes()}. 2518 * 2519 * @return the {@code Instant} representing 60 minutes after sea level sunset. If the calculation can't be computed such as 2520 * in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where it does not set, 2521 * a {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 2522 * 2523 * @see #getAlos60Minutes() 2524 * @see #getPlagHamincha60Minutes() 2525 * @see #getShaahZmanis60Minutes() 2526 */ 2527 public Instant getTzais60Minutes() { 2528 return getTimeOffset(getSunsetBasedOnElevationSetting(), Duration.ofMinutes(60)); 2529 } 2530 2531 /** 2532 * This method returns <em>tzais</em> usually calculated as 40 minutes (configurable to any offset via {@link 2533 * #setAteretTorahSunsetOffset(double)}) after sunset. Please note that <em>Chacham</em> Yosef Harari-Raful of Yeshivat Ateret 2534 * Torah who uses this time, does so only for calculating various other <em>zmanei hayom</em> such as <em>Sof Zman Krias 2535 * Shema</em> and <em>Plag Hamincha</em>. His calendars do not publish a <em>zman</em> for <em>Tzais</em>. It should also be 2536 * noted that <em>Chacham</em> Harari-Raful provided a 25 minute <em>zman</em> for Israel. This API uses 40 minutes year round in 2537 * any place on the globe by default. This offset can be changed by calling {@link #setAteretTorahSunsetOffset(double)}. 2538 * 2539 * @return the {@code Instant} representing 40 minutes (configurable via {@link #setAteretTorahSunsetOffset}) after sea 2540 * level sunset. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year 2541 * where the sun does not rise, and one where it does not set, a {@code null} will be returned. See detailed 2542 * explanation on top of the {@link AstronomicalCalendar} documentation. 2543 * @see #getAteretTorahSunsetOffset() 2544 * @see #setAteretTorahSunsetOffset(double) 2545 */ 2546 public Instant getTzaisAteretTorah() { 2547 long totalNanos = (long) (getAteretTorahSunsetOffset() * MINUTE_NANOS); 2548 return getTimeOffset(getSunsetBasedOnElevationSetting(), Duration.ofNanos(totalNanos)); 2549 } 2550 2551 /** 2552 * Returns the offset in minutes after sunset used to calculate <em>tzais</em> based on the calculations of <em>Chacham</em> 2553 * Yosef Harari-Raful of Yeshivat Ateret Torah calculations. The default value is 40 minutes. This affects most <em>zmanim</em>, 2554 * since almost all zmanim use subset as part of their calculation. 2555 * 2556 * @return the number of minutes after sunset for <em>Tzait</em>. 2557 * @see #setAteretTorahSunsetOffset(double) 2558 */ 2559 public double getAteretTorahSunsetOffset() { 2560 return ateretTorahSunsetOffset; 2561 } 2562 2563 /** 2564 * Allows setting the offset in minutes after sunset for the Ateret Torah <em>zmanim</em>. The default if unset is 40 minutes. 2565 * <em>Chacham</em> Yosef Harari-Raful of Yeshivat Ateret Torah uses 40 minutes globally with the exception of Israel where a 2566 * 25-minute offset is used. This 40-minute (or any other) offset can be overridden by this method. This offset impacts all 2567 * Ateret Torah <em>zmanim</em>. 2568 * 2569 * @param ateretTorahSunsetOffset the number of minutes after sunset to use as an offset for the Ateret Torah <em>tzais</em> 2570 * @see #getAteretTorahSunsetOffset() 2571 */ 2572 public void setAteretTorahSunsetOffset(double ateretTorahSunsetOffset) { 2573 this.ateretTorahSunsetOffset = ateretTorahSunsetOffset; 2574 } 2575 2576 /** 2577 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) based on the calculation of 2578 * <em>Chacham</em> Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day} 2579 * before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any 2580 * offset via {@link #setAteretTorahSunsetOffset(double)}). <em>Shaos zmaniyos</em> are calculated based on this day and added to 2581 * {@link #getAlos72Zmanis() <em>alos</em>} to reach this time. This time is 3 {@link #getShaahZmanisAteretTorah() <em>shaos 2582 * zmaniyos</em>} (temporal hours) after {@link #getAlos72Zmanis() <em>alos</em> 72 <em>zmaniyos</em>}. <b>Note: </b> Based on 2583 * this calculation <em>chatzos</em> will not be at midday. 2584 * 2585 * @return the {@code Instant} of the latest <em>zman krias shema</em> based on this calculation. If the calculation can't be 2586 * computed such as in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where 2587 * it does not set, a {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2588 * documentation. 2589 * @see #getAlos72Zmanis() 2590 * @see #getTzaisAteretTorah() 2591 * @see #getAteretTorahSunsetOffset() 2592 * @see #setAteretTorahSunsetOffset(double) 2593 * @see #getShaahZmanisAteretTorah() 2594 */ 2595 public Instant getSofZmanShmaAteretTorah() { 2596 return getSofZmanShma(getAlos72Zmanis(), getTzaisAteretTorah(), false); 2597 } 2598 2599 /** 2600 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) based on the calculation of 2601 * <em>Chacham</em> Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day} 2602 * before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any 2603 * offset via {@link #setAteretTorahSunsetOffset(double)}). <em>shaos zmaniyos</em> are calculated based on this day and added to 2604 * {@link #getAlos72Zmanis()} to reach this time. This time is 4 * {@link #getShaahZmanisAteretTorah()} after {@link 2605 * #getAlos72Zmanis()}. <b>Note: </b> Based on this calculation <em>chatzos</em> will not be at midday. Sources for an 2606 * asymmetrical day-based calculation can be seen in the documentation of 2607 * {@link #getSofZmanShmaAlos16Point1DegreesToTzaisGeonim7Point083Degrees}. 2608 * 2609 * @return the {@code Instant} of the latest <em>zman krias shema</em> based on this calculation. If the 2610 * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where 2611 * the sun does not rise, and one where it does not set, a {@code null} will be returned. See detailed 2612 * explanation on top of the {@link AstronomicalCalendar} documentation. 2613 * @see #getAlos72Zmanis() 2614 * @see #getTzaisAteretTorah() 2615 * @see #getShaahZmanisAteretTorah() 2616 * @see #setAteretTorahSunsetOffset(double) 2617 */ 2618 public Instant getSofZmanTfilaAteretTorah() { 2619 return getSofZmanTfila(getAlos72Zmanis(), getTzaisAteretTorah(), false); 2620 } 2621 2622 /** 2623 * This method returns the time of <em>mincha gedola</em> based on the calculation of <em>Chacham</em> Yosef 2624 * Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day} 2625 * before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} 2626 * (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest 2627 * time to pray <em>mincha</em> according to the opinion of the <a href="https://en.wikipedia.org/wiki/Maimonides" 2628 * >Rambam</a> and others. For more information on this see the documentation on {@link #getMinchaGedolaGRA() <em>mincha 2629 * gedola</em>}. This is calculated as 6.5 {@link #getShaahZmanisAteretTorah() solar hours} after <em>alos</em>. The 2630 * calculation used is 6.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() <em>alos</em>}. 2631 * 2632 * @see #getAlos72Zmanis() 2633 * @see #getTzaisAteretTorah() 2634 * @see #getShaahZmanisAteretTorah() 2635 * @see #getMinchaGedolaGRA() 2636 * @see #getMinchaKetanaAteretTorah() 2637 * @see #getMinchaGedolaGRA() 2638 * @see #getAteretTorahSunsetOffset() 2639 * @see #setAteretTorahSunsetOffset(double) 2640 * @return the {@code Instant} of the time of <em>mincha gedola</em>. If the calculation can't be computed such as 2641 * in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where it 2642 * does not set, a {@code null} will be returned. See detailed explanation on top of the 2643 * {@link AstronomicalCalendar} documentation. 2644 */ 2645 public Instant getMinchaGedolaAteretTorah() { 2646 return getMinchaGedola(getAlos72Zmanis(), getTzaisAteretTorah(), false); 2647 } 2648 2649 /** 2650 * This method returns the time of <em>mincha ketana</em> based on the calculation of 2651 * <em>Chacham</em> Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts 2652 * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending 2653 * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via 2654 * {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest time to pray <em>mincha</em> 2655 * according to the opinion of the <a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a> and others. 2656 * For more information on this see the documentation on {@link #getMinchaGedolaGRA() <em>mincha gedola</em>}. This is 2657 * calculated as 9.5 {@link #getShaahZmanisAteretTorah() solar hours} after {@link #getAlos72Zmanis() <em>alos</em>}. 2658 * The calculation used is 9.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() <em>alos</em>}. 2659 * 2660 * @see #getAlos72Zmanis() 2661 * @see #getTzaisAteretTorah() 2662 * @see #getShaahZmanisAteretTorah() 2663 * @see #getAteretTorahSunsetOffset() 2664 * @see #setAteretTorahSunsetOffset(double) 2665 * @see #getMinchaGedolaGRA() 2666 * @see #getMinchaKetanaGRA() 2667 * @return the {@code Instant} of the time of <em>mincha ketana</em>. If the calculation can't be computed such as 2668 * in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where it 2669 * does not set, a {@code null} will be returned. See detailed explanation on top of the 2670 * {@link AstronomicalCalendar} documentation. 2671 */ 2672 public Instant getMinchaKetanaAteretTorah() { 2673 return getMinchaKetana(getAlos72Zmanis(), getTzaisAteretTorah(), false); 2674 } 2675 2676 /** 2677 * This method returns the time of <em>plag hamincha</em> based on the calculation of <em>Chacham</em> Yosef Harari-Raful 2678 * of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is 2679 * usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset 2680 * via {@link #setAteretTorahSunsetOffset(double)}). <em>shaos zmaniyos</em> are calculated based on this day and 2681 * added to {@link #getAlos72Zmanis() <em>alos</em>} to reach this time. This time is 10.75 2682 * {@link #getShaahZmanisAteretTorah() <em>shaos zmaniyos</em>} (temporal hours) after {@link #getAlos72Zmanis() 2683 * dawn}. 2684 * 2685 * @return the {@code Instant} of the <em>plag</em>. If the calculation can't be computed such as in the Arctic Circle 2686 * where there is at least one day a year when the sun does not rise, and one where it does not set, a null 2687 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 2688 * @see #getAlos72Zmanis() 2689 * @see #getTzaisAteretTorah() 2690 * @see #getShaahZmanisAteretTorah() 2691 * @see #setAteretTorahSunsetOffset(double) 2692 * @see #getAteretTorahSunsetOffset() 2693 */ 2694 public Instant getPlagHaminchaAteretTorah() { 2695 return getPlagHamincha(getAlos72Zmanis(), getTzaisAteretTorah(), false); 2696 } 2697 2698 /** 2699 * Method to return <em>tzais</em> (dusk) calculated as 72 minutes zmaniyos, or 1/10th of the day after {@link 2700 * #getSeaLevelSunset() sea level sunset}. This is the way that the <a href= 2701 * "https://en.wikipedia.org/wiki/Abraham_Cohen_Pimentel">Minchas Cohen</a> in Ma'amar 2:4 calculates Rebbeinu Tam's 2702 * time of <em>tzais</em>. It should be noted that this calculation results in the shortest time from sunset to 2703 * <em>tzais</em> being during the winter solstice, the longest at the summer solstice and 72 clock minutes at the 2704 * equinox. This does not match reality, since there is no direct relationship between the length of the day and 2705 * twilight. The shortest twilight is during the equinox, the longest is during the summer solstice, and in the 2706 * winter with the shortest daylight, the twilight period is longer than during the equinoxes. 2707 * 2708 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic 2709 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, 2710 * a {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2711 * documentation. 2712 * @see #getAlos72Zmanis() 2713 */ 2714 public Instant getTzais72Zmanis() { 2715 return getZmanisBasedOffset(1.2); 2716 } 2717 2718 /** 2719 * Method to return <em>tzais</em> (dusk) calculated using 90 minutes zmaniyos or 1/8th of the day after {@link 2720 * #getSeaLevelSunset() sea level sunset}. This time is known in Yiddish as the <em>achtel</em> (an eighth) 2721 * <em>zman</em> used in various <em>kehilos</em>. 2722 * 2723 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic 2724 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, 2725 * a {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2726 * documentation. 2727 * @see #getAlos90Zmanis() 2728 */ 2729 public Instant getTzais90Zmanis() { 2730 return getZmanisBasedOffset(1.5); 2731 } 2732 2733 /** 2734 * Method to return <em>tzais</em> (dusk) calculated using 96 minutes <em>zmaniyos</em> or 1/7.5 of the day after 2735 * {@link #getSeaLevelSunset() sea level sunset}. 2736 * 2737 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic 2738 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, 2739 * a {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2740 * documentation. 2741 * @see #getAlos96Zmanis() 2742 */ 2743 public Instant getTzais96Zmanis() { 2744 return getZmanisBasedOffset(1.6); 2745 } 2746 2747 /** 2748 * Method to return <em>tzais</em> (dusk) calculated as 90 minutes after {@link #getSunsetBasedOnElevationSetting} (depends on 2749 * the {@link #isUseElevation()} setting). This method returns <em>tzais</em> (nightfall) based on the opinion of the Magen 2750 * Avraham that the time to walk the distance of a <a href="https://en.wikipedia.org/wiki/Biblical_mile">mil</a> according to the 2751 * <a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a>'s opinion is 18 minutes, for a total of 90 minutes based on the 2752 * opinion of Ula who calculated <em>tzais</em> as 5 mil after elevation adjusted <em>shkiah</em> (sunset). A similar 2753 * calculation {@link #getTzais19Point8Degrees()} uses solar position* calculations based on this time. 2754 * 2755 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic 2756 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, 2757 * a {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2758 * documentation. 2759 * @see #getTzais19Point8Degrees() 2760 * @see #getAlos90Minutes() 2761 */ 2762 public Instant getTzais90Minutes() { 2763 return getTimeOffset(getSunsetBasedOnElevationSetting(), Duration.ofMinutes(90)); 2764 } 2765 2766 /** 2767 * This method should be used <em>lechumra</em> only and returns <em>tzais</em> (nightfall) based on the calculations of <a href= 2768 * "https://en.wikipedia.org/wiki/Avraham_Chaim_Naeh">Rav Chaim Naeh</a> that the time to walk the distance of a <a href= 2769 * "https://en.wikipedia.org/wiki/Biblical_mile">mil</a> according to the <a href="https://en.wikipedia.org/wiki/Maimonides" 2770 * >Rambam</a>'s opinion is 2/5 of an hour (24 minutes) for a total of 120* minutes based on the opinion of <em>Ula</em> who 2771 * calculated <em>tzais</em> as 5 mil after {@link #getSunsetBasedOnElevationSetting()} (depends on the {@link #isUseElevation()} 2772 * setting). A similar calculation {@link #getTzais26Degrees()} uses degree-based calculations based on this 120 minute 2773 * calculation Since the <em>zman</em> is extremely late and at a point that is long past the 18° point where the darkest point 2774 * is reached, it should only be used <em>lechumra</em>, such as delaying the start of nighttime <em>mitzvos</em>. 2775 * 2776 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time, and if used 2777 * <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no current plan to remove this 2778 * method from the API, and this deprecation is intended to alert developers of the danger of using it. 2779 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic 2780 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, 2781 * a {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}. 2782 * documentation. 2783 * @see #getTzais26Degrees() 2784 * @see #getAlos120Minutes() 2785 */ 2786 @Deprecated (forRemoval=false) 2787 public Instant getTzais120Minutes() { 2788 return getTimeOffset(getSunsetBasedOnElevationSetting(), Duration.ofMinutes(120)); 2789 } 2790 2791 /** 2792 * This method should be used <em>lechumra</em> only and returns <em>tzais</em> (dusk) calculated using 120 minutes 2793 * <em>zmaniyos</em> after {@link #getSeaLevelSunset() sea level sunset}. Since the <em>zman</em> 2794 * is extremely late and at a time when the sun is well below the 18° point (scientifically the darkest point) in 2795 * most places on the globe, it should only be used <em>lechumra</em>, such as delaying the start of nighttime 2796 * <em>mitzvos</em>. 2797 * 2798 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time, and if used 2799 * <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no current plan to remove this 2800 * method from the API, and this deprecation is intended to alert developers of the danger of using it. 2801 * 2802 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic 2803 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, 2804 * a {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2805 * documentation. 2806 * @see #getAlos120Zmanis() 2807 * @see #getTzais120Minutes() 2808 * @see #getTzais26Degrees() 2809 */ 2810 @Deprecated (forRemoval=false) 2811 public Instant getTzais120Zmanis() { 2812 return getZmanisBasedOffset(2.0); 2813 } 2814 2815 /** 2816 * This calculates the time of <em>tzais</em> at the point when the sun is 16.1° below the horizon. This is 2817 * the sun's dip below the horizon 72 minutes after sunset according Rabbeinu Tam's calculation of <em>tzais</em> 2818 * <a href= 2819 * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a> in 2820 * Jerusalem. The question of equinox VS equilux is complex, with Rabbi Meir Posen in the <a href= 2821 * "https://www.worldcat.org/oclc/956316270">Ohr Meir</a> of the opinion that the equilux should be used. See 2822 * Yisrael Vehazmanim vol I, 34:1:4. Rabbi Yedidya Manet in his <a href= 2823 * "https://www.nli.org.il/en/books/NNL_ALEPH002542826/NLI">Zmanei HaHalacha Lema'aseh</a> (4th edition part 2, pages 2824 * and 22 and 24) and Rabbi Yonah Mertzbuch (in a letter published by Rabbi Manet) are of the opinion that the 2825 * astronomical equinox should be used. The difference adds up to about 9 seconds, too trivial to make much of a 2826 * difference. For information on how this is calculated see the comments on {@link #getAlos16Point1Degrees()}. 2827 * 2828 * @return the {@code Instant} representing the time. If the calculation can't be computed such as northern and 2829 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may 2830 * not reach low enough below the horizon for this calculation, a {@code null} will be returned. See 2831 * detailed explanation on top of the {@link AstronomicalCalendar} documentation. 2832 * @see #getTzais72Minutes() 2833 * @see #getAlos16Point1Degrees() for more information on this calculation. 2834 */ 2835 public Instant getTzais16Point1Degrees() { 2836 return getSunsetOffsetByDegrees(ZENITH_16_POINT_1); 2837 } 2838 2839 /** 2840 * This method should be used <em>lechumra</em> only and returns <em>tzais</em> based on when the sun is 26° 2841 * below the horizon. For information on how this is calculated see the comments on {@link #getAlos26Degrees()}. 2842 * Since the <em>zman</em> is extremely late and at a point when it is long past the 18° point where the 2843 * darkest point is reached, it should only be used <em>lechumra</em> such as delaying the start of nighttime 2844 * <em>mitzvos</em>. 2845 * 2846 * @deprecated This method should be used <em>lechumra</em> only since it returns a very late time, and if used 2847 * <em>lekula</em> can result in <em>chillul Shabbos</em> etc. There is no current plan to remove this 2848 * method from the API, and this deprecation is intended to alert developers of the danger of using it. 2849 * 2850 * @return the {@code Instant} representing the time. If the calculation can't be computed such as northern and 2851 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may 2852 * not reach low enough below the horizon for this calculation, a {@code null} will be returned. See 2853 * detailed explanation on top of the {@link AstronomicalCalendar} documentation. 2854 * @see #getTzais120Minutes() 2855 * @see #getAlos26Degrees() 2856 */ 2857 @Deprecated (forRemoval=false) 2858 public Instant getTzais26Degrees() { 2859 return getSunsetOffsetByDegrees(ZENITH_26_DEGREES); 2860 } 2861 2862 /** 2863 * For information on how this is calculated see the comments on {@link #getAlos18Degrees()} 2864 * 2865 * @return the {@code Instant} representing the time. If the calculation can't be computed such as northern and 2866 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may 2867 * not reach low enough below the horizon for this calculation, a {@code null} will be returned. See 2868 * detailed explanation on top of the {@link AstronomicalCalendar} documentation. 2869 * @see #getAlos18Degrees() 2870 */ 2871 public Instant getTzais18Degrees() { 2872 return getSunsetOffsetByDegrees(ASTRONOMICAL_ZENITH); 2873 } 2874 2875 /** 2876 * For information on how this is calculated see the comments on {@link #getAlos19Point8Degrees()}. 2877 * 2878 * @return the {@code Instant} representing the time. If the calculation can't be computed such as northern and 2879 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may 2880 * not reach low enough below the horizon for this calculation, a {@code null} will be returned. See 2881 * detailed explanation on top of the {@link AstronomicalCalendar} documentation. 2882 * @see #getTzais90Minutes() 2883 * @see #getAlos19Point8Degrees() 2884 */ 2885 public Instant getTzais19Point8Degrees() { 2886 return getSunsetOffsetByDegrees(ZENITH_19_POINT_8); 2887 } 2888 2889 /** 2890 * A method to return <em>tzais</em> (dusk) calculated as 96 minutes after {@link #getSunset() sunset} or {@link 2891 * #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). For information on how 2892 * this is calculated see the comments on {@link #getAlos96Minutes()}. 2893 * 2894 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic 2895 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, 2896 * a {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2897 * documentation. 2898 * @see #getAlos96Minutes() 2899 */ 2900 public Instant getTzais96Minutes() { 2901 return getTimeOffset(getSunsetBasedOnElevationSetting(), Duration.ofMinutes(96)); 2902 } 2903 2904 /** 2905 * A method that returns the local time for fixed <em>chatzos</em>. This time is noon and adjusted from 2906 * standard time to account for the local latitude. The 360° of the globe divided by 24 calculates to 15° 2907 * per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... <em>Chatzos</em> is at exactly 12:00 2908 * noon. This is the time of <em>chatzos</em> according to the <a href= 2909 * "https://en.wikipedia.org/wiki/Aruch_HaShulchan">Aruch Hashulchan</a> in <a href= 2910 * "https://hebrewbooks.org/pdfpager.aspx?req=7705&pgnum=426">Orach Chaim 233:14</a> and <a href= 2911 * "https://en.wikipedia.org/wiki/Moshe_Feinstein">Rabbi Moshe Feinstein</a> in Igros Moshe <a href= 2912 * "https://hebrewbooks.org/pdfpager.aspx?req=916&st=&pgnum=67">Orach Chaim 1:24</a> and <a href= 2913 * "https://hebrewbooks.org/pdfpager.aspx?req=14675&pgnum=191">2:20</a>. 2914 * Lakewood, N.J., with a longitude of -74.222, is 0.778 away from the closest multiple of 15 at -75°. This 2915 * is multiplied by 4 to yield 3 minutes and 7 seconds for a <em>chatzos</em> of 11:56:53. This method is not tied 2916 * to the theoretical 15° time zones, but will adjust to the actual time zone and <a 2917 * href="https://en.wikipedia.org/wiki/Daylight_saving_time">Daylight saving time</a>. 2918 * 2919 * @return the Instant representing the local <em>chatzos</em> 2920 * @see GeoLocation#getLocalMeanTimeOffset(Instant) 2921 * @see #getLocalMeanTime(LocalTime) 2922 */ 2923 public Instant getFixedLocalChatzosHayom() { 2924 return getLocalMeanTime(LocalTime.NOON); 2925 } 2926 2927 /** 2928 * Returns the latest time of <em>Kidush Levana</em> according to the <a 2929 * href="https://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> opinion that it is calculated as 2930 * halfway between <em>molad</em> and <em>molad</em>. This adds half the 29 days, 12 hours and 793 chalakim time 2931 * between <em>molad</em> and <em>molad</em> (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's <em>molad</em>. 2932 * If the time of <em>sof zman Kiddush Levana</em> occurs during the day (between the <em>alos</em> and <em>tzais</em> passed in 2933 * as parameters), it returns the <em>alos</em> passed in. If a {@code null} <em>alos</em> or <em>tzais</em> are passed to 2934 * this method, the non-daytime adjusted time will be returned. 2935 * 2936 * @param alos the beginning of the Jewish day. If <em>Kidush Levana</em> occurs during the day (starting at <em>alos</em> and 2937 * ending at <em>tzais</em>), the time returned will be <em>alos</em>. If either the <em>alos</em> or <em>tzais</em> 2938 * parameters are null, no daytime adjustment will be made. 2939 * @param tzais the end of the Jewish day. If Kidush Levana occurs during the day (starting at <em>alos</em> and ending at 2940 * <em>tzais</em>), the time returned will be <em>alos</em>. If either the <em>alos</em> or <em>tzais</em> parameter 2941 * are null, no daytime adjustment will be made. 2942 * @return the Instant representing the moment halfway between molad and molad. If the time occurs between 2943 * <em>alos</em> and <em>tzais</em>, <em>alos</em> will be returned. If the <em>zman</em> will not occur on this day, a 2944 * {@code null} will be returned. 2945 * @see #getSofZmanKidushLevanaBetweenMoldos() 2946 * @see #getSofZmanKidushLevana15Days(Instant, Instant) 2947 * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos() 2948 */ 2949 public Instant getSofZmanKidushLevanaBetweenMoldos(Instant alos, Instant tzais) { 2950 JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); 2951 2952 // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in French 2953 // Polynesia on Dec 2027 when kiddush Levana 3 days can be said on <em>Rosh Chodesh</em>, the sof zman Kiddush Levana 2954 // will be on the 12th of the Teves. In the case of Anadyr, Russia on Jan, 2071, sof zman Kiddush Levana between the 2955 // moldos will occur is on the night of 17th of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32). 2956 if (jewishCalendar.getJewishDayOfMonth() < 11 || jewishCalendar.getJewishDayOfMonth() > 16) { 2957 return null; 2958 } 2959 return getMoladBasedTime(jewishCalendar.getSofZmanKidushLevanaBetweenMoldos(), alos, tzais, false); 2960 } 2961 2962 /** 2963 * Returns the Instant of the <em>molad</em> based time if it occurs on the current date. Since <em>Kiddush Levana</em> 2964 * can only be said during the day, there are parameters to limit it to between <em>alos</em> and <em>tzais</em>. If 2965 * the time occurs between <em>alos</em> and <em>tzais</em>, <em>tzais</em> will be returned. 2966 * 2967 * @param moladBasedTime the <em>molad</em> based time such as <em>molad</em>, <em>tchilas</em> and <em>sof zman Kiddush 2968 * Levana</em> 2969 * @param alos optional start of day to limit <em>molad</em> times to the end of the night before or beginning of the next night. 2970 * Ignored if either <em>alos</em> or <em>tzais</em> are null. 2971 * @param tzais optional end of day to limit <em>molad</em> times to the end of the night before or beginning of the next night. 2972 * Ignored if either <em>tzais</em> or <em>alos</em> are null 2973 * @param techila is it the start of <em>Kiddush Levana</em> time or the end? If it is start roll it to the next <em>tzais</em>, 2974 * and if it is the end, return the end of the previous night (<em>alos</em> passed in). Ignored if either 2975 * <em>alos</em> or <em>tzais</em> are null. 2976 * @return the <em>molad</em> based time. If the <em>zman</em> does not occur during the current date, {@code null} will be 2977 * returned. 2978 */ 2979 private Instant getMoladBasedTime(Instant moladBasedTime, Instant alos, Instant tzais, boolean techila) { 2980 Instant lastMidnight = getMidnightLastNight().toInstant(); 2981 Instant midnightTonight = getMidnightTonight().toInstant(); 2982 if(moladBasedTime.isBefore(lastMidnight) || moladBasedTime.isAfter(midnightTonight)){ // Invalid time, bailout 2983 return null; 2984 } else if (alos == null || tzais == null){ // Not enough info to adjust 2985 return moladBasedTime; 2986 } else { // It's the daytime, get the next/prev night 2987 if (moladBasedTime.isAfter(alos) && moladBasedTime.isBefore(tzais)) { 2988 if (techila) { 2989 return tzais; 2990 } else { 2991 return alos; 2992 } 2993 } else { // It's the night, the provided time is valid 2994 return moladBasedTime; 2995 } 2996 } 2997 } 2998 2999 /** 3000 * Returns the latest time of Kiddush Levana according to the <a 3001 * href="https://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> opinion that it is calculated as 3002 * halfway between <em>molad</em> and <em>molad</em>. This adds half the 29 days, 12 hours and 793 chalakim time between 3003 * <em>molad</em> and <em>molad</em> (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's <em>molad</em>. 3004 * The <em>sof zman Kiddush Levana</em> will be returned even if it occurs during the day. To limit the time to between 3005 * <em>tzais</em> and <em>alos</em>, see {@link #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant)}. 3006 * 3007 * @return the Instant representing the moment halfway between molad and molad. If the <em>zman</em> will not occur on this 3008 * day, a {@code null} will be returned. 3009 * @see #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) 3010 * @see #getSofZmanKidushLevana15Days() 3011 * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos() 3012 */ 3013 public Instant getSofZmanKidushLevanaBetweenMoldos() { 3014 return getSofZmanKidushLevanaBetweenMoldos(null, null); 3015 } 3016 3017 /** 3018 * Returns the latest time of <em>Kiddush Levana</em> calculated as 15 days after the <em>molad</em>. This is the 3019 * opinion brought down in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the 3020 * <a href="https://en.wikipedia.org/wiki/Moses_Isserles">Rema</a> who brings down the opinion of the <a 3021 * href="https://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> of calculating 3022 * {@link #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) halfway between <em>molad</em> and <em>molad</em>} is of 3023 * the opinion that the Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, 3024 * see Rabbi Dovid Heber's very detailed write-up in <em>Siman Daled</em> (chapter 4) of <a href= 3025 * "https://hebrewbooks.org/53000">Shaarei Zmanim</a>. If the time of <em>sof zman Kiddush Levana</em> occurs during 3026 * the day (between the <em>alos</em> and <em>tzais</em> passed in as parameters), it returns the <em>alos</em> passed in. If a 3027 * null <em>alos</em> or <em>tzais</em> are passed to this method, the non-daytime adjusted time will be returned. 3028 * 3029 * @param alos the beginning of the Jewish day. If <em>Kidush Levana</em> occurs during the day (starting at <em>alos</em> and 3030 * ending at <em>tzais</em>), the time returned will be <em>alos</em>. If either the <em>alos</em> or <em>tzais</em> 3031 * parameters are null, no daytime adjustment will be made. 3032 * @param tzais the end of the Jewish day. If <em>Kidush Levana</em> occurs during the day (starting at <em>alos</em> and ending 3033 * at <em>tzais</em>), the time returned will be <em>alos</em>. If either the <em>alos</em> or <em>tzais</em> parameters 3034 * are {@code null}, no daytime adjustment will be made. 3035 * @return the Instant representing the moment 15 days after the molad. If the time occurs between <em>alos</em> and 3036 * <em>tzais</em>, <em>alos</em> will be returned. If the <em>zman</em> will not occur on this day, a 3037 * {@code null} will be returned. 3038 * @see #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) 3039 * @see JewishCalendar#getSofZmanKidushLevana15Days() 3040 */ 3041 public Instant getSofZmanKidushLevana15Days(Instant alos, Instant tzais) { 3042 JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); 3043 3044 // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in 3045 // French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on <em>Rosh Chodesh</em>, the sof zman Kiddush 3046 // Levana will be on the 12th of the Teves. in the case of Anadyr, Russia on Jan, 2071, sof zman kiddush levana will 3047 // occur after midnight on the 17th of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32). 3048 if (jewishCalendar.getJewishDayOfMonth() < 11 || jewishCalendar.getJewishDayOfMonth() > 17) { 3049 return null; 3050 } 3051 return getMoladBasedTime(jewishCalendar.getSofZmanKidushLevana15Days(), alos, tzais, false); 3052 } 3053 3054 /** 3055 * Returns the latest time of <em>Kiddush Levana</em> calculated as 15 days after the molad. This is the opinion of 3056 * the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the 3057 * <a href="https://en.wikipedia.org/wiki/Moses_Isserles">Rema</a> who brings down the opinion of the <a 3058 * href="https://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> of calculating 3059 * {@link #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) halfway between <em>molad</em> and <em>molad</em>} is of 3060 * the opinion that the Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, 3061 * See Rabbi Dovid Heber's very detailed write-up in Siman Daled (chapter 4) of <a href="https://hebrewbooks.org/53000">Shaarei 3062 * Zmanim</a>. The <em>sof zman Kiddush Levana</em> will be returned even if it occurs during the day. To limit the time to 3063 * between <em>tzais</em> and <em>alos</em>, see {@link #getSofZmanKidushLevana15Days(Instant, Instant)}. 3064 * 3065 * @return the Instant representing the moment 15 days after the <em>molad</em>. If the <em>zman</em> will not occur on this day, 3066 * a {@code null} will be returned. 3067 * @see #getSofZmanKidushLevana15Days(Instant, Instant) 3068 * @see #getSofZmanKidushLevanaBetweenMoldos() 3069 * @see JewishCalendar#getSofZmanKidushLevana15Days() 3070 * 3071 */ 3072 public Instant getSofZmanKidushLevana15Days() { 3073 return getSofZmanKidushLevana15Days(null, null); 3074 } 3075 3076 /** 3077 * Returns the earliest time of <em>Kiddush Levana</em> according to <a href= 3078 * "https://en.wikipedia.org/wiki/Yonah_Gerondi">Rabbeinu Yonah</a>'s opinion that it can be said 3 days after the 3079 * <em>molad</em>. The time will be returned even if it occurs during the day when <em>Kiddush Levana</em> can't be said. 3080 * Use {@link #getTchilasZmanKidushLevana3Days(Instant, Instant)} if you want to limit the time to night hours. 3081 * 3082 * @return the Instant representing the moment 3 days after the molad. If the <em>zman</em> will not occur on this day, a 3083 * {@code null} will be returned. 3084 * @see #getTchilasZmanKidushLevana3Days(Instant, Instant) 3085 * @see #getTchilasZmanKidushLevana7Days() 3086 * @see JewishCalendar#getTchilasZmanKidushLevana3Days() 3087 */ 3088 public Instant getTchilasZmanKidushLevana3Days() { 3089 return getTchilasZmanKidushLevana3Days(null, null); 3090 } 3091 3092 /** 3093 * Returns the earliest time of <em>Kiddush Levana</em> according to <a href= 3094 * "https://en.wikipedia.org/wiki/Yonah_Gerondi">Rabbeinu Yonah</a>'s opinion that it can be said 3 days after the <em>molad</em>. 3095 * If the time of <em>tchilas zman Kiddush Levana</em> occurs during the day (between <em>alos</em> and <em>tzais</em> passed to 3096 * this method) it will return the following <em>tzais</em>. If null is passed for either <em>alos</em> or <em>tzais</em>, the 3097 * actual <em>tchilas zman Kiddush Levana</em> will be returned, regardless of if it is during the day or not. 3098 * 3099 * @param alos the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at <em>alos</em> and ending at 3100 * <em>tzais</em>), the time returned will be <em>tzais</em>. If either the <em>alos</em> or <em>tzais</em> parameters 3101 * are null, no daytime adjustment will be made. 3102 * @param tzais the end of the Jewish day. If <em>Kidush Levana</em> occurs during the day (starting at <em>alos</em> and ending 3103 * at <em>tzais</em>), the time returned will be <em>tzais</em>. If either the <em>alos</em> or <em>tzais</em> parameters 3104 * are null, no daytime adjustment will be made. 3105 * @return the Instant representing the moment 3 days after the molad. If the time occurs between <em>alos</em> and 3106 * <em>tzais</em>, <em>tzais</em> will be returned. If the <em>zman</em> will not occur on this day, a {@code null} 3107 * will be returned. 3108 * @see #getTchilasZmanKidushLevana3Days() 3109 * @see #getTchilasZmanKidushLevana7Days(Instant, Instant) 3110 * @see JewishCalendar#getTchilasZmanKidushLevana3Days() 3111 */ 3112 public Instant getTchilasZmanKidushLevana3Days(Instant alos, Instant tzais) { 3113 JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); 3114 3115 // Do not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 3 days for 3116 // the extreme case of Rapa Iti in French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on the evening 3117 // 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. 3118 // In the case of Anadyr, Russia on Jan, 2071, when sof zman kiddush levana is on the 17th of the month, the 3rd day 3119 // from the molad will be on the 5th day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32). 3120 if (jewishCalendar.getJewishDayOfMonth() > 5 && jewishCalendar.getJewishDayOfMonth() < 30) { 3121 return null; 3122 } 3123 3124 Instant zman = getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), alos, tzais, true); 3125 3126 // Get the following month's zman kiddush Levana for the extreme case of Rapa Iti in French Polynesia on Dec 2027 when kiddush 3127 // Levana can be said on Rosh Chodesh (the evening of the 30th). See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (page 32) 3128 if (zman == null && jewishCalendar.getJewishDayOfMonth() == 30) { 3129 jewishCalendar.plusMonths(1); 3130 zman = getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), null, null, true); 3131 } 3132 3133 return zman; 3134 } 3135 3136 /** 3137 * Returns the point in time of <em>Molad</em> as a {@code Instant} Object. For the traditional day of week, hour, 3138 * minute and chalakim, {@link JewishCalendar#getMoladAsInstant()} and the not yet completed 3139 * {@link com.kosherjava.zmanim.hebrewcalendar.HebrewDateFormatter} that will have formatting for this. 3140 * 3141 * @return the Instant representing the moment of the molad. If the <em>molad</em> does not occur on this day, a 3142 * {@code null} will be returned. 3143 * @see #getTchilasZmanKidushLevana3Days() 3144 * @see #getTchilasZmanKidushLevana7Days(Instant, Instant) 3145 * @see JewishCalendar#getMoladAsInstant() 3146 */ 3147 public Instant getZmanMolad() { 3148 JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); 3149 3150 // Optimize to not calculate for impossible dates, but account for extreme cases. The molad in the extreme case of Rapa 3151 // Iti in French Polynesia on Dec 2027 occurs on the night of the 27th of Kislev. In the case of Anadyr, Russia on 3152 // 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). 3153 if (jewishCalendar.getJewishDayOfMonth() > 2 && jewishCalendar.getJewishDayOfMonth() < 27) { 3154 return null; 3155 } 3156 Instant molad = getMoladBasedTime(jewishCalendar.getMoladAsInstant(), null, null, true); 3157 3158 // deal with molad that happens on the end of the previous month 3159 if (molad == null && jewishCalendar.getJewishDayOfMonth() > 26) { 3160 jewishCalendar.plusMonths(1); 3161 molad = getMoladBasedTime(jewishCalendar.getMoladAsInstant(), null, null, true); 3162 } 3163 return molad; 3164 } 3165 3166 /** 3167 * Returns the earliest time of <em>Kiddush Levana</em> according to the opinions that it should not be said until 7 3168 * days after the <em>molad</em>. If the time of <em>tchilas zman Kiddush Levana</em> occurs during the day (between 3169 * {@link #getAlos72Minutes() <em>alos</em>} and {@link #getTzais72Minutes() <em>tzais</em>}) it 3170 * return the next <em>tzais</em>. 3171 * 3172 * @param alos the beginning of the Jewish day. If <em>Kidush Levana</em> occurs during the day (starting at <em>alos</em> and 3173 * ending at <em>tzais</em>), the time returned will be <em>tzais</em>. If either the <em>alos</em> or <em>tzais</em> 3174 * parameters are null, no daytime adjustment will be made. 3175 * @param tzais the end of the Jewish day. If <em>Kidush Levana</em> occurs during the day (starting at <em>alos</em> and ending 3176 * at <em>tzais</em>), the time returned will be <em>tzais</em>. If either the <em>alos</em> or <em>tzais</em> parameters 3177 * are {@code null}, no daytime adjustment will be made. 3178 * @return the Instant representing the moment 7 days after the molad. If the time occurs between <em>alos</em> and 3179 * <em>tzais</em>, <em>tzais</em> will be returned. If the <em>zman</em> will not occur on this day, a 3180 * {@code null} will be returned. 3181 * @see #getTchilasZmanKidushLevana3Days(Instant, Instant) 3182 * @see #getTchilasZmanKidushLevana7Days() 3183 * @see JewishCalendar#getTchilasZmanKidushLevana7Days() 3184 */ 3185 public Instant getTchilasZmanKidushLevana7Days(Instant alos, Instant tzais) { 3186 JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); 3187 3188 // Optimize to not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 7 days for 3189 // the extreme case of Rapa Iti in French Polynesia on Jan 2028 (when kiddush Levana 3 days can be said on the evening 3190 // of the 30th, the second night of Rosh Chodesh), the 7th day after the molad will be on the 4th of the month. 3191 // In the case of Anadyr, Russia on Jan, 2071, when sof zman kiddush levana is on the 17th of the month, the 7th day 3192 // from the molad will be on the 9th day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32). 3193 if (jewishCalendar.getJewishDayOfMonth() < 4 || jewishCalendar.getJewishDayOfMonth() > 9) { 3194 return null; 3195 } 3196 3197 return getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana7Days(), alos, tzais, true); 3198 } 3199 3200 /** 3201 * Returns the earliest time of <em>Kiddush Levana</em> according to the opinions that it should not be said until 7 3202 * days after the <em>molad</em>. The time will be returned even if it occurs during the day when <em>Kiddush Levana</em> 3203 * can't be recited. Use {@link #getTchilasZmanKidushLevana7Days(Instant, Instant)} if you want to limit the time to night hours. 3204 * 3205 * @return the Instant representing the moment 7 days after the molad regardless of it is day or night. If the <em>zman</em> 3206 * will not occur on this day, a {@code null} will be returned. 3207 * @see #getTchilasZmanKidushLevana7Days(Instant, Instant) 3208 * @see JewishCalendar#getTchilasZmanKidushLevana7Days() 3209 * @see #getTchilasZmanKidushLevana3Days() 3210 */ 3211 public Instant getTchilasZmanKidushLevana7Days() { 3212 return getTchilasZmanKidushLevana7Days(null, null); 3213 } 3214 3215 /** 3216 * This method returns the latest time one is allowed eating <em>chametz</em> on <em>Erev Pesach</em> according to 3217 * the opinion of the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a>. This time is identical to the {@link 3218 * #getSofZmanTfilaGRA() <em>Sof zman tfilah</em> GRA} and is provided as a convenience method for those who are 3219 * unaware how this <em>zman</em> is calculated. This time is 4 hours into the day based on the opinion of the 3220 * <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a> that the day is calculated from sunrise to sunset. 3221 * This returns the time 4 * {@link #getShaahZmanisGRA()} after {@link #getSeaLevelSunrise() sea level sunrise}. If it 3222 * is not <em>erev Pesach</em>, a {@code null} will be returned. 3223 * @return the {@code Instant} one is allowed eating <em>chametz</em> on <em>Erev Pesach</em>. If it is not <em>erev 3224 * Pesach</em> or the calculation can't be computed such as in the Arctic Circle where there is at least one 3225 * day a year when the sun does not rise, and one where it does not set, a {@code null} will be returned. 3226 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3227 * @see #getShaahZmanisGRA() 3228 * @see #getSofZmanTfilaGRA() 3229 * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) 3230 */ 3231 public Instant getSofZmanAchilasChametzGRA() { 3232 return getSofZmanAchilasChametz(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); 3233 } 3234 3235 /** 3236 * This method returns the latest time one is allowed eating <em>chametz</em> on <em>Erev Pesach</em> according to the 3237 * opinion of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> 3238 * being {@link #getAlos72Minutes() 72} minutes before {@link #getSunrise()}. This time is identical to the 3239 * {@link #getSofZmanTfilaMGA72Minutes() <em>Sof zman tfilah</em> MGA 72 minutes}. This time is 4 {@link 3240 * #getShaahZmanis72Minutes() <em>shaos zmaniyos</em>} (temporal hours) after {@link #getAlos72Minutes() dawn} based on the 3241 * opinion of the MGA that the day is calculated from a {@link #getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link 3242 * #getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 4 * {@link #getShaahZmanis72Minutes()} 3243 * after {@link #getAlos72Minutes() dawn}. If it is not <em>erev Pesach</em>, a {@code null} will be returned. 3244 * 3245 * @return the {@code Instant} of the latest time of eating <em>chametz</em>. If it is not <em>erev Pesach</em> or the 3246 * calculation can't be computed such as in the Arctic Circle where there is at least one day a year when the sun does 3247 * not rise, and one where it does not set, a {@code null} will be returned. See detailed explanation on top of 3248 * the {@link AstronomicalCalendar} documentation. 3249 * @see #getShaahZmanis72Minutes() 3250 * @see #getAlos72Minutes() 3251 * @see #getSofZmanTfilaMGA72Minutes() 3252 * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) 3253 */ 3254 public Instant getSofZmanAchilasChametzMGA72Minutes() { 3255 return getSofZmanAchilasChametz(getAlos72Minutes(), getTzais72Minutes(), true); 3256 } 3257 3258 /** 3259 * This method returns the latest time one is allowed eating <em>chametz</em> on <em>Erev Pesach</em> according to the opinion 3260 * of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 3261 * #getAlos72Zmanis() 72 zmaniyos} minutes before {@link #getSunrise()}. This time is identical to the 3262 * {@link #getSofZmanTfilaMGA72MinutesZmanis() <em>Sof zman tfilah</em> MGA 72 minutes zmanis}. This time is 4 {@link 3263 * #getShaahZmanis72MinutesZmanis() <em>shaos zmaniyos</em>} (temporal hours) after {@link #getAlos72Minutes() dawn} based on the 3264 * opinion of the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to 3265 * {@link #getTzais72Zmanis() nightfall} of 72 minutes zmanis after sunset. This returns the time of 4 * {@link 3266 * #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}. If it is not <em>erev Pesach</em>, a {@code null} 3267 * will be 3268 * returned. 3269 * 3270 * @return the {@code Instant} of the latest time of eating <em>chametz</em>. If it is not <em>erev Pesach</em> or the 3271 * calculation can't be computed such as in the Arctic Circle where there is at least one day a year when the sun does 3272 * not rise, and one where it does not set, a {@code null} will be returned. See detailed explanation on top of 3273 * the {@link AstronomicalCalendar} documentation. 3274 * @see #getShaahZmanis72MinutesZmanis() 3275 * @see #getAlos72Zmanis() 3276 * @see #getSofZmanTfilaMGA72MinutesZmanis() 3277 * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) 3278 */ 3279 public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() { 3280 return getSofZmanAchilasChametz(getAlos72Zmanis(), getTzais72Zmanis(), true); 3281 } 3282 3283 /** 3284 * This method returns the latest time one is allowed eating <em>chametz</em> on <em>Erev Pesach</em> according to the opinion of 3285 * the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 3286 * #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise()}. This time is 4 {@link #getShaahZmanis16Point1Degrees()} 3287 * after {@link #getAlos16Point1Degrees()} based on the opinion of the MGA that the day is calculated from dawn to nightfall with 3288 * both being 16.1° below sunrise or sunset. This returns the time of 4 {@link #getShaahZmanis16Point1Degrees()} after {@link 3289 * #getAlos16Point1Degrees() dawn}. If it is not <em>erev Pesach</em>, a {@code null} will be returned. 3290 * 3291 * @return the {@code Instant} of the latest time of eating <em>chametz</em>. If it is not <em>erev Pesach</em> or the 3292 * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and north of 3293 * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a 3294 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3295 * @see #getShaahZmanis16Point1Degrees() 3296 * @see #getAlos16Point1Degrees() 3297 * @see #getSofZmanTfilaMGA16Point1Degrees() 3298 * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) 3299 */ 3300 public Instant getSofZmanAchilasChametzMGA16Point1Degrees() { 3301 return getSofZmanAchilasChametz(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); 3302 } 3303 3304 /** 3305 * This method returns the latest time for burning <em>chametz</em> on <em>Erev Pesach</em> according to the opinion of the 3306 * <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a>. This returns the time 5 * {@link #getShaahZmanisGRA()} after 3307 * {@link #getSeaLevelSunrise()}. If it is not <em>erev Pesach</em>, a {@code null} will be returned. 3308 * @return the {@code Instant} of the latest time for burning <em>chametz</em> on <em>Erev Pesach</em>. If it is not 3309 * <em>erev Pesach</em> or the calculation can't be computed such as in the Arctic Circle where there is at least 3310 * one day a year when the sun does not rise, and one where it does not set, a {@code null} will be 3311 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3312 * @see #getShaahZmanisGRA() 3313 * @see #getSofZmanBiurChametz(Instant, Instant, boolean) 3314 */ 3315 public Instant getSofZmanBiurChametzGRA() { 3316 return getSofZmanBiurChametz(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); 3317 } 3318 3319 /** 3320 * This method returns the latest time for burning <em>chametz</em> on <em>Erev Pesach</em> according to the opinion of the 3321 * <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 3322 * #getAlos72Minutes() 72} minutes before {@link #getSunrise()}. This time is 5 {@link 3323 * #getShaahZmanis72Minutes() <em>shaos zmaniyos</em>} (temporal hours) after {@link #getAlos72Minutes() dawn} based on the 3324 * opinion of the MGA that the day is calculated from a {@link #getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link 3325 * #getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link #getShaahZmanis72Minutes()} 3326 * after {@link #getAlos72Minutes() dawn}. If it is not <em>erev Pesach</em>, a {@code null} will be returned. 3327 * @return the {@code Instant} of the latest time for burning <em>chametz</em> on <em>Erev Pesach</em>. If it is not 3328 * <em>erev Pesach</em> or the calculation can't be computed such as in the Arctic Circle where there is at 3329 * least one day a year when the sun does not rise, and one where it does not set, a {@code null} will be 3330 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3331 * @see #getShaahZmanis72Minutes() 3332 * @see #getAlos72Minutes() 3333 * @see #getSofZmanBiurChametz(Instant, Instant, boolean) 3334 */ 3335 public Instant getSofZmanBiurChametzMGA72Minutes() { 3336 return getSofZmanBiurChametz(getAlos72Minutes(), getTzais72Minutes(), true); 3337 } 3338 3339 /** 3340 * This method returns the latest time for burning <em>chametz</em> on <em>Erev Pesach</em> according to the opinion of the 3341 * <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> being {@link 3342 * #getAlos72Zmanis() 72} minutes zmanis before {@link #getSunrise()}. This time is 5 {@link 3343 * #getShaahZmanis72MinutesZmanis() <em>shaos zmaniyos</em>} (temporal hours) after {@link #getAlos72Zmanis() dawn} based on the 3344 * opinion of the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to 3345 * {@link #getTzais72Zmanis() nightfall} of 72 minutes zmanis after sunset. This returns the time of 5 * {@link 3346 * #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}. If it is not <em>erev Pesach</em>, a 3347 * {@code null} will be returned. 3348 * @return the {@code Instant} of the latest time for burning <em>chametz</em> on <em>Erev Pesach</em>. If it is not 3349 * <em>erev Pesach</em> or the calculation can't be computed such as in the Arctic Circle where there is at 3350 * least one day a year when the sun does not rise, and one where it does not set, a {@code null} will be 3351 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3352 * @see #getShaahZmanis72MinutesZmanis() 3353 * @see #getAlos72Zmanis() 3354 * @see #getSofZmanBiurChametz(Instant, Instant, boolean) 3355 */ 3356 public Instant getSofZmanBiurChametzMGA72MinutesZmanis() { 3357 return getSofZmanBiurChametz(getAlos72Zmanis(), getTzais72Zmanis(), true); 3358 } 3359 3360 /** 3361 * This method returns the latest time for burning <em>chametz</em> on <em>Erev Pesach</em> according to the opinion 3362 * of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on <em>alos</em> 3363 * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise()}. This time is 5 3364 * {@link #getShaahZmanis16Point1Degrees() <em>shaos zmaniyos</em>} (solar hours) after {@link #getAlos16Point1Degrees() 3365 * dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° 3366 * below sunrise or sunset. This returns the time of 5 {@link #getShaahZmanis16Point1Degrees()} after 3367 * {@link #getAlos16Point1Degrees() dawn}. If it is not <em>erev Pesach</em>, a {@code null} will be returned. 3368 * @return the {@code Instant} of the latest time for burning <em>chametz</em> on <em>Erev Pesach</em>. If it is not 3369 * <em>erev Pesach</em> or the calculation can't be computed such as northern and southern locations even south 3370 * of the Arctic Circle and north of the Antarctic Circle where the sun may not reach low enough below the 3371 * horizon for this calculation, a {@code null} will be returned. See detailed explanation on top of the 3372 * {@link AstronomicalCalendar} documentation. 3373 * @see #getShaahZmanis16Point1Degrees() 3374 * @see #getAlos16Point1Degrees() 3375 * @see #getSofZmanBiurChametz(Instant, Instant, boolean) 3376 */ 3377 public Instant getSofZmanBiurChametzMGA16Point1Degrees() { 3378 return getSofZmanBiurChametz(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); 3379 } 3380 3381 /** 3382 * A method that returns the <a href="https://en.wikipedia.org/wiki/Shneur_Zalman_of_Liadi">Baal Hatanya</a>'s a <em>shaah 3383 * zmanis</em> ({@link #getTemporalHour(Instant, Instant) temporal hour}). This forms the base for the Baal Hatanya's day based 3384 * calculations that are calculated as a 1.583° dip below the horizon after sunset. According to the Baal Hatanya, <em>shkiah 3385 * amiti</em>, true (halachic) sunset, is when the top of the sun's disk disappears from view at an elevation similar to the 3386 * mountains of Eretz Yisrael. This time is calculated as the point at which the center of the sun's disk is 1.583° below the 3387 * horizon. A method that returns a <em>shaah zmanis</em> ({@link #getTemporalHour(Instant, Instant) temporal hour}) calculated 3388 * based on the <a href="https://en.wikipedia.org/wiki/Shneur_Zalman_of_Liadi">Baal Hatanya</a>'s <em>netz amiti</em> and 3389 * <em>shkiah amiti</em> using a dip of 1.583° below the sea level horizon. This calculation divides the day based on the opinion 3390 * of the Baal Hatanya that the day runs from {@link #getSunriseBaalHatanya() netz amiti} to {@link #getSunsetBaalHatanya() 3391 * <em>shkiah amiti</em>}. The calculations are based on a day from {@link #getSunriseBaalHatanya() sea level <em>netz amiti</em>} 3392 * to {@link #getSunsetBaalHatanya() sea level <em>shkiah amiti</em>}. The day is split into 12 equal parts with each one being a 3393 * <em>shaah zmanis</em>. This method is similar to {@link #getTemporalHour}, but all calculations are based on a sea level 3394 * sunrise and sunset. 3395 * @return the {@code Duration} of a <em>shaah zmanis</em> calculated from {@link #getSunriseBaalHatanya() <em>netz 3396 * amiti</em> (sunrise)} to {@link #getSunsetBaalHatanya() <em>shkiah amiti</em> ("real" sunset)}. If the calculation 3397 * can't be computed such as in the Arctic Circle where there is at least one day a year when the sun does not rise, and 3398 * one where it does not set, a {@code null} will be returned. See detailed explanation on top of the 3399 * {@link AstronomicalCalendar} documentation. 3400 * @see #getTemporalHour(Instant, Instant) 3401 * @see #getSunriseBaalHatanya() 3402 * @see #getSunsetBaalHatanya() 3403 * @see ZmanimCalendar#ZENITH_1_POINT_583 3404 */ 3405 public Duration getShaahZmanisBaalHatanya() { 3406 return getTemporalHour(getSunriseBaalHatanya(), getSunsetBaalHatanya()); 3407 } 3408 3409 /** 3410 * Returns the <a href="https://en.wikipedia.org/wiki/Shneur_Zalman_of_Liadi">Baal Hatanya</a>'s <em>alos</em> (dawn) calculated 3411 * as the time when the sun is 16.9° below the eastern {@link AstronomicalCalendar#GEOMETRIC_ZENITH geometric horizon} before 3412 * {@link #getSunrise()}. It is based on the calculation that the time between dawn and <em>netz amiti</em> (sunrise) is 72 3413 * minutes, the time that is takes to walk 4 mil at 18 minutes a mil (<a href="https://en.wikipedia.org/wiki/Maimonides" 3414 * >Rambam</a> and others). The sun's position at 72 minutes before {@link #getSunriseBaalHatanya <em>netz amiti</em> (sunrise)} 3415 * in Jerusalem <a href="https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / 3416 * equilux</a> is 16.9° below {@link AstronomicalCalendar#GEOMETRIC_ZENITH}. 3417 * 3418 * @return The {@code Instant} of dawn. If the calculation can't be computed such as northern and southern 3419 * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach 3420 * low enough below the horizon for this calculation, a {@code null} will be returned. See detailed 3421 * explanation on top of the {@link AstronomicalCalendar} documentation. 3422 */ 3423 public Instant getAlosBaalHatanya() { 3424 return getSunriseOffsetByDegrees(ZENITH_16_POINT_9); 3425 } 3426 3427 /** 3428 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning). This time is 3 {@link 3429 * #getShaahZmanisBaalHatanya() <em>shaos zmaniyos</em>} (solar hours) after {@link #getSunriseBaalHatanya() <em>netz amiti</em> 3430 * (sunrise)} based on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time 3431 * 3 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() <em>netz amiti</em> (sunrise)}. 3432 * 3433 * @see #getSofZmanShma(Instant, Instant) 3434 * @see #getShaahZmanisBaalHatanya() 3435 * @return the {@code Instant} of the latest <em>zman shema</em> according to the Baal Hatanya. If the calculation 3436 * can't be computed such as in the Arctic Circle where there is at least one day a year when the sun does 3437 * not rise, and one where it does not set, a {@code null} will be returned. See detailed explanation on 3438 * top of the {@link AstronomicalCalendar} documentation. 3439 */ 3440 public Instant getSofZmanShmaBaalHatanya() { 3441 return getSofZmanShma(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); 3442 } 3443 3444 /** 3445 * This method returns the latest <em>zman tfilah</em> (time to recite the morning prayers). This time is 4 hours into the day 3446 * based on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time 4 * 3447 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() <em>netz amiti</em> (sunrise)}. 3448 * 3449 * @see #getSofZmanTfila(Instant, Instant) 3450 * @see #getShaahZmanisBaalHatanya() 3451 * @return the {@code Instant} of the latest <em>zman tfilah</em>. If the calculation can't be computed such as in 3452 * the Arctic Circle where there is at least one day a year when the sun does not rise, and one where it does 3453 * not set, a {@code null} will be returned. See detailed explanation on top of the 3454 * {@link AstronomicalCalendar} documentation. 3455 */ 3456 public Instant getSofZmanTfilaBaalHatanya() { 3457 return getSofZmanTfila(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); 3458 } 3459 3460 /** 3461 * This method returns the latest time one is allowed eating <em>chametz</em> on <em>Erev Pesach</em> according to the opinion 3462 * of the Baal Hatanya. This time is identical to the {@link #getSofZmanTfilaBaalHatanya() <em>Sof zman tfilah</em> Baal Hatanya}. 3463 * This time is 4 hours into the day based on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. 3464 * This returns the time 4 {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() <em>netz amiti</em> 3465 * (sunrise)}. If it is not <em>erev Pesach</em>, a {@code null} will be returned. 3466 * @return the {@code Instant} one is allowed eating <em>chametz</em> on <em>Erev Pesach</em>. If it is not <em>erev 3467 * Pesach</em> or the calculation can't be computed such as in the Arctic Circle where there is at least one 3468 * day a year when the sun does not rise, and one where it does not set, a {@code null} will be returned. 3469 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3470 * @see #getShaahZmanisBaalHatanya() 3471 * @see #getSofZmanTfilaBaalHatanya() 3472 * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) 3473 */ 3474 public Instant getSofZmanAchilasChametzBaalHatanya() { 3475 return getSofZmanAchilasChametz(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); 3476 } 3477 3478 /** 3479 * This method returns the latest time for burning <em>chametz</em> on <em>Erev Pesach</em> according to the opinion of the Baal 3480 * Hatanya. This time is 5 hours into the day based on the opinion of the Baal Hatanya that the day is calculated from sunrise 3481 * to sunset. This returns the time 5 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() <em>netz 3482 * amiti</em> (sunrise)}. If it is not <em>erev Pesach</em>, a {@code null} will be returned. 3483 * @return the {@code Instant} of the latest time for burning <em>chametz</em> on <em>Erev Pesach</em>. If it is not 3484 * <em>erev Pesach</em> or the calculation can't be computed such as in the Arctic Circle where there is at 3485 * least one day a year when the sun does not rise, and one where it does not set, a {@code null} will be 3486 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3487 * @see #getShaahZmanisBaalHatanya() 3488 * @see #getSofZmanBiurChametz(Instant, Instant, boolean) 3489 */ 3490 public Instant getSofZmanBiurChametzBaalHatanya() { 3491 return getSofZmanBiurChametz(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); 3492 } 3493 3494 /** 3495 * This method returns the time of <em>mincha gedola</em>. <em>Mincha gedola</em> is the earliest time one can pray 3496 * <em>mincha</em>. The <a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a> is of the opinion that it is 3497 * better to delay <em>mincha</em> until {@link #getMinchaKetanaBaalHatanya() <em>mincha ketana</em>} while the 3498 * <a href="https://en.wikipedia.org/wiki/Asher_ben_Jehiel">Ra"sh</a>, 3499 * <a href="https://en.wikipedia.org/wiki/Jacob_ben_Asher">Tur</a>, <a href= 3500 * "https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a> and others are of the opinion that <em>mincha</em> can be prayed 3501 * <em>lechatchila</em> starting at <em>mincha gedola</em>. This is calculated as 6.5 {@link #getShaahZmanisBaalHatanya() 3502 * sea level solar hours} after {@link #getSunriseBaalHatanya() <em>netz amiti</em> (sunrise)}. This calculation is based 3503 * on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time 6.5 3504 * * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() <em>netz amiti</em> ("real" sunrise)}. 3505 * @todo Consider adjusting this to calculate the time as 30 clock or <em>zmaniyos </em> minutes after either {@link 3506 * getSunTransit() astronomical <em>chatzos</em>} or {@link #getChatzosHayomAsHalfDay() <em>chatzos</em> as half a 3507 * day} for {@link AstronomicalCalculator calculators} that support it, based on {@link #isUseAstronomicalChatzos()}. 3508 * @see #getMinchaGedola(Instant, Instant) 3509 * @see #getShaahZmanisBaalHatanya() 3510 * @see #getMinchaKetanaBaalHatanya() 3511 * @return the {@code Instant} of the time of <em>mincha gedola</em> according to the Baal Hatanya. If the calculation 3512 * can't be computed such as in the Arctic Circle where there is at least one day a year when the sun does not rise, 3513 * and one where it does not set, a {@code null} will be returned. See detailed explanation on top of the 3514 * {@link AstronomicalCalendar} documentation. 3515 */ 3516 public Instant getMinchaGedolaBaalHatanya() { 3517 return getMinchaGedola(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); 3518 } 3519 3520 /** 3521 * This method returns the time of <em>mincha ketana</em>. This is the preferred earliest time to pray <em>mincha</em> in the 3522 * opinion of the <a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a> and others. For more information on this see the 3523 * documentation on {@link #getMinchaGedolaBaalHatanya() <em>mincha gedola</em>}. This is calculated as 9.5 {@link 3524 * #getShaahZmanisBaalHatanya() sea level solar hours} after {@link #getSunriseBaalHatanya() <em>netz amiti</em> (sunrise)}. 3525 * This calculation is calculated based on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. 3526 * This returns the time 9.5 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() <em>netz amiti</em>}. 3527 * 3528 * @see #getMinchaKetana(Instant, Instant) 3529 * @see #getShaahZmanisBaalHatanya() 3530 * @see #getMinchaGedolaBaalHatanya() 3531 * @return the {@code Instant} of the time of <em>mincha ketana</em>. If the calculation can't be computed such as 3532 * in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where it 3533 * does not set, a {@code null} will be returned. See detailed explanation on top of the 3534 * {@link AstronomicalCalendar} documentation. 3535 */ 3536 public Instant getMinchaKetanaBaalHatanya() { 3537 return getMinchaKetana(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); 3538 } 3539 3540 /** 3541 * This method returns the time of <em>plag hamincha</em>. This is calculated as 10.75 hours after sunrise. This calculation 3542 * is based on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time 3543 * 10.75 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() <em>netz amiti</em> (sunrise)}. See 3544 * <a href="https://www.chabad.org/library/article_cdo/aid/3209349/jewish/About-Our-Zmanim-Calculations.htm">About Our 3545 * <em>Zmanim</em> Calculations @ Chabad.org</a> for more details on this calculation. 3546 * 3547 * @see #getPlagHamincha(Instant, Instant) 3548 * @return the {@code Instant} of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 3549 * in the Arctic Circle where there is at least one day a year when the sun does not rise, and one where it 3550 * does not set, a {@code null} will be returned. See detailed explanation on top of the 3551 * {@link AstronomicalCalendar} documentation. 3552 */ 3553 public Instant getPlagHaminchaBaalHatanya() { 3554 return getPlagHamincha(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); 3555 } 3556 3557 /** 3558 * A method that returns <em>tzais</em> (nightfall) when the sun is 6° below the western geometric horizon (90°) after {@link 3559 * #getSunset() sunset}. This <em>tzais</em> / nightfall based on the opinion of the <a href= 3560 * "https://en.wikipedia.org/wiki/Shneur_Zalman_of_Liadi">Baal Hatanya</a>. This calculation is based on the position of the sun 3561 * about 24 minutes after {@link #getSeaLevelSunset() sunset} in Jerusalem <a href= 3562 * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a>, which is 6° 3563 * below {@link AstronomicalCalendar#GEOMETRIC_ZENITH}. See <a href= 3564 * "https://www.chabad.org/library/article_cdo/aid/3209349/jewish/About-Our-Zmanim-Calculations.htm">About Our <em>Zmanim</em> 3565 * Calculations @ Chabad.org</a> that is based on {@link #getSunsetBaalHatanya() <em>shkiah amitis</em> as 1.583° below the 3566 * horizon} calculated around the equinox / equilux that computes 3.516 minutes after sunset. To this, 18 minutes of 3/4 of a 3567 * 24-minute mil and two minutes for <em>bain hashmashos</em> of Rav Yosi is added. This calculation computes the sun being 3568 * 5.83° below the horizon (very close to the slightly later {@link #getTzaisGeonim5Point95Degrees()} that was calculated based 3569 * on 4 fixed minutes) and it is rounded up to 6°. 3570 * 3571 * @return The {@code Instant} of nightfall. If the calculation can't be computed such as northern and southern 3572 * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach 3573 * low enough below the horizon for this calculation, a {@code null} will be returned. See detailed 3574 * explanation on top of the {@link AstronomicalCalendar} documentation. 3575 * @see #getTzaisGeonim5Point95Degrees() 3576 * @see #getSunsetBaalHatanya() 3577 */ 3578 public Instant getTzaisBaalHatanya() { 3579 return getSunsetOffsetByDegrees(ZENITH_6_DEGREES); 3580 } 3581 3582 /** 3583 * This method returns <a href="https://en.wikipedia.org/wiki/Moshe_Feinstein">Rav Moshe Feinstein's</a> opinion of the 3584 * calculation of <em>sof zman krias shema</em> (latest time to recite <em>Shema</em> in the morning) according to the 3585 * opinion of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> that the 3586 * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts 3587 * at <em>alos</em> defined as {@link #getAlos18Degrees() 18°} and ends at {@link #getFixedLocalChatzosHayom() fixed local 3588 * chatzos}. <em>Sof Zman Shema</em> is 3 <em>shaos zmaniyos</em> (solar hours) after <em>alos</em> or half of this half-day. 3589 * 3590 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 3591 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 3592 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be 3593 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3594 * @see #getAlos18Degrees() 3595 * @see #getFixedLocalChatzosHayom() 3596 * @see #getHalfDayBasedZman(Instant, Instant, double) 3597 */ 3598 public Instant getSofZmanShmaMGA18DegreesToFixedLocalChatzos() { 3599 return getHalfDayBasedZman(getAlos18Degrees(), getFixedLocalChatzosHayom(), 3); 3600 } 3601 3602 /** 3603 * This method returns <a href="https://en.wikipedia.org/wiki/Moshe_Feinstein">Rav Moshe Feinstein's</a> opinion of the 3604 * calculation of <em>sof zman krias shema</em> (latest time to recite <em>Shema</em> in the morning) according to the 3605 * opinion of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> that the day is calculated 3606 * from dawn to nightfall, but calculated using the first half of the day only. The half a day starts at <em>alos</em> defined 3607 * as {@link #getAlos16Point1Degrees() 16.1°} and ends at {@link #getFixedLocalChatzosHayom() fixed local chatzos}. <em>Sof Zman 3608 * Shema</em> is 3 <em>shaos zmaniyos</em> (solar hours) after this <em>alos</em> or half of this half-day. 3609 * 3610 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 3611 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 3612 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned. 3613 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3614 * @see #getAlos16Point1Degrees() 3615 * @see #getFixedLocalChatzosHayom() 3616 * @see #getHalfDayBasedZman(Instant, Instant, double) 3617 */ 3618 public Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos() { 3619 return getHalfDayBasedZman(getAlos16Point1Degrees(), getFixedLocalChatzosHayom(), 3); 3620 } 3621 3622 /** 3623 * This method returns <a href="https://en.wikipedia.org/wiki/Moshe_Feinstein">Rav Moshe Feinstein's</a> opinion of the 3624 * calculation of <em>sof zman krias shema</em> (latest time to recite <em>Shema</em> in the morning) according to the opinion of 3625 * the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> that the day is calculated from dawn to 3626 * nightfall, but calculated using the first half of the day only. The half a day starts at <em>alos</em> defined as {@link 3627 * #getAlos90Minutes() 90 minutes before sunrise} and ends at {@link #getFixedLocalChatzosHayom() fixed local chatzos}. <em>Sof 3628 * Zman Shema</em> is 3 <em>shaos zmaniyos</em> (solar hours) after this <em>alos</em> or half of this half-day. 3629 * 3630 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 3631 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 3632 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be 3633 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3634 * @see #getAlos90Minutes() 3635 * @see #getFixedLocalChatzosHayom() 3636 * @see #getHalfDayBasedZman(Instant, Instant, double) 3637 */ 3638 public Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos() { 3639 return getHalfDayBasedZman(getAlos90Minutes(), getFixedLocalChatzosHayom(), 3); 3640 } 3641 3642 /** 3643 * This method returns <a href="https://en.wikipedia.org/wiki/Moshe_Feinstein">Rav Moshe Feinstein's</a> opinion of the 3644 * calculation of <em>sof zman krias shema</em> (latest time to recite <em>Shema</em> in the morning) according to the opinion of 3645 * the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> that the day is calculated from dawn to 3646 * nightfall, but calculated using the first half of the day only. The half a day starts at <em>alos</em> defined as {@link 3647 * #getAlos72Minutes() 72 minutes before sunrise} and ends at {@link #getFixedLocalChatzosHayom()}. <em>Sof Zman Shema</em> is 3 3648 * <em>shaos zmaniyos</em> (solar hours) after this <em>alos</em> or half of this half-day. 3649 * 3650 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 3651 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 3652 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be 3653 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3654 * @see #getAlos72Minutes() 3655 * @see #getFixedLocalChatzosHayom() 3656 * @see #getHalfDayBasedZman(Instant, Instant, double) 3657 */ 3658 public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() { 3659 return getHalfDayBasedZman(getAlos72Minutes(), getFixedLocalChatzosHayom(), 3); 3660 } 3661 3662 /** 3663 * This method returns <a href="https://en.wikipedia.org/wiki/Moshe_Feinstein">Rav Moshe Feinstein's</a> opinion of the 3664 * calculation of <em>sof zman krias shema</em> (latest time to recite <em>Shema</em> in the morning) according to the opinion 3665 * of the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a> that the day is calculated from sunrise to sunset, but 3666 * calculated using the first half of the day only. The half a day starts at {@link #getSunrise()} and 3667 * ends at {@link #getFixedLocalChatzosHayom() fixed local chatzos}. <em>Sof zman Shema</em> is 3 <em>shaos zmaniyos</em> (solar 3668 * hours) after sunrise or half of this half-day. 3669 * 3670 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 3671 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 3672 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be 3673 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3674 * @see #getSunset() 3675 * @see #getFixedLocalChatzosHayom() 3676 * @see #getHalfDayBasedZman(Instant, Instant, double) 3677 */ 3678 public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() { 3679 return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzosHayom(), 3); 3680 } 3681 3682 /** 3683 * This method returns <a href="https://en.wikipedia.org/wiki/Moshe_Feinstein">Rav Moshe Feinstein's</a> opinion of the 3684 * calculation of <em>sof zman tfila</em> (<em>zman tfilah</em> (the latest time to recite the morning prayers)) 3685 * according to the opinion of the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a> that the day is 3686 * calculated from sunrise to sunset, but calculated using the first half of the day only. The half a day starts at 3687 * {@link #getSunrise()} and ends at {@link #getFixedLocalChatzosHayom() fixed local chatzos}. <em>Sof zman 3688 * tefila</em> is 4 <em>shaos zmaniyos</em> (solar hours) after sunrise or 2/3 of this half-day. 3689 * 3690 * @return the {@code Instant} of the latest <em>zman krias shema</em>. If the calculation can't be computed such 3691 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 3692 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be 3693 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3694 * @see #getSunset() 3695 * @see #getFixedLocalChatzosHayom() 3696 * @see #getHalfDayBasedZman(Instant, Instant, double) 3697 */ 3698 public Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos() { 3699 return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzosHayom(), 4); 3700 } 3701 3702 /** 3703 * This method returns <a href="https://en.wikipedia.org/wiki/Moshe_Feinstein">Rav Moshe Feinstein's</a> opinion of 3704 * the calculation of <em>mincha gedola</em>, the earliest time one can pray <em>mincha</em> according to the<a href= 3705 * "https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a> calculated as 30 minutes after {@link #getFixedLocalChatzosHayom() fixed 3706 * local chatzos}. 3707 * 3708 * @return the {@code Instant} of the time of <em>mincha gedola</em>. If the calculation can't be computed such as in the Arctic 3709 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 3710 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3711 * @see #getMinchaGedolaGRA() 3712 * @see #getFixedLocalChatzosHayom() 3713 * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset 3714 */ 3715 public Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes() { 3716 return getTimeOffset(getFixedLocalChatzosHayom(), Duration.ofMinutes(30)); 3717 } 3718 3719 /** 3720 * This method returns <a href="https://en.wikipedia.org/wiki/Moshe_Feinstein">Rav Moshe Feinstein's</a> opinion 3721 * of the calculation of <em>mincha ketana</em> (the preferred time to recite the <em>mincha prayers</em> according to 3722 * the opinion of the <a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a> and others) calculated according 3723 * to the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a> that is 3.5 <em>shaos zmaniyos</em> (solar 3724 * hours) after {@link #getFixedLocalChatzosHayom() fixed local chatzos}. 3725 * 3726 * @return the {@code Instant} of the time of <em>mincha gedola</em>. If the calculation can't be computed such as in the Arctic 3727 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 3728 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3729 * @see #getMinchaGedolaGRA() 3730 * @see #getFixedLocalChatzosHayom() 3731 * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes 3732 * @see #getHalfDayBasedZman(Instant, Instant, double) 3733 */ 3734 public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() { 3735 return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunsetBasedOnElevationSetting(), 3.5); 3736 } 3737 3738 /** 3739 * This method returns <a href="https://en.wikipedia.org/wiki/Moshe_Feinstein">Rav Moshe Feinstein's</a> opinion 3740 * of the calculation of <em>plag hamincha</em>. This method returns <em>plag hamincha</em> calculated according to the 3741 * <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a> that the day ends at sunset and is 4.75 <em>shaos 3742 * zmaniyos</em> (solar hours) after {@link #getFixedLocalChatzosHayom() fixed local chatzos}. 3743 * 3744 * @return the {@code Instant} of the time of <em>mincha gedola</em>. If the calculation can't be computed such as in the Arctic 3745 * Circle where there is at least one day a year when the sun does not rise, and one where it does not set, a 3746 * {@code null} will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3747 * @see #getPlagHaminchaGRA() 3748 * @see #getFixedLocalChatzosHayom() 3749 * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset 3750 * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes 3751 * @see #getHalfDayBasedZman(Instant, Instant, double) 3752 */ 3753 public Instant getPlagHaminchaGRAFixedLocalChatzosToSunset() { 3754 return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunsetBasedOnElevationSetting(), 4.75); 3755 } 3756 3757 /** 3758 * Method to return <em>tzais</em> (dusk) calculated as 50 minutes after {@link #getSunset() sunset} or {@link 3759 * #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). This method returns 3760 * <em>tzais</em> (nightfall) based on the opinion of Rabbi Moshe Feinstein for the New York area. This time should 3761 * not be used for latitudes other than ones similar to the latitude of the NY area. 3762 * 3763 * @return the {@code Instant} representing the time. If the calculation can't be computed such as in the Arctic Circle where 3764 * there is at least one day a year when the sun does not rise, and one where it does not set, a {@code null} will be 3765 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3766 */ 3767 public Instant getTzais50Minutes() { 3768 return getTimeOffset(getSunsetBasedOnElevationSetting(), Duration.ofMinutes(50)); 3769 } 3770 3771 /** 3772 * A method for calculating <em>samuch lemincha ketana</em>, / near <em>mincha ketana</em> time that is half an hour before 3773 * {@link #getMinchaKetanaGRA()} or is 9 * <em>shaos zmaniyos</em> (solar hours) after the start of 3774 * the day, calculated according to the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a> using a day starting at 3775 * sunrise and ending at sunset. This is the time that eating or other activity can't begin prior to praying <em>mincha</em>. 3776 * The calculation used is 9 * {@link #getShaahZmanisGRA()} after {@link #getSunrise()} or {@link 3777 * #getSunriseBasedOnElevationSetting() elevation adjusted sunrise} (depending on the {@link #isUseElevation()} setting). See the 3778 * <a href="https://hebrewbooks.org/pdfpager.aspx?req=60387&st=&pgnum=294">Mechaber and Mishna Berurah 232</a> and <a href= 3779 * "https://hebrewbooks.org/pdfpager.aspx?req=60388&pgnum=34">249:2</a>. 3780 * 3781 * @see #getShaahZmanisGRA() 3782 * @see #getSamuchLeMinchaKetana(Instant, Instant, boolean) 3783 * @see #isUseAstronomicalChatzosForOtherZmanim() 3784 * @return the {@code Instant} of the time of <em>samuch lemincha ketana</em>. If the calculation can't be computed such 3785 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 3786 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be 3787 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3788 */ 3789 public Instant getSamuchLeMinchaKetanaGRA() { 3790 return getSamuchLeMinchaKetana(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); 3791 } 3792 3793 /** 3794 * 3795 * A method for calculating <em>samuch lemincha ketana</em>, / near <em>mincha ketana</em> time that is half an hour before 3796 * {@link #getMinchaKetanaGRA()} or is 9 * <em>shaos zmaniyos</em> (solar hours) after the start of the day, calculated based 3797 * on a day from and ending a day starting at {@link #getMinchaGedola16Point1Degrees() <em>alos</em> 16.1°} and ending 3798 * at {@link #getTzais72Minutes() <em>tzais</em> 16.1°}. This is the time that eating or other activity can't begin prior to 3799 * praying <em>mincha</em>. The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after {@link 3800 * #getAlos16Point1Degrees() <em>alos</em> 16.1°}. See the <a href= 3801 * "https://hebrewbooks.org/pdfpager.aspx?req=60387&st=&pgnum=294">Mechaber and Mishna Berurah 232</a> and <a href= 3802 * "https://hebrewbooks.org/pdfpager.aspx?req=60388&pgnum=34">249:2</a>. 3803 * 3804 * @see #getSamuchLeMinchaKetana(Instant, Instant, boolean) 3805 * @see #getShaahZmanis16Point1Degrees() 3806 * @return the {@code Instant} of the time of <em>samuch lemincha ketana</em>. If the calculation can't be computed such 3807 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 3808 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned. 3809 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3810 */ 3811 public Instant getSamuchLeMinchaKetana16Point1Degrees() { 3812 return getSamuchLeMinchaKetana(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); 3813 } 3814 3815 /** 3816 * A method for calculating <em>samuch lemincha ketana</em>, / near <em>mincha ketana</em> time that is half an hour before 3817 * {@link #getMinchaKetanaGRA()} or is 9 * <em>shaos zmaniyos</em> (solar hours) after the start of the day, calculated based 3818 * on a day from and ending a day starting at {@link #getAlos72Minutes() <em>alos</em> 72 minutes} and ending at {@link 3819 * #getTzais72Minutes() <em>tzais</em> 72 minutes}. This is the time that eating or other activity can't begin prior to praying 3820 * <em>mincha</em>. The calculation used is 9 * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72Minutes() <em>alos</em> 3821 * 72 minutes}. See the <a href="https://hebrewbooks.org/pdfpager.aspx?req=60387&st=&pgnum=294">Mechaber and Mishna Berurah 3822 * 232</a> and <a href="https://hebrewbooks.org/pdfpager.aspx?req=60388&pgnum=34">249:2</a>. 3823 * 3824 * @see #getSamuchLeMinchaKetana(Instant, Instant, boolean) 3825 * @see #getShaahZmanis72Minutes() 3826 * @return the {@code Instant} of the time of <em>samuch lemincha ketana</em>. If the calculation can't be computed such 3827 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 3828 * where the sun may not reach low enough below the horizon for this calculation, a {@code null} will be returned. 3829 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 3830 */ 3831 public Instant getSamuchLeMinchaKetana72Minutes() { 3832 return getSamuchLeMinchaKetana(getAlos72Minutes(), getTzais72Minutes(), true); 3833 } 3834 3835 /** 3836 * A method that returns sunset calculated as the time when the sun is directly due west (azimuth 270°) in <a href= 3837 * "https://en.wikipedia.org/wiki/Polar_regions_of_Earth">Polar regions</a> on days that there are no {@link 3838 * #getSunsetBasedOnElevationSetting() sunset}. If there is sunset that day, a {@code null} will be returned. 3839 * <p>In Polar regions (the <a href="https://en.wikipedia.org/wiki/Arctic">Arctic</a> or <a href= 3840 * "https://en.wikipedia.org/wiki/Antarctic">Antarctic</a> circles), there are days of no sunrise or sunset, and there are 3841 * <em>halachic</em> opinions that during these periods, sunset (the day-night boundary) is reached when the sun is directly due 3842 * west (azimuth 270°). Sunrise in this opinion is when the sun is directly due east (azimuth 90°) returned by {@link 3843 * #getPolarSunriseBenIshChai()}. This is the opinion of <a href="https://en.wikipedia.org/wiki/Joseph_Schwarz_(geographer)">Rabbi Yehosef 3844 * Schwarz</a> in his <a href="https://hebrewbooks.org/pdfpager.aspx?req=31703&pgnum=134">דברי יוסף – דרך מבוא השמש</a> and <a href= 3845 * "https://hebrewbooks.org/pdfpager.aspx?req=159&pgnum=83">דברי יוסף – תשובות, שאלה ח׳</a>. This is brought down <em>lehalacha</em> 3846 * by The <a href="https://en.wikipedia.org/wiki/Yosef_Hayyim">Ben Ish Chai</a> in the <a href= 3847 * "https://hebrewbooks.org/pdfpager.aspx?req=1401&pgnum=461">רב פעלים – חלק ב׳, סוד ישרים ס׳ ד׳</a>. This time is close to six hours 3848 * after {@link #getSunTransit() astronomical <em>chatzos hayom</em>}, but depending on the time of year and location in the 3849 * Arctic / Antarctic, it can be up to 46 minutes before or after this time. 3850 * 3851 * @return Sunset calculated as the time the sun is directly due west (azimuth 270°) in Polar regions on days that there is no 3852 * sunset. If there is sunset that day, a {@code null} will be returned. While unlikely, it is theoretically possible 3853 * for a {@code null} to be returned by the code even in Polar regions. 3854 * @see #getPolarSunriseBenIshChai() 3855 * @see #getTimeAtAzimuth90Or270(double) 3856 * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getTimeAtAzimuth(LocalDate, GeoLocation, double) 3857 */ 3858 public Instant getPolarSunsetBenIshChai() { 3859 if(getSunsetBasedOnElevationSetting() == null) { 3860 return getTimeAtAzimuth90Or270(270); 3861 } 3862 return null; 3863 } 3864 3865 /** 3866 * A method that returns sunrise calculated as the time when the sun is directly due east (azimuth 90°) in <a href= 3867 * "https://en.wikipedia.org/wiki/Polar_regions_of_Earth">Polar regions</a> on days that there are no {@link 3868 * #getSunriseBasedOnElevationSetting() sunrise}. If there is sunrise that day, a {@code null} will be returned. 3869 * <p>In Polar regions (the <a href="https://en.wikipedia.org/wiki/Arctic">Arctic</a> or <a href= 3870 * "https://en.wikipedia.org/wiki/Antarctic">Antarctic</a> circles), there are days of no sunrise or sunset, and there are 3871 * <em>halachic</em> opinions that during these periods, sunrise is reached when the sun is directly due east (azimuth 90°). 3872 * The day-night boundary (sunset) in these opinions is when the sun is directly due west (azimuth 270°) returned by 3873 * {@link #getPolarSunsetBenIshChai()}. This is the opinion of <a href= 3874 * "https://en.wikipedia.org/wiki/Joseph_Schwarz_(geographer)">Rabbi Yehosef Schwarz</a> in his <a href= 3875 * "https://hebrewbooks.org/pdfpager.aspx?req=31703&pgnum=134">דברי יוסף – דרך מבוא השמש</a> and <a href= 3876 * "https://hebrewbooks.org/pdfpager.aspx?req=159&pgnum=83">דברי יוסף – תשובות, שאלה ח׳</a>. This is brought down <em>lehalacha</em> 3877 * by The <a href="https://en.wikipedia.org/wiki/Yosef_Hayyim">Ben Ish Chai</a> in the <a href= 3878 * "https://hebrewbooks.org/pdfpager.aspx?req=1401&pgnum=461">רב פעלים – חלק ב׳, סוד ישרים ס׳ ד׳</a>. This time is close to six hours 3879 * before {@link #getSunTransit() astronomical <em>chatzos hayom</em>}, but depending on the time of year and location in the 3880 * Arctic / Antarctic, it can be up to 46 minutes before or after this time. 3881 * 3882 * @return Sunrise calculated as the easternmost solar position (azimuth 90°) in Polar regions on days that there is no sunrise. 3883 * If there is sunrise that day, a {@code null} will be returned. While unlikely, it is theoretically possible for a 3884 * {@code null} to be returned by the code even in Polar regions. 3885 * @see #getPolarSunsetBenIshChai() 3886 * @see #getTimeAtAzimuth90Or270(double) 3887 * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getTimeAtAzimuth(LocalDate, GeoLocation, double) 3888 */ 3889 public Instant getPolarSunriseBenIshChai() { 3890 if(getSunriseBasedOnElevationSetting() == null) { 3891 return getTimeAtAzimuth90Or270(90); 3892 } 3893 return null; 3894 } 3895 3896 /** 3897 * A method that returns <em>Plag Hamincha</em> in <a href="https://en.wikipedia.org/wiki/Polar_regions_of_Earth">Polar 3898 * regions</a> on days that there are no {@link #getSunriseBasedOnElevationSetting() sunrise} and {@link 3899 * #getSunsetBasedOnElevationSetting() sunset}, calculated 10.75 <em>shaaos zmaniyos</em> of a day calculated starting at 3900 * {@link #getPolarSunriseBenIshChai()} and ending at {@link #getPolarSunsetBenIshChai()}. This is the opinion of <a href= 3901 * "https://en.wikipedia.org/wiki/Joseph_Schwarz_(geographer)">Rabbi Yehosef Schwarz</a> in his <a href= 3902 * "https://hebrewbooks.org/pdfpager.aspx?req=31703&pgnum=134">דברי יוסף – דרך מבוא השמש</a> and <a href= 3903 * "https://hebrewbooks.org/pdfpager.aspx?req=159&pgnum=83">דברי יוסף – תשובות, שאלה ח׳</a>. This is brought down <em>lehalacha</em> 3904 * by The <a href="https://en.wikipedia.org/wiki/Yosef_Hayyim">Ben Ish Chai</a> in the <a href= 3905 * "https://hebrewbooks.org/pdfpager.aspx?req=1401&pgnum=461">רב פעלים – חלק ב׳, סוד ישרים ס׳ ד׳</a>. 3906 * 3907 * @return <em>Plag Hamincha</em> according to the Ben Ish Chai in Polar regions on days that there is no sunrise or sunset. 3908 * If there is sunrise or sunset that day, a {@code null} will be returned. 3909 * @see #getPolarSunriseBenIshChai() 3910 * @see #getPolarSunsetBenIshChai() 3911 * @see #getPlagHamincha(Instant, Instant, boolean) 3912 */ 3913 public Instant getPolarPlagHaminchaBenIshChai() { 3914 return getPlagHamincha(getPolarSunriseBenIshChai(), getPolarSunsetBenIshChai(), true); 3915 } 3916 3917 /** 3918 * In Polar regions during the period where the sun is above the horizon 24-hours a day, <a href= 3919 * "https://en.wikipedia.org/wiki/Moshe_Sternbuch">Rav Moshe Sternbuch</a> in <a href= 3920 * "https://hebrewbooks.org/pdfpager.aspx?req=19963&st=&pgnum=316">מועדים וזמנים ח״ב ס׳ קנ״ה הע׳ א׳</a> (<span lang="he">ח״ד ס׳ ת״א 3921 * הע׳ א׳</span> in the new edition) and in תשובות והנהגות <a href= 3922 * "https://hebrewbooks.org/pdfpager.aspx?req=20025&st=&pgnum=224">ח״א ס׳ שט״ו,</a> and <a href= 3923 * "https://hebrewbooks.org/pdfpager.aspx?req=69067&st=&pgnum=135">ח״ה ס׳ פ״ד</a> ruled that during the Polar summer night-based 3924 * <em>mitzvos</em> are not applicable, and during the Polar winter, day-based mitzvos are not applicable. Despite this, the day 3925 * of the calendar week changes when the sun is at its lowest position (an instantaneous set and rise) at {@link 3926 * #getChatzosHalayla()} in the Polar summer and when it is at its highest position in the Polar winter that occurs at {@link 3927 * #getChatzosHayom()}. Rabbi Dovid Heber the author of the <a href="https://hebrewbooks.org/53000">שערי זמנים</a> who <a href= 3928 * "https://hebrewbooks.org/pdfpager.aspx?req=53000&st=&pgnum=111">discusses the Moadim Uzmanim's opinion</a> clarified to me 3929 * that in the Polar winter this really only applies when there is no <em>alos hashachar</em>. The lack of <em>alos 3930 * hashachar</em> only occurs in Antarctica and in uninhabited extreme northern regions. This means almost every northern 3931 * inhabited location has an <em>alos hashachar</em> and "day" even on December 21st. This method considers <em>alos</em> to be 3932 * {@link #getAlos16Point1Degrees()}. 3933 * <p> It should be noted that in the <span lang="he">מועדים וזמנים</span> linked above that was published in 1961, Rav Moshe 3934 * Sternbuch mentions that [<span lang="he">ולתפלה, היום מתהלק, עד י״ב שעות שחרית, ומאז מנחה, ומעריב מתפלל סמוך ללילה כרבי יהודה כנל״ד ...</span>]. 3935 * This comment (in () in the original, and [] in the new edition published in 2023) was not brought down in the <span lang="he" 3936 * >תשובות והנהגות</span> vol. 1 that was published in 1977 nor in vol. 5. published in 2009. Since it is not clear to me if this 3937 * constitutes a retraction, the calculations for the start of <em>mincha</em> mentioned in the Moadim Uzmanim was omitted. This 3938 * is 12 hours after the start of the day (either {@link #getChatzosHalayla()} in the Polar summer, or {@link #getChatzosHayom()} 3939 * in the Polar winter. {@link #getPolarPlagHaminchaTeshuvosVehanhagos()} was included and is the start of the time that 3940 * <em>maariv</em> can be recited (until the end of the Polar day). 3941 * was omitted. 3942 * 3943 * <em>plag hamincha</em> 3944 * were not implemented. For those* who want the zmanim, the end of <em>Shacharis</em> is essentially 12 hours after the start of the day (either {@link 3945 * #getChatzosHalayla()} in the Polar summer, or {@link #getChatzosHayom()} in the Polar winter, while mincha will start at that 3946 * point and can in daven mincha until night (or plag). 3947 * <p>FIXME: 3948 * <ul> 3949 * <li>Attempt to clarify the discrepancy.</li> 3950 * <li>Research if an earlier alos such as 18° should be used</li> 3951 * <li>Consider logic for day with EITHER an <em>alos</em> or a sunset</li> 3952 * </ul> 3953 * @return the time of the Jewish calendar transition to the next day in Polar regions according to Rav Moshe Sternbuch. 3954 * @see #getPolarPlagHaminchaTeshuvosVehanhagos() 3955 */ 3956 public Instant getPolarStartOfDayTeshuvosVehanhagos() { 3957 if(getSunriseBasedOnElevationSetting() == null && getSunsetBasedOnElevationSetting() == null) { 3958 Instant chatzosHayom = getChatzosHayom(); 3959 Instant chatzosHalayla = getChatzosHalayla(); 3960 double chatzosHayomSolarElevation = getAstronomicalCalculator().getSolarElevation(chatzosHayom, getGeoLocation()); 3961 double chatzosHalaylaSolarElevation = getAstronomicalCalculator().getSolarElevation(chatzosHalayla, getGeoLocation()); 3962 double sunriseElevation = getAstronomicalCalculator().getSolarRadius() + getAstronomicalCalculator().getRefraction(); 3963 if(chatzosHayomSolarElevation < (0 - sunriseElevation) && chatzosHalaylaSolarElevation < (0 - sunriseElevation) && // and the sun is always below the horizon 3964 getAlos16Point1Degrees() == null && getSunriseBasedOnElevationSetting() == null) { // Polar winter in either hemisphere no alos 16.1 or sunrise 3965 return chatzosHayom; // the "sunrise" as the closest to the horizon 3966 } else if(chatzosHayomSolarElevation > (0 - sunriseElevation) && chatzosHalaylaSolarElevation > (0 - sunriseElevation)) { // Polar summer when both are above the horizon 3967 return chatzosHalayla; 3968 } 3969 } 3970 return null; 3971 } 3972 3973 /** 3974 * In Polar regions during the period where the sun is above the horizon 24-hours a day, <a href= 3975 * "https://en.wikipedia.org/wiki/Moshe_Sternbuch">Rav Moshe Sternbuch</a> in <a href= 3976 * "https://hebrewbooks.org/pdfpager.aspx?req=19963&st=&pgnum=316">מועדים וזמנים ח״ב ס׳ קנ״ה הע׳ א׳</a> (<span lang="he">ח״ד ס׳ ת״א 3977 * הע׳ א׳</span> in the new edition) mentions the concept of zmanim based on his {@link #getPolarStartOfDayTeshuvosVehanhagos()}. 3978 * This calculates {@link #getPlagHamincha(Instant, Instant, boolean)} as 10.75 <em>sha'os zmaniyos</em> starting 24 hours prior 3979 * to the current start/end of the current day. This will be very close to 2.5 clock hours before the start/end of the day. 3980 * @return <em>plag hamincha</em> as 2.5 hours prior to the start of the next day. 3981 * 3982 * @see #getPolarStartOfDayTeshuvosVehanhagos() for more details on this opinion. 3983 * @see #getPlagHamincha(Instant, Instant, boolean) 3984 */ 3985 public Instant getPolarPlagHaminchaTeshuvosVehanhagos() { 3986 Instant polarStartOfDay = getPolarStartOfDayTeshuvosVehanhagos(); 3987 if(polarStartOfDay == null) { 3988 return null; 3989 } else { 3990 Instant yesterday = polarStartOfDay.minus(1, ChronoUnit.DAYS); 3991 return getPlagHamincha(yesterday, polarStartOfDay, true); 3992 } 3993 3994 } 3995 3996 /** 3997 * @see java.lang.Object#equals(Object) 3998 */ 3999 public boolean equals(Object object) { 4000 if (this == object) { 4001 return true; 4002 } 4003 if (object == null || getClass() != object.getClass()) { 4004 return false; 4005 } 4006 if (!super.equals(object)) { 4007 return false; 4008 } 4009 ComprehensiveZmanimCalendar that = (ComprehensiveZmanimCalendar) object; 4010 return ateretTorahSunsetOffset == that.ateretTorahSunsetOffset; 4011 } 4012 4013 /** 4014 * @see java.lang.Object#hashCode() 4015 */ 4016 public int hashCode() { 4017 return 37 * super.hashCode() + Double.hashCode(ateretTorahSunsetOffset); 4018 } 4019}