001/* 002 * Zmanim Java API 003 * Copyright (C) 2004-2011 Eliyahu Hershfeld 004 * 005 * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General 006 * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied 010 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 011 * details. 012 * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to 013 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA, 014 * or connect to: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html 015 */ 016package net.sourceforge.zmanim; 017 018import java.util.Calendar; 019import java.util.Date; 020import net.sourceforge.zmanim.util.AstronomicalCalculator; 021import net.sourceforge.zmanim.util.GeoLocation; 022import net.sourceforge.zmanim.hebrewcalendar.JewishCalendar; 023 024/** 025 * This class extends ZmanimCalendar and provides many more zmanim than available in the ZmanimCalendar. The basis for 026 * most zmanim in this class are from the <em>sefer</em> <b>Yisroel Vehazmanim</b> by <b>Rabbi Yisroel Dovid 027 * Harfenes</b>. <br /> 028 * As an example of the number of different <em>zmanim</em> made available by this class, there are methods to return 12 029 * different calculations for <em>alos</em> (dawn) available in this class. The real power of this API is the ease in 030 * calculating <em>zmanim</em> that are not part of the API. The methods for doing <em>zmanim</em> calculations not 031 * present in this class or it's superclass the {@link ZmanimCalendar} are contained in the {@link AstronomicalCalendar} 032 * , the base class of the calendars in our API since they are generic methods for calculating time based on degrees or 033 * time before or after {@link #getSunrise sunrise} and {@link #getSunset sunset} and are of interest for calculation 034 * beyond <em>zmanim</em> calculations. Here are some examples: <br /> 035 * First create the Calendar for the location you would like to calculate: 036 * 037 * <pre> 038 * String locationName = "Lakewood, NJ"; 039 * double latitude = 40.0828; // Lakewood, NJ 040 * double longitude = -74.2094; // Lakewood, NJ 041 * double elevation = 0; 042 * // the String parameter in getTimeZone() has to be a valid timezone listed in 043 * // {@link java.util.TimeZone#getAvailableIDs()} 044 * TimeZone timeZone = TimeZone.getTimeZone("America/New_York"); 045 * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone); 046 * ComplexZmanimCalendar czc = new ComplexZmanimCalendar(location); 047 * // Optionally set the date or it will default to today's date 048 * czc.getCalendar().set(Calendar.MONTH, Calendar.FEBRUARY); 049 * czc.getCalendar().set(Calendar.DAY_OF_MONTH, 8); 050 * </pre> 051 * 052 * <b>Note:</b> For locations such as Israel where the beginning and end of daylight savings time can fluctuate from 053 * year to year create a {@link java.util.SimpleTimeZone} with the known start and end of DST. <br /> 054 * To get <em>alos</em> calculated as 14° below the horizon (as calculated in the calendars published in Montreal), 055 * add {@link AstronomicalCalendar#ASTRONOMICAL_ZENITH} (90) to the 14° offset to get the desired time: 056 * 057 * <pre> 058 * Date alos14 = czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#ASTRONOMICAL_ZENITH} + 14); 059 * </pre> 060 * 061 * To get <em>mincha gedola</em> calculated based on the MGA using a <em>shaah 062 * zmanis</em> based on the day starting 16.1° below the horizon (and ending 16.1° after sunset) the following 063 * calculation can be used: 064 * 065 * <pre> 066 * Date minchaGedola = czc.getTimeOffset(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees() * 6.5); 067 * </pre> 068 * 069 * A little more complex example would be calculating <em>plag hamincha</em> based on a <em>shaah zmanis</em> that was 070 * not present in this class. While a drop more complex it is still rather easy. For example if you wanted to calculate 071 * <em>plag</em> based on the day starting 12° before sunrise and ending 12° after sunset as calculated in the 072 * calendars in Manchester, England (there is nothing that would prevent your calculating the day using sunrise and 073 * sunset offsets that are not identical degrees, but this would lead to <em>chatzos</em> being a time other than the 074 * {@link #getSunTransit() solar transit} (solar midday)). The steps involved would be to first calculate the 075 * <em>shaah zmanis</em> and then use that time in milliseconds to calculate 10.75 hours after sunrise starting at 076 * 12° before sunset 077 * 078 * <pre> 079 * long shaahZmanis = czc.getTemporalHour(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#ASTRONOMICAL_ZENITH} + 12), 080 * czc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#ASTRONOMICAL_ZENITH} + 12)); 081 * Date plag = getTimeOffset(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#ASTRONOMICAL_ZENITH} + 12), 082 * shaahZmanis * 10.75); 083 * </pre> 084 * 085 * <h2>Disclaimer:</h2> While I did my best to get accurate results please do not rely on these zmanim for 086 * <em>halacha lemaaseh</em> 087 * 088 * @author © Eliyahu Hershfeld 2004 - 2011 089 * @version 1.2 090 */ 091public class ComplexZmanimCalendar extends ZmanimCalendar { 092 093 /** 094 * The zenith of 3.7° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for 095 * calculating <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> that <em>tzais</em> is the 096 * time it takes to walk 3/4 of a </em>Mil</em> at 18 minutes a <em>Mil</em>, or 13.5 minutes after sunset. The sun 097 * is 3.7° below {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem on March 16, about 4 days 098 * before the equinox, the day that a solar hour is 60 minutes. 099 * 100 * TODO AT see #getTzaisGeonim3Point7Degrees() 101 */ 102 protected static final double ZENITH_3_POINT_7 = GEOMETRIC_ZENITH + 3.7; 103 104 /** 105 * The zenith of 5.95° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for 106 * calculating <em>tzais</em> (nightfall) according to some opinions. This calculation is based on the position of 107 * the sun 24 minutes after sunset in Jerusalem on March 16, about 4 days before the equinox, the day that a solar 108 * hour is 60 minutes, which calculates to 5.95° below {@link #GEOMETRIC_ZENITH geometric zenith}. 109 * 110 * @see #getTzaisGeonim5Point95Degrees() 111 */ 112 protected static final double ZENITH_5_POINT_95 = GEOMETRIC_ZENITH + 5.95; 113 114 /** 115 * The zenith of 7.083° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This is often referred to as 116 * 7°5' or 7° and 5 minutes. This calculation is used for calculating <em>alos</em> (dawn) and 117 * <em>tzais</em> (nightfall) according to some opinions. This calculation is based on the position of the sun 30 118 * minutes after sunset in Jerusalem on March 16, about 4 days before the equinox, the day that a solar hour is 60 119 * minutes, which calculates to 7.0833333° below {@link #GEOMETRIC_ZENITH geometric zenith}. This is time some 120 * opinions consider dark enough for 3 stars to be visible. This is the opinion of the 121 * <em>Sh"Ut Melamed Leho'il</em>, <em>Sh"Ut Binyan Tziyon</em>, <em>Tenuvas Sadeh</em> and very close to the time 122 * of the <em>Mekor Chesed</em> on the <em>Sefer chasidim</em>. 123 * 124 * @see #getTzaisGeonim7Point083Degrees() 125 * @see #getBainHasmashosRT13Point5MinutesBefore7Point083Degrees() 126 */ 127 protected static final double ZENITH_7_POINT_083 = GEOMETRIC_ZENITH + 7 + (5 / 60); 128 129 /** 130 * The zenith of 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for 131 * calculating <em>misheyakir</em> according to some opinions. This calculation is based on the position of the sun 132 * 45 minutes before {@link #getSunrise sunrise} in Jerusalem on March 16, about 4 days before the equinox, the day 133 * that a solar hour is 60 minutes which calculates to 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith}. 134 * 135 * @see #getMisheyakir10Point2Degrees() 136 */ 137 protected static final double ZENITH_10_POINT_2 = GEOMETRIC_ZENITH + 10.2; 138 139 /** 140 * The zenith of 11° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for 141 * calculating <em>misheyakir</em> according to some opinions. This calculation is based on the position of the sun 142 * 48 minutes before {@link #getSunrise sunrise} in Jerusalem on March 16, about 4 days before the equinox, the day 143 * that a solar hour is 60 minutes which calculates to 11° below {@link #GEOMETRIC_ZENITH geometric zenith} 144 * 145 * @see #getMisheyakir11Degrees() 146 */ 147 protected static final double ZENITH_11_DEGREES = GEOMETRIC_ZENITH + 11; 148 149 /** 150 * The zenith of 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for 151 * calculating <em>misheyakir</em> according to some opinions. This calculation is based on the position of the sun 152 * 52 minutes before {@link #getSunrise sunrise} in Jerusalem on March 16, about 4 days before the equinox, the day 153 * that a solar hour is 60 minutes which calculates to 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith} 154 * 155 * @see #getMisheyakir11Point5Degrees() 156 */ 157 protected static final double ZENITH_11_POINT_5 = GEOMETRIC_ZENITH + 11.5; 158 159 /** 160 * The zenith of 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for 161 * calculating <em>Rabainu Tam's bain hashmashos</em> according to some opinions. <br/> 162 * <br/> 163 * NOTE: See comments on {@link #getBainHasmashosRT13Point24Degrees} for additional details about the degrees. 164 * 165 * @see #getBainHasmashosRT13Point24Degrees 166 * 167 */ 168 protected static final double ZENITH_13_POINT_24 = GEOMETRIC_ZENITH + 13.24; 169 170 /** 171 * The zenith of 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for 172 * calculating <em>alos</em> (dawn) and <em>tzais</em> (nightfall) according to some opinions. This calculation is 173 * based on the position of the sun 90 minutes after sunset in Jerusalem on March 16, about 4 days before the 174 * equinox, the day that a solar hour is 60 minutes which calculates to 19.8° below {@link #GEOMETRIC_ZENITH 175 * geometric zenith} 176 * 177 * @see #getTzais19Point8Degrees() 178 * @see #getAlos19Point8Degrees() 179 * @see #getAlos90() 180 * @see #getTzais90() 181 */ 182 protected static final double ZENITH_19_POINT_8 = GEOMETRIC_ZENITH + 19.8; 183 184 /** 185 * The zenith of 26° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for 186 * calculating <em>alos</em> (dawn) and <em>tzais</em> (nightfall) according to some opinions. This calculation is 187 * based on the position of the sun {@link #getAlos120() 120 minutes} after sunset in Jerusalem on March 16, about 4 188 * days before the equinox, the day that a solar hour is 60 minutes which calculates to 26° below 189 * {@link #GEOMETRIC_ZENITH geometric zenith} 190 * 191 * @see #getAlos26Degrees() 192 * @see #getTzais26Degrees() 193 * @see #getAlos120() 194 * @see #getTzais120() 195 */ 196 protected static final double ZENITH_26_DEGREES = GEOMETRIC_ZENITH + 26.0; 197 198 /** 199 * Experimental and may not make the final 1.3 cut 200 */ 201 202 /** 203 * The zenith of 4.37° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for 204 * calculating <em>tzais</em> (nightfall) according to some opinions. This calculation is based on the position of 205 * the sun {@link #getTzaisGeonim4Point37Degrees() 16 7/8 minutes} after sunset (3/4 of a 22.5 minute Mil) in 206 * Jerusalem on March 16, about 4 days before the equinox, the day that a solar hour is 60 minutes which calculates 207 * to 4.37° below {@link #GEOMETRIC_ZENITH geometric zenith} 208 * 209 * @see #getTzaisGeonim4Point37Degrees() 210 */ 211 protected static final double ZENITH_4_POINT_37 = GEOMETRIC_ZENITH + 4.37; 212 213 /** 214 * The zenith of 4.61° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for 215 * calculating <em>tzais</em> (nightfall) according to some opinions. This calculation is based on the position of 216 * the sun {@link #getTzaisGeonim4Point37Degrees() 18 minutes} after sunset (3/4 of a 24 minute Mil) in Jerusalem on 217 * March 16, about 4 days before the equinox, the day that a solar hour is 60 minutes which calculates to 4.61° 218 * below {@link #GEOMETRIC_ZENITH geometric zenith} 219 * 220 * @see #getTzaisGeonim4Point61Degrees() 221 */ 222 protected static final double ZENITH_4_POINT_61 = GEOMETRIC_ZENITH + 4.61; 223 224 protected static final double ZENITH_4_POINT_8 = GEOMETRIC_ZENITH + 4.8; 225 226 /** 227 * The zenith of 3.65° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for 228 * calculating <em>tzais</em> (nightfall) according to some opinions. This calculation is based on the position of 229 * the sun {@link #getTzaisGeonim3Point65Degrees() 13.5 minutes} after sunset (3/4 of an 18 minute Mil) in Jerusalem 230 * on March 16, about 4 days before the equinox, the day that a solar hour is 60 minutes which calculates to 231 * 3.65° below {@link #GEOMETRIC_ZENITH geometric zenith} 232 * 233 * @see #getTzaisGeonim3Point65Degrees() 234 */ 235 protected static final double ZENITH_3_POINT_65 = GEOMETRIC_ZENITH + 3.65; 236 237 protected static final double ZENITH_5_POINT_88 = GEOMETRIC_ZENITH + 5.88; 238 239 private double ateretTorahSunsetOffset = 40; 240 241 public ComplexZmanimCalendar(GeoLocation location) { 242 super(location); 243 } 244 245 /** 246 * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default 247 * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date. 248 * 249 * @see AstronomicalCalendar#AstronomicalCalendar() 250 */ 251 public ComplexZmanimCalendar() { 252 super(); 253 } 254 255 /** 256 * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a 19.8° dip. This calculation 257 * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 258 * when the sun is 19.8° below the eastern geometric horizon before sunrise. Dusk for this is when the sun is 259 * 19.8° below the western geometric horizon after sunset. This day is split into 12 equal parts with each part 260 * being a <em>shaah zmanis</em>. 261 * 262 * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed 263 * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 264 * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE} 265 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 266 */ 267 public long getShaahZmanis19Point8Degrees() { 268 return getTemporalHour(getAlos19Point8Degrees(), getTzais19Point8Degrees()); 269 } 270 271 /** 272 * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a 18° dip. This calculation divides 273 * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is when 274 * the sun is 18° below the eastern geometric horizon before sunrise. Dusk for this is when the sun is 18° 275 * below the western geometric horizon after sunset. This day is split into 12 equal parts with each part being a 276 * <em>shaah zmanis</em>. 277 * 278 * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed 279 * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 280 * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE} 281 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 282 */ 283 public long getShaahZmanis18Degrees() { 284 return getTemporalHour(getAlos18Degrees(), getTzais18Degrees()); 285 } 286 287 /** 288 * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a dip of 26°. This calculation 289 * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 290 * when the sun is {@link #getAlos26Degrees() 26°} below the eastern geometric horizon before sunrise. Dusk for 291 * this is when the sun is {@link #getTzais26Degrees() 26°} below the western geometric horizon after sunset. 292 * This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. 293 * 294 * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed 295 * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 296 * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE} 297 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 298 */ 299 public long getShaahZmanis26Degrees() { 300 return getTemporalHour(getAlos26Degrees(), getTzais26Degrees()); 301 } 302 303 /** 304 * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a dip of 16.1°. This calculation 305 * divides the day based on the opinion that the day runs from dawn to dusk. Dawn for this calculation is when the 306 * sun is 16.1° below the eastern geometric horizon before sunrise and dusk is when the sun is 16.1° below 307 * the western geometric horizon after sunset. This day is split into 12 equal parts with each part being a 308 * <em>shaah zmanis</em>. 309 * 310 * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed 311 * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 312 * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE} 313 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 314 * 315 * @see #getAlos16Point1Degrees() 316 * @see #getTzais16Point1Degrees() 317 * @see #getSofZmanShmaMGA16Point1Degrees() 318 * @see #getSofZmanTfilaMGA16Point1Degrees() 319 * @see #getMinchaGedola16Point1Degrees() 320 * @see #getMinchaKetana16Point1Degrees() 321 * @see #getPlagHamincha16Point1Degrees() 322 */ 323 324 public long getShaahZmanis16Point1Degrees() { 325 return getTemporalHour(getAlos16Point1Degrees(), getTzais16Point1Degrees()); 326 } 327 328 /** 329 * Method to return a <em>shaah zmanis</em> (solar hour) according to the opinion of the MGA. This calculation 330 * divides the day based on the opinion of the <em>MGA</em> that the day runs from dawn to dusk. Dawn for this 331 * calculation is 60 minutes before sunrise and dusk is 60 minutes after sunset. This day is split into 12 equal 332 * parts with each part being a <em>shaah zmanis</em>. Alternate mothods of calculating a <em>shaah zmanis</em> are 333 * available in the subclass {@link ComplexZmanimCalendar} 334 * 335 * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed 336 * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one 337 * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the 338 * {@link AstronomicalCalendar} documentation. 339 */ 340 public long getShaahZmanis60Minutes() { 341 return getTemporalHour(getAlos60(), getTzais60()); 342 } 343 344 /** 345 * Method to return a <em>shaah zmanis</em> (solar hour) according to the opinion of the MGA. This calculation 346 * divides the day based on the opinion of the <em>MGA</em> that the day runs from dawn to dusk. Dawn for this 347 * calculation is 72 minutes before sunrise and dusk is 72 minutes after sunset. This day is split into 12 equal 348 * parts with each part being a <em>shaah zmanis</em>. Alternate mothods of calculating a <em>shaah zmanis</em> are 349 * available in the subclass {@link ComplexZmanimCalendar} 350 * 351 * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed 352 * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one 353 * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the 354 * {@link AstronomicalCalendar} documentation. 355 */ 356 public long getShaahZmanis72Minutes() { 357 return getShaahZmanisMGA(); 358 } 359 360 /** 361 * Method to return a <em>shaah zmanis</em> (temporal hour) according to the opinion of the MGA based on 362 * <em>alos</em> being {@link #getAlos72Zmanis() 72} minutes <em>zmaniyos</em> before {@link #getSunrise() sunrise}. 363 * This calculation divides the day based on the opinion of the <em>MGA</em> that the day runs from dawn to dusk. 364 * Dawn for this calculation is 72 minutes <em>zmaniyos</em> before sunrise and dusk is 72 minutes <em>zmaniyos</em> 365 * after sunset. This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. This is 366 * identical to 1/10th of the day from {@link #getSunrise() sunrise} to {@link #getSunset() sunset}. 367 * 368 * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed 369 * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one 370 * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the 371 * {@link AstronomicalCalendar} documentation. 372 * @see #getAlos72Zmanis() 373 * @see #getTzais72Zmanis() 374 */ 375 public long getShaahZmanis72MinutesZmanis() { 376 return getTemporalHour(getAlos72Zmanis(), getTzais72Zmanis()); 377 } 378 379 /** 380 * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a dip of 90 minutes. This calculation 381 * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 382 * 90 minutes before sunrise and dusk is 90 minutes after sunset. This day is split into 12 equal parts with each 383 * part being a <em>shaah zmanis</em>. 384 * 385 * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed 386 * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one 387 * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the 388 * {@link AstronomicalCalendar} documentation. 389 */ 390 public long getShaahZmanis90Minutes() { 391 return getTemporalHour(getAlos90(), getTzais90()); 392 } 393 394 /** 395 * Method to return a <em>shaah zmanis</em> (temporal hour) according to the opinion of the MGA based on 396 * <em>alos</em> being {@link #getAlos90Zmanis() 90} minutes <em>zmaniyos</em> before {@link #getSunrise() sunrise}. 397 * This calculation divides the day based on the opinion of the <em>MGA</em> that the day runs from dawn to dusk. 398 * Dawn for this calculation is 90 minutes <em>zmaniyos</em> before sunrise and dusk is 90 minutes <em>zmaniyos</em> 399 * after sunset. This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. This is 400 * identical to 1/8th of the day from {@link #getSunrise() sunrise} to {@link #getSunset() sunset}. 401 * 402 * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed 403 * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one 404 * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the 405 * {@link AstronomicalCalendar} documentation. 406 * @see #getAlos90Zmanis() 407 * @see #getTzais90Zmanis() 408 */ 409 public long getShaahZmanis90MinutesZmanis() { 410 return getTemporalHour(getAlos90Zmanis(), getTzais90Zmanis()); 411 } 412 413 /** 414 * Method to return a <em>shaah zmanis</em> (temporal hour) according to the opinion of the MGA based on 415 * <em>alos</em> being {@link #getAlos96Zmanis() 96} minutes <em>zmaniyos</em> before {@link #getSunrise() sunrise}. 416 * This calculation divides the day based on the opinion of the <em>MGA</em> that the day runs from dawn to dusk. 417 * Dawn for this calculation is 96 minutes <em>zmaniyos</em> before sunrise and dusk is 96 minutes <em>zmaniyos</em> 418 * after sunset. This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. This is 419 * identical to 1/7.5th of the day from {@link #getSunrise() sunrise} to {@link #getSunset() sunset}. 420 * 421 * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed 422 * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one 423 * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the 424 * {@link AstronomicalCalendar} documentation. 425 * @see #getAlos96Zmanis() 426 * @see #getTzais96Zmanis() 427 */ 428 public long getShaahZmanis96MinutesZmanis() { 429 return getTemporalHour(getAlos96Zmanis(), getTzais96Zmanis()); 430 } 431 432 /** 433 * Method to return a <em>shaah zmanis</em> (temporal hour) according to the opinion of the 434 * <em>Chacham Yosef Harari-Raful</em> of <em>Yeshivat Ateret Torah</em> calculated with <em>alos</em> being 1/10th 435 * of sunrise to sunset day, or {@link #getAlos72Zmanis() 72} minutes <em>zmaniyos</em> of such a day before 436 * {@link #getSunrise() sunrise}, and <em>tzais</em> is usually calculated as {@link #getTzaisAteretTorah() 40 437 * minutes} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}) after {@link #getSunset() 438 * sunset}. This day is split into 12 equal parts with each part being a <em>shaah zmanis</em>. Note that with this 439 * system, <em>chatzos</em> (mid-day) will not be the point that the sun is {@link #getSunTransit() halfway across 440 * the sky}. 441 * 442 * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed 443 * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one 444 * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the 445 * {@link AstronomicalCalendar} documentation. 446 * @see #getAlos72Zmanis() 447 * @see #getTzaisAteretTorah() 448 * @see #getAteretTorahSunsetOffset() 449 * @see #setAteretTorahSunsetOffset(double) 450 */ 451 public long getShaahZmanisAteretTorah() { 452 return getTemporalHour(getAlos72Zmanis(), getTzaisAteretTorah()); 453 } 454 455 /** 456 * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a dip of 96 minutes. This calculation 457 * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 458 * 96 minutes before sunrise and dusk is 96 minutes after sunset. This day is split into 12 equal parts with each 459 * part being a <em>shaah zmanis</em>. 460 * 461 * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed 462 * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one 463 * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the 464 * {@link AstronomicalCalendar} documentation. 465 */ 466 public long getShaahZmanis96Minutes() { 467 return getTemporalHour(getAlos96(), getTzais96()); 468 } 469 470 /** 471 * Method to return a <em>shaah zmanis</em> (temporal hour) calculated using a dip of 120 minutes. This calculation 472 * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 473 * 120 minutes before sunrise and dusk is 120 minutes after sunset. This day is split into 12 equal parts with each 474 * part being a <em>shaah zmanis</em>. 475 * 476 * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed 477 * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one 478 * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the 479 * {@link AstronomicalCalendar} documentation. 480 */ 481 public long getShaahZmanis120Minutes() { 482 return getTemporalHour(getAlos120(), getTzais120()); 483 } 484 485 /** 486 * Method to return a <em>shaah zmanis</em> (temporal hour) according to the opinion of the MGA based on 487 * <em>alos</em> being {@link #getAlos120Zmanis() 120} minutes <em>zmaniyos</em> before {@link #getSunrise() 488 * sunrise}. This calculation divides the day based on the opinion of the <em>MGA</em> that the day runs from dawn 489 * to dusk. Dawn for this calculation is 120 minutes <em>zmaniyos</em> before sunrise and dusk is 120 minutes 490 * <em>zmaniyos</em> after sunset. This day is split into 12 equal parts with each part being a 491 * <em>shaah zmanis</em>. This is identical to 1/6th of the day from {@link #getSunrise() sunrise} to 492 * {@link #getSunset() sunset}. 493 * 494 * @return the <code>long</code> millisecond length of a <em>shaah zmanis</em>. If the calculation can't be computed 495 * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one 496 * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the 497 * {@link AstronomicalCalendar} documentation. 498 * @see #getAlos120Zmanis() 499 * @see #getTzais120Zmanis() 500 */ 501 public long getShaahZmanis120MinutesZmanis() { 502 return getTemporalHour(getAlos120Zmanis(), getTzais120Zmanis()); 503 } 504 505 /** 506 * This method returns the time of <em>plag hamincha</em> based on sunrise being 120 minutes <em>zmaniyos</em>( 507 * <em>GRA</em> and the <em>Baal Hatanya</em>) or 1/6th of the day before sea level sunrise. This is calculated as 508 * 10.75 hours after {@link #getAlos120Zmanis() dawn}. The formula used is:<br/> 509 * 10.75 * {@link #getShaahZmanis120MinutesZmanis()} after {@link #getAlos120Zmanis() dawn}. 510 * 511 * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 512 * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it 513 * does not set, a null will be returned. See detailed explanation on top of the 514 * {@link AstronomicalCalendar} documentation. 515 * 516 * @see #getShaahZmanis120MinutesZmanis() 517 */ 518 public Date getPlagHamincha120MinutesZmanis() { 519 return getTimeOffset(getAlos120Zmanis(), getShaahZmanis120MinutesZmanis() * 10.75); 520 } 521 522 /** 523 * This method returns the time of <em>plag hamincha</em> according to the <em>Magen Avraham</em> with the day 524 * starting 120 minutes before sunrise and ending 120 minutes after sunset. This is calculated as 10.75 hours after 525 * {@link #getAlos120() dawn 120 minutes}. The formula used is:<br/> 526 * 10.75 {@link #getShaahZmanis120Minutes()} after {@link #getAlos120()}. 527 * 528 * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 529 * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it 530 * does not set, a null will be returned. See detailed explanation on top of the 531 * {@link AstronomicalCalendar} documentation. 532 * 533 * @see #getShaahZmanis120Minutes() 534 */ 535 public Date getPlagHamincha120Minutes() { 536 return getTimeOffset(getAlos120(), getShaahZmanis120Minutes() * 10.75); 537 } 538 539 /** 540 * Method to return <em>alos</em> (dawn) calculated as 60 minutes before {@link #getSeaLevelSunrise() sea level 541 * sunrise}. This is the time to walk the distance of 4 <em>Mil</em> at 15 minutes a <em>Mil</em> (the opinion of 542 * the Chavas Yair. See the Divray Malkiel). Time based offset calculations for <em>alos</em> are based on the 543 * opinion of most <em>Rishonim</em> who stated that the time of the <em>Neshef</em> (time between dawn and sunrise) 544 * does not vary by the time of year or location but purely depends on the time it takes to walk the distance of 4 545 * <em>Mil</em>. 546 * 547 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic 548 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 549 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 550 * documentation. 551 */ 552 public Date getAlos60() { 553 return getTimeOffset(getSeaLevelSunrise(), -60 * MINUTE_MILLIS); 554 } 555 556 /** 557 * Method to return <em>alos</em> (dawn) calculated using 72 minutes <em>zmaniyos</em>( <em>GRA</em> and the 558 * <em>Baal Hatanya</em>) or 1/10th of the day before sea level sunrise. This is based on an 18 minute <em>Mil</em> 559 * so the time for 4 <em>Mil</em> is 72 minutes which is 1/10th of a day (12 * 60 = 720) based on the day starting 560 * at {@link #getSeaLevelSunrise() sea level sunrise} and ending at {@link #getSeaLevelSunset() sea level sunset}. 561 * The actual alculation is {@link #getSeaLevelSunrise()}- ( {@link #getShaahZmanisGra()} * 1.2). This calculation 562 * is used in the calendars published by <em>Hisachdus Harabanim D'Artzos Habris Ve'Canada</em> 563 * 564 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic 565 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 566 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 567 * documentation. 568 * @see #getShaahZmanisGra() 569 */ 570 public Date getAlos72Zmanis() { 571 long shaahZmanis = getShaahZmanisGra(); 572 if (shaahZmanis == Long.MIN_VALUE) { 573 return null; 574 } 575 return getTimeOffset(getSeaLevelSunrise(), (long) (shaahZmanis * -1.2)); 576 } 577 578 /** 579 * Method to return <em>alos</em> (dawn) calculated using 96 minutes before {@link #getSeaLevelSunrise() sea level 580 * sunrise} based on the time to walk the distance of 4 <em>Mil</em> at 24 minutes a <em>Mil</em>. Time based offset 581 * calculations for <em>alos</em> are based on the opinion of most <em>Rishonim</em> who stated that the time of the 582 * <em>Neshef</em> (time between dawn and sunrise) does not vary by the time of year or location but purely depends 583 * on the time it takes to walk the distance of 4 <em>Mil</em>. 584 * 585 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic 586 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 587 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 588 * documentation. 589 */ 590 public Date getAlos96() { 591 return getTimeOffset(getSeaLevelSunrise(), -96 * MINUTE_MILLIS); 592 } 593 594 /** 595 * Method to return <em>alos</em> (dawn) calculated using 90 minutes <em>zmaniyos</em>( <em>GRA</em> and the 596 * <em>Baal Hatanya</em>) or 1/8th of the day before sea level sunrise. This is based on a 22.5 minute <em>Mil</em> 597 * so the time for 4 <em>Mil</em> is 90 minutes which is 1/8th of a day (12 * 60) / 8 = 90 based on the day starting 598 * at {@link #getSunrise() sunrise} and ending at {@link #getSunset() sunset}. The actual calculation is 599 * {@link #getSunrise()} - ( {@link #getShaahZmanisGra()} * 1.5). 600 * 601 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic 602 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 603 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 604 * documentation. 605 * @see #getShaahZmanisGra() 606 */ 607 public Date getAlos90Zmanis() { 608 long shaahZmanis = getShaahZmanisGra(); 609 if (shaahZmanis == Long.MIN_VALUE) { 610 return null; 611 } 612 return getTimeOffset(getSeaLevelSunrise(), (long) (shaahZmanis * -1.5)); 613 } 614 615 /** 616 * Method to return <em>alos</em> (dawn) calculated using 96 minutes <em>zmaniyos</em>( <em>GRA</em> and the 617 * <em>Baal Hatanya</em>) or 1/8th of the day before sea level sunrise. This is based on a 24 minute <em>Mil</em> so 618 * the time for 4 <em>Mil</em> is 96 minutes which is 1/7.5th of a day (12 * 60) / 7.5 = 96 based on the day 619 * starting at {@link #getSunrise() sunrise} and ending at {@link #getSunset() sunset}. The actual calculation is 620 * {@link #getSunrise()} - ( {@link #getShaahZmanisGra()} * 1.6). 621 * 622 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic 623 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 624 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 625 * documentation. 626 * @see #getShaahZmanisGra() 627 */ 628 public Date getAlos96Zmanis() { 629 long shaahZmanis = getShaahZmanisGra(); 630 if (shaahZmanis == Long.MIN_VALUE) { 631 return null; 632 } 633 return getTimeOffset(getSeaLevelSunrise(), (long) (shaahZmanis * -1.6)); 634 } 635 636 /** 637 * Method to return <em>alos</em> (dawn) calculated using 90 minutes before {@link #getSeaLevelSunrise() sea level 638 * sunrise} based on the time to walk the distance of 4 <em>Mil</em> at 22.5 minutes a <em>Mil</em>. Time based 639 * offset calculations for <em>alos</em> are based on the opinion of most <em>Rishonim</em> who stated that the time 640 * of the <em>Neshef</em> (time between dawn and sunrise) does not vary by the time of year or location but purely 641 * depends on the time it takes to walk the distance of 4 <em>Mil</em>. 642 * 643 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic 644 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 645 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 646 * documentation. 647 */ 648 public Date getAlos90() { 649 return getTimeOffset(getSeaLevelSunrise(), -90 * MINUTE_MILLIS); 650 } 651 652 /** 653 * Method to return <em>alos</em> (dawn) calculated using 120 minutes before {@link #getSeaLevelSunrise() sea level 654 * sunrise} (no adjustment for elevation is made) based on the time to walk the distance of 5 <em>Mil</em>( 655 * <em>Ula</em>) at 24 minutes a <em>Mil</em>. Time based offset calculations for <em>alos</em> are based on the 656 * opinion of most <em>Rishonim</em> who stated that the time of the <em>Neshef</em> (time between dawn and sunrise) 657 * does not vary by the time of year or location but purely depends on the time it takes to walk the distance of 5 658 * <em>Mil</em>(<em>Ula</em>). 659 * 660 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic 661 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 662 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 663 * documentation. 664 */ 665 public Date getAlos120() { 666 return getTimeOffset(getSeaLevelSunrise(), -120 * MINUTE_MILLIS); 667 } 668 669 /** 670 * Method to return <em>alos</em> (dawn) calculated using 120 minutes <em>zmaniyos</em>( <em>GRA</em> and the 671 * <em>Baal Hatanya</em>) or 1/6th of the day before sea level sunrise. This is based on a 24 minute <em>Mil</em> so 672 * the time for 5 <em>Mil</em> is 120 minutes which is 1/6th of a day (12 * 60) / 6 = 120 based on the day starting 673 * at {@link #getSunrise() sunrise} and ending at {@link #getSunset() sunset}. The actual calculation is 674 * {@link #getSunrise()} - ( {@link #getShaahZmanisGra()} * 2). 675 * 676 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic 677 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 678 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 679 * documentation. 680 * @see #getShaahZmanisGra() 681 */ 682 public Date getAlos120Zmanis() { 683 long shaahZmanis = getShaahZmanisGra(); 684 if (shaahZmanis == Long.MIN_VALUE) { 685 return null; 686 } 687 return getTimeOffset(getSeaLevelSunrise(), shaahZmanis * -2); 688 } 689 690 /** 691 * A method to return <em>alos</em> (dawn) calculated when the sun is {@link #ZENITH_26_DEGREES 26°} below the 692 * eastern geometric horizon before sunrise. This calculation is based on the same calculation of 693 * {@link #getAlos120() 120 minutes} but uses a degree based calculation instead of 120 exact minutes. This 694 * calculation is based on the position of the sun 120 minutes before sunrise in Jerusalem during the equinox which 695 * calculates to 26° below {@link #GEOMETRIC_ZENITH geometric zenith}. 696 * 697 * @return the <code>Date</code> representing <em>alos</em>. If the calculation can't be computed such as northern 698 * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun 699 * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed 700 * explanation on top of the {@link AstronomicalCalendar} documentation. 701 * @see #ZENITH_26_DEGREES 702 * @see #getAlos120() 703 * @see #getTzais120() 704 */ 705 public Date getAlos26Degrees() { 706 return getSunriseOffsetByDegrees(ZENITH_26_DEGREES); 707 } 708 709 /** 710 * A method to return <em>alos</em> (dawn) calculated when the sun is {@link #ASTRONOMICAL_ZENITH 18°} below the 711 * eastern geometric horizon before sunrise. 712 * 713 * @return the <code>Date</code> representing <em>alos</em>. If the calculation can't be computed such as northern 714 * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun 715 * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed 716 * explanation on top of the {@link AstronomicalCalendar} documentation. 717 * @see #ASTRONOMICAL_ZENITH 718 */ 719 public Date getAlos18Degrees() { 720 return getSunriseOffsetByDegrees(ASTRONOMICAL_ZENITH); 721 } 722 723 /** 724 * Method to return <em>alos</em> (dawn) calculated when the sun is {@link #ZENITH_19_POINT_8 19.8°} below the 725 * eastern geometric horizon before sunrise. This calculation is based on the same calculation of 726 * {@link #getAlos90() 90 minutes} but uses a degree based calculation instead of 90 exact minutes. This calculation 727 * is based on the position of the sun 90 minutes before sunrise in Jerusalem during the equinox which calculates to 728 * 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith} 729 * 730 * @return the <code>Date</code> representing <em>alos</em>. If the calculation can't be computed such as northern 731 * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun 732 * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed 733 * explanation on top of the {@link AstronomicalCalendar} documentation. 734 * @see #ZENITH_19_POINT_8 735 * @see #getAlos90() 736 */ 737 public Date getAlos19Point8Degrees() { 738 return getSunriseOffsetByDegrees(ZENITH_19_POINT_8); 739 } 740 741 /** 742 * Method to return <em>alos</em> (dawn) calculated when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the 743 * eastern geometric horizon before sunrise. This calculation is based on the same calculation of 744 * {@link #getAlos72() 72 minutes} but uses a degree based calculation instead of 72 exact minutes. This calculation 745 * is based on the position of the sun 72 minutes before sunrise in Jerusalem during the equinox which calculates to 746 * 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}. 747 * 748 * @return the <code>Date</code> representing <em>alos</em>. If the calculation can't be computed such as northern 749 * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun 750 * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed 751 * explanation on top of the {@link AstronomicalCalendar} documentation. 752 * @see #ZENITH_16_POINT_1 753 * @see #getAlos72() 754 */ 755 public Date getAlos16Point1Degrees() { 756 return getSunriseOffsetByDegrees(ZENITH_16_POINT_1); 757 } 758 759 /** 760 * This method returns <em>misheyakir</em> based on the position of the sun when it is {@link #ZENITH_11_DEGREES 761 * 11.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating 762 * <em>misheyakir</em> according to some opinions. This calculation is based on the position of the sun 52 minutes 763 * before {@link #getSunrise sunrise} in Jerusalem during the equinox which calculates to 11.5° below 764 * {@link #GEOMETRIC_ZENITH geometric zenith} 765 * 766 * @return the <code>Date</code> of <em>misheyakir</em>. If the calculation can't be computed such as northern and 767 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may 768 * not reach low enough below the horizon for this calculation, a null will be returned. See detailed 769 * explanation on top of the {@link AstronomicalCalendar} documentation. 770 * @see #ZENITH_11_POINT_5 771 */ 772 public Date getMisheyakir11Point5Degrees() { 773 return getSunriseOffsetByDegrees(ZENITH_11_POINT_5); 774 } 775 776 /** 777 * This method returns <em>misheyakir</em> based on the position of the sun when it is {@link #ZENITH_11_DEGREES 778 * 11°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating 779 * <em>misheyakir</em> according to some opinions. This calculation is based on the position of the sun 48 minutes 780 * before {@link #getSunrise sunrise} in Jerusalem during the equinox which calculates to 11° below 781 * {@link #GEOMETRIC_ZENITH geometric zenith} 782 * 783 * @return If the calculation can't be computed such as northern and southern locations even south of the Arctic 784 * Circle and north of the Antarctic Circle where the sun may not reach low enough below the horizon for 785 * this calculation, a null will be returned. See detailed explanation on top of the 786 * {@link AstronomicalCalendar} documentation. 787 * @see #ZENITH_11_DEGREES 788 */ 789 public Date getMisheyakir11Degrees() { 790 return getSunriseOffsetByDegrees(ZENITH_11_DEGREES); 791 } 792 793 /** 794 * This method returns <em>misheyakir</em> based on the position of the sun when it is {@link #ZENITH_10_POINT_2 795 * 10.2°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating 796 * <em>misheyakir</em> according to some opinions. This calculation is based on the position of the sun 45 minutes 797 * before {@link #getSunrise sunrise} in Jerusalem during the equinox which calculates to 10.2° below 798 * {@link #GEOMETRIC_ZENITH geometric zenith} 799 * 800 * @return the <code>Date</code> of the latest <em>misheyakir</em>. If the calculation can't be computed such as 801 * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 802 * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See 803 * detailed explanation on top of the {@link AstronomicalCalendar} documentation. 804 * @see #ZENITH_10_POINT_2 805 */ 806 public Date getMisheyakir10Point2Degrees() { 807 return getSunriseOffsetByDegrees(ZENITH_10_POINT_2); 808 } 809 810 /** 811 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the 812 * opinion of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos19Point8Degrees() 19.8°} before 813 * {@link #getSunrise() sunrise}. This time is 3 <em>{@link #getShaahZmanis19Point8Degrees() shaos zmaniyos}</em> 814 * (solar hours) after {@link #getAlos19Point8Degrees() dawn} based on the opinion of the <em>MGA</em> that the day 815 * is calculated from dawn to nightfall with both being 19.8° below sunrise or sunset. This returns the time of 816 * 3 * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}. 817 * 818 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 819 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 820 * where the sun may not reach low enough below the horizon for this calculation, a null will be returned. 821 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 822 * @see #getShaahZmanis19Point8Degrees() 823 * @see #getAlos19Point8Degrees() 824 */ 825 public Date getSofZmanShmaMGA19Point8Degrees() { 826 return getTimeOffset(getAlos19Point8Degrees(), getShaahZmanis19Point8Degrees() * 3); 827 } 828 829 /** 830 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the 831 * opinion of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos16Point1Degrees() 16.1°} before 832 * {@link #getSunrise() sunrise}. This time is 3 <em>{@link #getShaahZmanis16Point1Degrees() shaos zmaniyos}</em> 833 * (solar hours) after {@link #getAlos16Point1Degrees() dawn} based on the opinion of the <em>MGA</em> that the day 834 * is calculated from dawn to nightfall with both being 16.1° below sunrise or sunset. This returns the time of 835 * 3 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}. 836 * 837 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 838 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 839 * where the sun may not reach low enough below the horizon for this calculation, a null will be returned. 840 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 841 * @see #getShaahZmanis16Point1Degrees() 842 * @see #getAlos16Point1Degrees() 843 */ 844 public Date getSofZmanShmaMGA16Point1Degrees() { 845 return getTimeOffset(getAlos16Point1Degrees(), getShaahZmanis16Point1Degrees() * 3); 846 } 847 848 /** 849 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the 850 * opinion of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos72() 72} minutes before 851 * {@link #getSunrise() sunrise}. This time is 3 <em>{@link #getShaahZmanis72Minutes() shaos zmaniyos}</em> (solar 852 * hours) after {@link #getAlos72() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a 853 * {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link #getTzais72() nightfall} of 72 minutes after 854 * sunset. This returns the time of 3 * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This 855 * class returns an identical time to {@link #getSofZmanShmaMGA()} and is repeated here for clarity. 856 * 857 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 858 * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where 859 * it does not set, a null will be returned. See detailed explanation on top of the 860 * {@link AstronomicalCalendar} documentation. 861 * @see #getShaahZmanis72Minutes() 862 * @see #getAlos72() 863 * @see #getSofZmanShmaMGA() 864 */ 865 public Date getSofZmanShmaMGA72Minutes() { 866 return getSofZmanShmaMGA(); 867 } 868 869 /** 870 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the 871 * opinion of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos72Zmanis() 72} minutes <em>zmaniyos</em> 872 * , or 1/10th of the day before {@link #getSunrise() sunrise}. This time is 3 873 * <em>{@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos}</em> (solar hours) after {@link #getAlos72Zmanis() 874 * dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a {@link #getAlos72Zmanis() dawn} 875 * of 72 minutes <em>zmaniyos</em>, or 1/10th of the day before {@link #getSeaLevelSunrise() sea level sunrise} to 876 * {@link #getTzais72Zmanis() nightfall} of 72 minutes <em>zmaniyos</em> after {@link #getSeaLevelSunset() sea level 877 * sunset}. This returns the time of 3 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() 878 * dawn}. 879 * 880 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 881 * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where 882 * it does not set, a null will be returned. See detailed explanation on top of the 883 * {@link AstronomicalCalendar} documentation. 884 * @see #getShaahZmanis72MinutesZmanis() 885 * @see #getAlos72Zmanis() 886 */ 887 public Date getSofZmanShmaMGA72MinutesZmanis() { 888 return getTimeOffset(getAlos72Zmanis(), getShaahZmanis72MinutesZmanis() * 3); 889 } 890 891 /** 892 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the 893 * opinion of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos90() 90} minutes before 894 * {@link #getSunrise() sunrise}. This time is 3 <em>{@link #getShaahZmanis90Minutes() shaos zmaniyos}</em> (solar 895 * hours) after {@link #getAlos90() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a 896 * {@link #getAlos90() dawn} of 90 minutes before sunrise to {@link #getTzais90() nightfall} of 90 minutes after 897 * sunset. This returns the time of 3 * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}. 898 * 899 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 900 * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where 901 * it does not set, a null will be returned. See detailed explanation on top of the 902 * {@link AstronomicalCalendar} documentation. 903 * @see #getShaahZmanis90Minutes() 904 * @see #getAlos90() 905 */ 906 public Date getSofZmanShmaMGA90Minutes() { 907 return getTimeOffset(getAlos90(), getShaahZmanis90Minutes() * 3); 908 } 909 910 /** 911 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the 912 * opinion of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos90Zmanis() 90} minutes <em>zmaniyos</em> 913 * before {@link #getSunrise() sunrise}. This time is 3 914 * <em>{@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos}</em> (solar hours) after {@link #getAlos90Zmanis() 915 * dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a {@link #getAlos90Zmanis() dawn} 916 * of 90 minutes <em>zmaniyos</em> before sunrise to {@link #getTzais90Zmanis() nightfall} of 90 minutes 917 * <em>zmaniyos</em> after sunset. This returns the time of 3 * {@link #getShaahZmanis90MinutesZmanis()} after 918 * {@link #getAlos90Zmanis() dawn}. 919 * 920 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 921 * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where 922 * it does not set, a null will be returned. See detailed explanation on top of the 923 * {@link AstronomicalCalendar} documentation. 924 * @see #getShaahZmanis90MinutesZmanis() 925 * @see #getAlos90Zmanis() 926 */ 927 public Date getSofZmanShmaMGA90MinutesZmanis() { 928 return getTimeOffset(getAlos90Zmanis(), getShaahZmanis90MinutesZmanis() * 3); 929 } 930 931 /** 932 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the 933 * opinion of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos96() 96} minutes before 934 * {@link #getSunrise() sunrise}. This time is 3 <em>{@link #getShaahZmanis96Minutes() shaos zmaniyos}</em> (solar 935 * hours) after {@link #getAlos96() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a 936 * {@link #getAlos96() dawn} of 96 minutes before sunrise to {@link #getTzais96() nightfall} of 96 minutes after 937 * sunset. This returns the time of 3 * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}. 938 * 939 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 940 * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where 941 * it does not set, a null will be returned. See detailed explanation on top of the 942 * {@link AstronomicalCalendar} documentation. 943 * @see #getShaahZmanis96Minutes() 944 * @see #getAlos96() 945 */ 946 public Date getSofZmanShmaMGA96Minutes() { 947 return getTimeOffset(getAlos96(), getShaahZmanis96Minutes() * 3); 948 } 949 950 /** 951 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the 952 * opinion of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos90Zmanis() 96} minutes <em>zmaniyos</em> 953 * before {@link #getSunrise() sunrise}. This time is 3 954 * <em>{@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos}</em> (solar hours) after {@link #getAlos96Zmanis() 955 * dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a {@link #getAlos96Zmanis() dawn} 956 * of 96 minutes <em>zmaniyos</em> before sunrise to {@link #getTzais90Zmanis() nightfall} of 96 minutes 957 * <em>zmaniyos</em> after sunset. This returns the time of 3 * {@link #getShaahZmanis96MinutesZmanis()} after 958 * {@link #getAlos96Zmanis() dawn}. 959 * 960 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 961 * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where 962 * it does not set, a null will be returned. See detailed explanation on top of the 963 * {@link AstronomicalCalendar} documentation. 964 * @see #getShaahZmanis96MinutesZmanis() 965 * @see #getAlos96Zmanis() 966 */ 967 public Date getSofZmanShmaMGA96MinutesZmanis() { 968 return getTimeOffset(getAlos96Zmanis(), getShaahZmanis96MinutesZmanis() * 3); 969 } 970 971 /** 972 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) calculated as 3 973 * hours (regular and not zmaniyos) before {@link ZmanimCalendar#getChatzos()}. This is the opinion of the 974 * <em>Shach</em> in the <em>Nekudas Hakesef (Yora Deah 184), Shevus Yaakov, Chasan Sofer</em> and others. This 975 * returns the time of 3 hours before {@link ZmanimCalendar#getChatzos()}. 976 * 977 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 978 * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where 979 * it does not set, a null will be returned. See detailed explanation on top of the 980 * {@link AstronomicalCalendar} documentation. 981 * @see ZmanimCalendar#getChatzos() 982 * @see #getSofZmanTfila2HoursBeforeChatzos() 983 */ 984 public Date getSofZmanShma3HoursBeforeChatzos() { 985 return getTimeOffset(getChatzos(), -180 * MINUTE_MILLIS); 986 } 987 988 /** 989 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the 990 * opinion of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos120() 120} minutes or 1/6th of the day 991 * before {@link #getSunrise() sunrise}. This time is 3 <em>{@link #getShaahZmanis120Minutes() shaos zmaniyos}</em> 992 * (solar hours) after {@link #getAlos120() dawn} based on the opinion of the <em>MGA</em> that the day is 993 * calculated from a {@link #getAlos120() dawn} of 120 minutes before sunrise to {@link #getTzais120() nightfall} of 994 * 120 minutes after sunset. This returns the time of 3 * {@link #getShaahZmanis120Minutes()} after 995 * {@link #getAlos120() dawn}. 996 * 997 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 998 * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where 999 * it does not set, a null will be returned. See detailed explanation on top of the 1000 * {@link AstronomicalCalendar} documentation. 1001 * @see #getShaahZmanis120Minutes() 1002 * @see #getAlos120() 1003 */ 1004 public Date getSofZmanShmaMGA120Minutes() { 1005 return getTimeOffset(getAlos120(), getShaahZmanis120Minutes() * 3); 1006 } 1007 1008 /** 1009 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) based on the 1010 * opinion that the day starts at <em>{@link #getAlos16Point1Degrees() alos 16.1°}</em> and ends at 1011 * {@link #getSeaLevelSunset() sea level sunset}. 3 shaos zmaniyos are calculated based on this day and added to 1012 * {@link #getAlos16Point1Degrees() alos}to reach this time. This time is 3 <em>shaos zmaniyos</em> (solar hours) 1013 * after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a 1014 * <em>{@link #getAlos16Point1Degrees() alos 16.1°}</em> to {@link #getSeaLevelSunset() sea level sunset}.<br /> 1015 * <b>Note: </b> Based on this calculation <em>chatzos</em> will not be at midday. 1016 * 1017 * @return the <code>Date</code> of the latest <em>zman krias shema</em> based on this day. If the calculation can't 1018 * be computed such as northern and southern locations even south of the Arctic Circle and north of the 1019 * Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a null 1020 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1021 * @see #getAlos16Point1Degrees() 1022 * @see #getSeaLevelSunset() 1023 */ 1024 public Date getSofZmanShmaAlos16Point1ToSunset() { 1025 long shaahZmanis = getTemporalHour(getAlos16Point1Degrees(), getSeaLevelSunset()); 1026 return getTimeOffset(getAlos16Point1Degrees(), shaahZmanis * 3); 1027 } 1028 1029 /** 1030 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) based on the 1031 * opinion that the day starts at <em>{@link #getAlos16Point1Degrees() alos 16.1°}</em> and ends at 1032 * <em> {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}</em>. 3 <em>shaos zmaniyos</em> are calculated 1033 * based on this day and added to <em>{@link #getAlos16Point1Degrees() alos}</em> to reach this time. This time is 3 1034 * <em>shaos zmaniyos</em> (temporal hours) after <em>{@link #getAlos16Point1Degrees() alos 16.1°}</em> based on 1035 * the opinion that the day is calculated from a <em>{@link #getAlos16Point1Degrees() alos 16.1°}</em> to 1036 * <em>{@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}</em>.<br /> 1037 * <b>Note: </b> Based on this calculation <em>chatzos</em> will not be at midday. 1038 * 1039 * @return the <code>Date</code> of the latest <em>zman krias shema</em> based on this calculation. If the 1040 * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and 1041 * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this 1042 * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 1043 * documentation. 1044 * @see #getAlos16Point1Degrees() 1045 * @see #getTzaisGeonim7Point083Degrees() 1046 */ 1047 public Date getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees() { 1048 long shaahZmanis = getTemporalHour(getAlos16Point1Degrees(), getTzaisGeonim7Point083Degrees()); 1049 return getTimeOffset(getAlos16Point1Degrees(), shaahZmanis * 3); 1050 } 1051 1052 /** 1053 * From the GRA in Kol Eliyahu on Berachos #173 that states that <em>zman krias shema</em> is calculated as half the 1054 * time from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getFixedLocalChatzos() fixed local chatzos}. 1055 * The GRA himself seems to contradict this when he stated that <em>zman krias shema</em> is 1/4 of the day from 1056 * sunrise to sunset. See <em>Sarah Lamoed</em> #25 in Yisroel Vehazmanim Vol III page 1016. 1057 * 1058 * @return the <code>Date</code> of the latest <em>zman krias shema</em> based on this calculation. If the 1059 * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where 1060 * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation 1061 * on top of the {@link AstronomicalCalendar} documentation. 1062 * @see #getFixedLocalChatzos() 1063 */ 1064 public Date getSofZmanShmaKolEliyahu() { 1065 Date chatzos = getFixedLocalChatzos(); 1066 if (chatzos == null || getSunrise() == null) { 1067 return null; 1068 } 1069 long diff = (chatzos.getTime() - getSeaLevelSunrise().getTime()) / 2; 1070 return getTimeOffset(chatzos, -diff); 1071 } 1072 1073 /** 1074 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion 1075 * of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos19Point8Degrees() 19.8°} before 1076 * {@link #getSunrise() sunrise}. This time is 4 <em>{@link #getShaahZmanis19Point8Degrees() shaos zmaniyos}</em> 1077 * (solar hours) after {@link #getAlos19Point8Degrees() dawn} based on the opinion of the <em>MGA</em> that the day 1078 * is calculated from dawn to nightfall with both being 19.8° below sunrise or sunset. This returns the time of 1079 * 4 * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}. 1080 * 1081 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1082 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 1083 * where the sun may not reach low enough below the horizon for this calculation, a null will be returned. 1084 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1085 * 1086 * @see #getShaahZmanis19Point8Degrees() 1087 * @see #getAlos19Point8Degrees() 1088 */ 1089 public Date getSofZmanTfilaMGA19Point8Degrees() { 1090 return getTimeOffset(getAlos19Point8Degrees(), getShaahZmanis19Point8Degrees() * 4); 1091 } 1092 1093 /** 1094 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion 1095 * of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos16Point1Degrees() 16.1°} before 1096 * {@link #getSunrise() sunrise}. This time is 4 <em>{@link #getShaahZmanis16Point1Degrees() shaos zmaniyos}</em> 1097 * (solar hours) after {@link #getAlos16Point1Degrees() dawn} based on the opinion of the <em>MGA</em> that the day 1098 * is calculated from dawn to nightfall with both being 16.1° below sunrise or sunset. This returns the time of 1099 * 4 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}. 1100 * 1101 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1102 * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle 1103 * where the sun may not reach low enough below the horizon for this calculation, a null will be returned. 1104 * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1105 * 1106 * @see #getShaahZmanis16Point1Degrees() 1107 * @see #getAlos16Point1Degrees() 1108 */ 1109 public Date getSofZmanTfilaMGA16Point1Degrees() { 1110 return getTimeOffset(getAlos16Point1Degrees(), getShaahZmanis16Point1Degrees() * 4); 1111 } 1112 1113 /** 1114 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion 1115 * of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos72() 72} minutes before {@link #getSunrise() 1116 * sunrise}. This time is 4 <em>{@link #getShaahZmanis72Minutes() shaos zmaniyos}</em> (solar hours) after 1117 * {@link #getAlos72() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a 1118 * {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link #getTzais72() nightfall} of 72 minutes after 1119 * sunset. This returns the time of 4 * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This 1120 * class returns an identical time to {@link #getSofZmanTfilaMGA()} and is repeated here for clarity. 1121 * 1122 * @return the <code>Date</code> of the latest <em>zman tfila</em>. If the calculation can't be computed such as in 1123 * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it 1124 * does not set, a null will be returned. See detailed explanation on top of the 1125 * {@link AstronomicalCalendar} documentation. 1126 * @see #getShaahZmanis72Minutes() 1127 * @see #getAlos72() 1128 * @see #getSofZmanShmaMGA() 1129 */ 1130 public Date getSofZmanTfilaMGA72Minutes() { 1131 return getSofZmanTfilaMGA(); 1132 } 1133 1134 /** 1135 * This method returns the latest <em>zman tfila</em> (time to the morning prayers) according to the opinion of the 1136 * <em>MGA</em> based on <em>alos</em> being {@link #getAlos72Zmanis() 72} minutes <em>zmaniyos</em> before 1137 * {@link #getSunrise() sunrise}. This time is 4 <em>{@link #getShaahZmanis72MinutesZmanis() shaos zmaniyos}</em> 1138 * (solar hours) after {@link #getAlos72Zmanis() dawn} based on the opinion of the <em>MGA</em> that the day is 1139 * calculated from a {@link #getAlos72Zmanis() dawn} of 72 minutes <em>zmaniyos</em> before sunrise to 1140 * {@link #getTzais72Zmanis() nightfall} of 72 minutes <em>zmaniyos</em> after sunset. This returns the time of 4 * 1141 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}. 1142 * 1143 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1144 * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where 1145 * it does not set, a null will be returned. See detailed explanation on top of the 1146 * {@link AstronomicalCalendar} documentation. 1147 * @see #getShaahZmanis72MinutesZmanis() 1148 * @see #getAlos72Zmanis() 1149 */ 1150 public Date getSofZmanTfilaMGA72MinutesZmanis() { 1151 return getTimeOffset(getAlos72Zmanis(), getShaahZmanis72MinutesZmanis() * 4); 1152 } 1153 1154 /** 1155 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion 1156 * of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos90() 90} minutes before {@link #getSunrise() 1157 * sunrise}. This time is 4 <em>{@link #getShaahZmanis90Minutes() shaos zmaniyos}</em> (solar hours) after 1158 * {@link #getAlos90() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a 1159 * {@link #getAlos90() dawn} of 90 minutes before sunrise to {@link #getTzais90() nightfall} of 90 minutes after 1160 * sunset. This returns the time of 4 * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}. 1161 * 1162 * @return the <code>Date</code> of the latest <em>zman tfila</em>. If the calculation can't be computed such as in 1163 * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it 1164 * does not set, a null will be returned. See detailed explanation on top of the 1165 * {@link AstronomicalCalendar} documentation. 1166 * @see #getShaahZmanis90Minutes() 1167 * @see #getAlos90() 1168 */ 1169 public Date getSofZmanTfilaMGA90Minutes() { 1170 return getTimeOffset(getAlos90(), getShaahZmanis90Minutes() * 4); 1171 } 1172 1173 /** 1174 * This method returns the latest <em>zman tfila</em> (time to the morning prayers) according to the opinion of the 1175 * <em>MGA</em> based on <em>alos</em> being {@link #getAlos90Zmanis() 90} minutes <em>zmaniyos</em> before 1176 * {@link #getSunrise() sunrise}. This time is 4 <em>{@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos}</em> 1177 * (solar hours) after {@link #getAlos90Zmanis() dawn} based on the opinion of the <em>MGA</em> that the day is 1178 * calculated from a {@link #getAlos90Zmanis() dawn} of 90 minutes <em>zmaniyos</em> before sunrise to 1179 * {@link #getTzais90Zmanis() nightfall} of 90 minutes <em>zmaniyos</em> after sunset. This returns the time of 4 * 1180 * {@link #getShaahZmanis90MinutesZmanis()} after {@link #getAlos90Zmanis() dawn}. 1181 * 1182 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1183 * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where 1184 * it does not set, a null will be returned. See detailed explanation on top of the 1185 * {@link AstronomicalCalendar} documentation. 1186 * @see #getShaahZmanis90MinutesZmanis() 1187 * @see #getAlos90Zmanis() 1188 */ 1189 public Date getSofZmanTfilaMGA90MinutesZmanis() { 1190 return getTimeOffset(getAlos90Zmanis(), getShaahZmanis90MinutesZmanis() * 4); 1191 } 1192 1193 /** 1194 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion 1195 * of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos96() 96} minutes before {@link #getSunrise() 1196 * sunrise}. This time is 4 <em>{@link #getShaahZmanis96Minutes() shaos zmaniyos}</em> (solar hours) after 1197 * {@link #getAlos96() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a 1198 * {@link #getAlos96() dawn} of 96 minutes before sunrise to {@link #getTzais96() nightfall} of 96 minutes after 1199 * sunset. This returns the time of 4 * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}. 1200 * 1201 * @return the <code>Date</code> of the latest <em>zman tfila</em>. If the calculation can't be computed such as in 1202 * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it 1203 * does not set, a null will be returned. See detailed explanation on top of the 1204 * {@link AstronomicalCalendar} documentation. 1205 * @see #getShaahZmanis96Minutes() 1206 * @see #getAlos96() 1207 */ 1208 public Date getSofZmanTfilaMGA96Minutes() { 1209 return getTimeOffset(getAlos96(), getShaahZmanis96Minutes() * 4); 1210 } 1211 1212 /** 1213 * This method returns the latest <em>zman tfila</em> (time to the morning prayers) according to the opinion of the 1214 * <em>MGA</em> based on <em>alos</em> being {@link #getAlos96Zmanis() 96} minutes <em>zmaniyos</em> before 1215 * {@link #getSunrise() sunrise}. This time is 4 <em>{@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos}</em> 1216 * (solar hours) after {@link #getAlos96Zmanis() dawn} based on the opinion of the <em>MGA</em> that the day is 1217 * calculated from a {@link #getAlos96Zmanis() dawn} of 96 minutes <em>zmaniyos</em> before sunrise to 1218 * {@link #getTzais96Zmanis() nightfall} of 96 minutes <em>zmaniyos</em> after sunset. This returns the time of 4 * 1219 * {@link #getShaahZmanis96MinutesZmanis()} after {@link #getAlos96Zmanis() dawn}. 1220 * 1221 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1222 * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where 1223 * it does not set, a null will be returned. See detailed explanation on top of the 1224 * {@link AstronomicalCalendar} documentation. 1225 * @see #getShaahZmanis90MinutesZmanis() 1226 * @see #getAlos90Zmanis() 1227 */ 1228 public Date getSofZmanTfilaMGA96MinutesZmanis() { 1229 return getTimeOffset(getAlos96Zmanis(), getShaahZmanis96MinutesZmanis() * 4); 1230 } 1231 1232 /** 1233 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) according to the opinion 1234 * of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos120() 120} minutes before {@link #getSunrise() 1235 * sunrise} . This time is 4 <em>{@link #getShaahZmanis120Minutes() shaos zmaniyos}</em> (solar hours) after 1236 * {@link #getAlos120() dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a 1237 * {@link #getAlos120() dawn} of 120 minutes before sunrise to {@link #getTzais120() nightfall} of 120 minutes after 1238 * sunset. This returns the time of 4 * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. 1239 * 1240 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1241 * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where 1242 * it does not set, a null will be returned. See detailed explanation on top of the 1243 * {@link AstronomicalCalendar} documentation. 1244 * @see #getShaahZmanis120Minutes() 1245 * @see #getAlos120() 1246 */ 1247 public Date getSofZmanTfilaMGA120Minutes() { 1248 return getTimeOffset(getAlos120(), getShaahZmanis120Minutes() * 4); 1249 } 1250 1251 /** 1252 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) calculated as 2 hours 1253 * before {@link ZmanimCalendar#getChatzos()}. This is based on the opinions that calculate 1254 * <em>sof zman krias shema</em> as {@link #getSofZmanShma3HoursBeforeChatzos()}. This returns the time of 2 hours 1255 * before {@link ZmanimCalendar#getChatzos()}. 1256 * 1257 * @return the <code>Date</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such 1258 * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where 1259 * it does not set, a null will be returned. See detailed explanation on top of the 1260 * {@link AstronomicalCalendar} documentation. 1261 * @see ZmanimCalendar#getChatzos() 1262 * @see #getSofZmanShma3HoursBeforeChatzos() 1263 */ 1264 public Date getSofZmanTfila2HoursBeforeChatzos() { 1265 return getTimeOffset(getChatzos(), -120 * MINUTE_MILLIS); 1266 } 1267 1268 /** 1269 * This method returns mincha gedola calculated as 30 minutes after <em>{@link #getChatzos() chatzos}</em> and not 1270 * 1/2 of a <em>{@link #getShaahZmanisGra() shaah zmanis}</em> after <em>{@link #getChatzos() chatzos}</em> as 1271 * calculated by {@link #getMinchaGedola}. Some use this time to delay the start of mincha in the winter when 1/2 of 1272 * a <em>{@link #getShaahZmanisGra() shaah zmanis}</em> is less than 30 minutes. See 1273 * {@link #getMinchaGedolaGreaterThan30()}for a conveniance method that returns the later of the 2 calculations. One 1274 * should not use this time to start <em>mincha</em> before the standard 1275 * <em>{@link #getMinchaGedola() mincha gedola}</em>. See <em>Shulchan Aruch 1276 * Orach Chayim Siman Raish Lamed Gimel seif alef</em> and the <em>Shaar Hatziyon seif katan ches</em>. 1277 * 1278 * @return the <code>Date</code> of 30 mintes after <em>chatzos</em>. If the calculation can't be computed such as 1279 * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it 1280 * does not set, a null will be returned. See detailed explanation on top of the 1281 * {@link AstronomicalCalendar} documentation. 1282 * @see #getMinchaGedola() 1283 * @see #getMinchaGedolaGreaterThan30() 1284 */ 1285 public Date getMinchaGedola30Minutes() { 1286 return getTimeOffset(getChatzos(), MINUTE_MILLIS * 30); 1287 } 1288 1289 /** 1290 * This method returns the time of <em>mincha gedola</em> according to the Magen Avraham with the day starting 72 1291 * minutes before sunrise and ending 72 minutes after sunset. This is the earliest time to pray <em>mincha</em>. For 1292 * more information on this see the documentation on <em>{@link #getMinchaGedola() mincha gedola}</em>. This is 1293 * calculated as 6.5 {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 * 1294 * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}. 1295 * 1296 * @see #getAlos72() 1297 * @see #getMinchaGedola() 1298 * @see #getMinchaKetana() 1299 * @see ZmanimCalendar#getMinchaGedola() 1300 * @return the <code>Date</code> of the time of mincha gedola. If the calculation can't be computed such as in the 1301 * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does 1302 * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 1303 * documentation. 1304 */ 1305 public Date getMinchaGedola72Minutes() { 1306 return getTimeOffset(getAlos72(), getShaahZmanis72Minutes() * 6.5); 1307 } 1308 1309 /** 1310 * This method returns the time of <em>mincha gedola</em> according to the Magen Avraham with the day starting and 1311 * ending 16.1° below the horizon. This is the earliest time to pray <em>mincha</em>. For more information on 1312 * this see the documentation on <em>{@link #getMinchaGedola() mincha gedola}</em>. This is calculated as 6.5 1313 * {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 * 1314 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}. 1315 * 1316 * @see #getShaahZmanis16Point1Degrees() 1317 * @see #getMinchaGedola() 1318 * @see #getMinchaKetana() 1319 * @return the <code>Date</code> of the time of mincha gedola. If the calculation can't be computed such as northern 1320 * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun 1321 * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed 1322 * explanation on top of the {@link AstronomicalCalendar} documentation. 1323 */ 1324 public Date getMinchaGedola16Point1Degrees() { 1325 return getTimeOffset(getAlos16Point1Degrees(), getShaahZmanis16Point1Degrees() * 6.5); 1326 } 1327 1328 /** 1329 * This is a conveniance methd that returns the later of {@link #getMinchaGedola()} and 1330 * {@link #getMinchaGedola30Minutes()}. In the winter when a <em>{@link #getShaahZmanisGra() shaah zmanis}</em> is 1331 * less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise {@link #getMinchaGedola()} 1332 * will be returned. 1333 * 1334 * @return the <code>Date</code> of the later of {@link #getMinchaGedola()} and {@link #getMinchaGedola30Minutes()}. 1335 * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year 1336 * where the sun does not rise, and one where it does not set, a null will be returned. See detailed 1337 * explanation on top of the {@link AstronomicalCalendar} documentation. 1338 */ 1339 public Date getMinchaGedolaGreaterThan30() { 1340 if (getMinchaGedola30Minutes() == null || getMinchaGedola() == null) { 1341 return null; 1342 } else { 1343 return getMinchaGedola30Minutes().compareTo(getMinchaGedola()) > 0 ? getMinchaGedola30Minutes() 1344 : getMinchaGedola(); 1345 } 1346 } 1347 1348 /** 1349 * This method returns the time of <em>mincha ketana</em> according to the <em>Magen Avraham</em> with the day 1350 * starting and ending 16.1° below the horizon. This is the perfered earliest time to pray <em>mincha</em> 1351 * according to the opinion of the <em>Rambam</em> and others. For more information on this see the documentation on 1352 * <em>{@link #getMinchaGedola() mincha gedola}</em>. This is calculated as 9.5 {@link #getTemporalHour() solar 1353 * hours} after alos. The calculation used is 9.5 * {@link #getShaahZmanis16Point1Degrees()} after 1354 * {@link #getAlos16Point1Degrees() alos}. 1355 * 1356 * @see #getShaahZmanis16Point1Degrees() 1357 * @see #getMinchaGedola() 1358 * @see #getMinchaKetana() 1359 * @return the <code>Date</code> of the time of mincha ketana. If the calculation can't be computed such as northern 1360 * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun 1361 * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed 1362 * explanation on top of the {@link AstronomicalCalendar} documentation. 1363 */ 1364 public Date getMinchaKetana16Point1Degrees() { 1365 return getTimeOffset(getAlos16Point1Degrees(), getShaahZmanis16Point1Degrees() * 9.5); 1366 } 1367 1368 /** 1369 * This method returns the time of <em>mincha ketana</em> according to the <em>Magen Avraham</em> with the day 1370 * starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the perfered earliest time to pray 1371 * <em>mincha</em> according to the opinion of the <em>Rambam</em> and others. For more information on this see the 1372 * documentation on <em>{@link #getMinchaGedola() mincha gedola}</em>. This is calculated as 9.5 1373 * {@link #getShaahZmanis72Minutes()} after <em>alos</em>. The calculation used is 9.5 * 1374 * {@link #getShaahZmanis72Minutes()} after <em>{@link #getAlos72() alos}</em>. 1375 * 1376 * @see #getShaahZmanis16Point1Degrees() 1377 * @see #getMinchaGedola() 1378 * @see #getMinchaKetana() 1379 * @return the <code>Date</code> of the time of mincha ketana. If the calculation can't be computed such as in the 1380 * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does 1381 * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 1382 * documentation. 1383 */ 1384 public Date getMinchaKetana72Minutes() { 1385 return getTimeOffset(getAlos72(), getShaahZmanis72Minutes() * 9.5); 1386 } 1387 1388 /** 1389 * This method returns the time of <em>plag hamincha</em> according to the <em>Magen Avraham</em> with the day 1390 * starting 60 minutes before sunrise and ending 60 minutes after sunset. This is calculated as 10.75 hours after 1391 * {@link #getAlos60() dawn}. The formula used is:<br/> 1392 * 10.75 {@link #getShaahZmanis60Minutes()} after {@link #getAlos60()}. 1393 * 1394 * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1395 * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it 1396 * does not set, a null will be returned. See detailed explanation on top of the 1397 * {@link AstronomicalCalendar} documentation. 1398 * 1399 * @see #getShaahZmanis60Minutes() 1400 */ 1401 public Date getPlagHamincha60Minutes() { 1402 return getTimeOffset(getAlos60(), getShaahZmanis60Minutes() * 10.75); 1403 } 1404 1405 /** 1406 * This method returns the time of <em>plag hamincha</em> according to the <em>Magen Avraham</em> with the day 1407 * starting 72 minutes before sunrise and ending 72 minutes after sunset. This is calculated as 10.75 hours after 1408 * {@link #getAlos72() dawn}. The formula used is:<br/> 1409 * 10.75 {@link #getShaahZmanis72Minutes()} after {@link #getAlos72()}. 1410 * 1411 * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1412 * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it 1413 * does not set, a null will be returned. See detailed explanation on top of the 1414 * {@link AstronomicalCalendar} documentation. 1415 * 1416 * @see #getShaahZmanis72Minutes() 1417 */ 1418 public Date getPlagHamincha72Minutes() { 1419 return getTimeOffset(getAlos72(), getShaahZmanis72Minutes() * 10.75); 1420 } 1421 1422 /** 1423 * This method returns the time of <em>plag hamincha</em> according to the <em>Magen Avraham</em> with the day 1424 * starting 90 minutes before sunrise and ending 90 minutes after sunset. This is calculated as 10.75 hours after 1425 * {@link #getAlos90() dawn}. The formula used is:<br/> 1426 * 10.75 {@link #getShaahZmanis90Minutes()} after {@link #getAlos90()}. 1427 * 1428 * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1429 * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it 1430 * does not set, a null will be returned. See detailed explanation on top of the 1431 * {@link AstronomicalCalendar} documentation. 1432 * 1433 * @see #getShaahZmanis90Minutes() 1434 */ 1435 public Date getPlagHamincha90Minutes() { 1436 return getTimeOffset(getAlos90(), getShaahZmanis90Minutes() * 10.75); 1437 } 1438 1439 /** 1440 * This method returns the time of <em>plag hamincha</em> according to the <em>Magen Avraham</em> with the day 1441 * starting 96 minutes before sunrise and ending 96 minutes after sunset. This is calculated as 10.75 hours after 1442 * {@link #getAlos96() dawn}. The formula used is:<br/> 1443 * 10.75 {@link #getShaahZmanis96Minutes()} after {@link #getAlos96()}. 1444 * 1445 * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1446 * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it 1447 * does not set, a null will be returned. See detailed explanation on top of the 1448 * {@link AstronomicalCalendar} documentation. 1449 * @see #getShaahZmanis96Minutes() 1450 */ 1451 public Date getPlagHamincha96Minutes() { 1452 return getTimeOffset(getAlos96(), getShaahZmanis96Minutes() * 10.75); 1453 } 1454 1455 /** 1456 * This method returns the time of <em>plag hamincha</em>. This is calculated as 10.75 hours after 1457 * {@link #getAlos96Zmanis() dawn}. The formula used is:<br/> 1458 * 10.75 * {@link #getShaahZmanis96MinutesZmanis()} after {@link #getAlos96Zmanis() dawn}. 1459 * 1460 * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1461 * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it 1462 * does not set, a null will be returned. See detailed explanation on top of the 1463 * {@link AstronomicalCalendar} documentation. 1464 */ 1465 public Date getPlagHamincha96MinutesZmanis() { 1466 return getTimeOffset(getAlos96Zmanis(), getShaahZmanis96MinutesZmanis() * 10.75); 1467 } 1468 1469 /** 1470 * This method returns the time of <em>plag hamincha</em>. This is calculated as 10.75 hours after 1471 * {@link #getAlos90Zmanis() dawn}. The formula used is:<br/> 1472 * 10.75 * {@link #getShaahZmanis90MinutesZmanis()} after {@link #getAlos90Zmanis() dawn}. 1473 * 1474 * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1475 * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it 1476 * does not set, a null will be returned. See detailed explanation on top of the 1477 * {@link AstronomicalCalendar} documentation. 1478 */ 1479 public Date getPlagHamincha90MinutesZmanis() { 1480 return getTimeOffset(getAlos90Zmanis(), getShaahZmanis90MinutesZmanis() * 10.75); 1481 } 1482 1483 /** 1484 * This method returns the time of <em>plag hamincha</em>. This is calculated as 10.75 hours after 1485 * {@link #getAlos72Zmanis() dawn}. The formula used is:<br/> 1486 * 10.75 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}. 1487 * 1488 * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1489 * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it 1490 * does not set, a null will be returned. See detailed explanation on top of the 1491 * {@link AstronomicalCalendar} documentation. 1492 */ 1493 public Date getPlagHamincha72MinutesZmanis() { 1494 return getTimeOffset(getAlos72Zmanis(), getShaahZmanis72MinutesZmanis() * 10.75); 1495 } 1496 1497 /** 1498 * This method returns the time of <em>plag hamincha</em> based on the opinion that the day starts at 1499 * <em>{@link #getAlos16Point1Degrees() alos 16.1°}</em> and ends at 1500 * <em>{@link #getTzais16Point1Degrees() tzais 16.1°}</em>. This is calculated as 10.75 hours <em>zmaniyos</em> 1501 * after {@link #getAlos16Point1Degrees() dawn}. The formula is<br/> 1502 * 10.75 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees()}. 1503 * 1504 * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1505 * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 1506 * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See 1507 * detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1508 * 1509 * @see #getShaahZmanis16Point1Degrees() 1510 */ 1511 public Date getPlagHamincha16Point1Degrees() { 1512 return getTimeOffset(getAlos16Point1Degrees(), getShaahZmanis16Point1Degrees() * 10.75); 1513 } 1514 1515 /** 1516 * This method returns the time of <em>plag hamincha</em> based on the opinion that the day starts at 1517 * <em>{@link #getAlos19Point8Degrees() alos 19.8°}</em> and ends at 1518 * <em>{@link #getTzais19Point8Degrees() tzais 19.8°}</em>. This is calculated as 10.75 hours <em>zmaniyos</em> 1519 * after {@link #getAlos19Point8Degrees() dawn}. The formula is<br/> 1520 * 10.75 * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees()}. 1521 * 1522 * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1523 * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 1524 * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See 1525 * detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1526 * 1527 * @see #getShaahZmanis19Point8Degrees() 1528 */ 1529 public Date getPlagHamincha19Point8Degrees() { 1530 return getTimeOffset(getAlos19Point8Degrees(), getShaahZmanis19Point8Degrees() * 10.75); 1531 } 1532 1533 /** 1534 * This method returns the time of <em>plag hamincha</em> based on the opinion that the day starts at 1535 * <em>{@link #getAlos26Degrees() alos 26°}</em> and ends at <em>{@link #getTzais26Degrees() tzais 26°}</em> 1536 * . This is calculated as 10.75 hours <em>zmaniyos</em> after {@link #getAlos26Degrees() dawn}. The formula is<br/> 1537 * 10.75 * {@link #getShaahZmanis26Degrees()} after {@link #getAlos26Degrees()}. 1538 * 1539 * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1540 * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 1541 * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See 1542 * detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1543 * 1544 * @see #getShaahZmanis26Degrees() 1545 */ 1546 public Date getPlagHamincha26Degrees() { 1547 return getTimeOffset(getAlos26Degrees(), getShaahZmanis26Degrees() * 10.75); 1548 } 1549 1550 /** 1551 * This method returns the time of <em>plag hamincha</em> based on the opinion that the day starts at 1552 * <em>{@link #getAlos18Degrees() alos 18°}</em> and ends at <em>{@link #getTzais18Degrees() tzais 18°}</em> 1553 * . This is calculated as 10.75 hours <em>zmaniyos</em> after {@link #getAlos18Degrees() dawn}. The formula is<br/> 1554 * 10.75 * {@link #getShaahZmanis18Degrees()} after {@link #getAlos18Degrees()}. 1555 * 1556 * @return the <code>Date</code> of the time of <em>plag hamincha</em>. If the calculation can't be computed such as 1557 * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 1558 * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See 1559 * detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1560 * 1561 * @see #getShaahZmanis18Degrees() 1562 */ 1563 public Date getPlagHamincha18Degrees() { 1564 return getTimeOffset(getAlos18Degrees(), getShaahZmanis18Degrees() * 10.75); 1565 } 1566 1567 /** 1568 * This method returns the time of <em>plag hamincha</em> based on the opinion that the day starts at 1569 * <em>{@link #getAlos16Point1Degrees() alos 16.1°}</em> and ends at {@link #getSunset() sunset}. 10.75 shaos 1570 * zmaniyos are calculated based on this day and added to {@link #getAlos16Point1Degrees() alos} to reach this time. 1571 * This time is 10.75 <em>shaos zmaniyos</em> (temporal hours) after {@link #getAlos16Point1Degrees() dawn} based on 1572 * the opinion that the day is calculated from a {@link #getAlos16Point1Degrees() dawn} of 16.1 degrees before 1573 * sunrise to {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 10.75 * the calculated 1574 * <em>shaah zmanis</em> after {@link #getAlos16Point1Degrees() dawn}. 1575 * 1576 * @return the <code>Date</code> of the plag. If the calculation can't be computed such as northern and southern 1577 * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach 1578 * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on 1579 * top of the {@link AstronomicalCalendar} documentation. 1580 * 1581 * @see #getAlos16Point1Degrees() 1582 * @see #getSeaLevelSunset() 1583 */ 1584 public Date getPlagAlosToSunset() { 1585 long shaahZmanis = getTemporalHour(getAlos16Point1Degrees(), getSeaLevelSunset()); 1586 return getTimeOffset(getAlos16Point1Degrees(), shaahZmanis * 10.75); 1587 } 1588 1589 /** 1590 * This method returns the time of <em>plag hamincha</em> based on the opinion that the day starts at 1591 * <em>{@link #getAlos16Point1Degrees() alos 16.1°}</em> and ends at {@link #getTzaisGeonim7Point083Degrees() 1592 * tzais}. 10.75 shaos zmaniyos are calculated based on this day and added to {@link #getAlos16Point1Degrees() alos} 1593 * to reach this time. This time is 10.75 <em>shaos zmaniyos</em> (temporal hours) after 1594 * {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a 1595 * {@link #getAlos16Point1Degrees() dawn} of 16.1 degrees before sunrise to 1596 * {@link #getTzaisGeonim7Point083Degrees() tzais} . This returns the time of 10.75 * the calculated 1597 * <em>shaah zmanis</em> after {@link #getAlos16Point1Degrees() dawn}. 1598 * 1599 * @return the <code>Date</code> of the plag. If the calculation can't be computed such as northern and southern 1600 * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach 1601 * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on 1602 * top of the {@link AstronomicalCalendar} documentation. 1603 * 1604 * @see #getAlos16Point1Degrees() 1605 * @see #getTzaisGeonim7Point083Degrees() 1606 */ 1607 public Date getPlagAlos16Point1ToTzaisGeonim7Point083Degrees() { 1608 long shaahZmanis = getTemporalHour(getAlos16Point1Degrees(), getTzaisGeonim7Point083Degrees()); 1609 return getTimeOffset(getAlos16Point1Degrees(), shaahZmanis * 10.75); 1610 } 1611 1612 /** 1613 * Method to return <em>Bain Hashmasho</em> of <em>Rabainu Tam</em> calculated when the sun is 1614 * {@link #ZENITH_13_POINT_24 13.24°} below the western {@link #GEOMETRIC_ZENITH geometric horizon} (90°) 1615 * after sunset. This calculation is based on the same calculation of {@link #getBainHasmashosRT58Point5Minutes() 1616 * Bain Hasmashos Rabainu Tam 58.5 minutes} but uses a degree based calculation instead of 58.5 exact minutes. This 1617 * calculation is based on the position of the sun 58.5 minutes after sunset in Jerusalem during the equinox which 1618 * calculates to 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith}.<br/> 1619 * <br/> 1620 * NOTE: As per Yisroel Vehazmanim Vol III page 1028 No 50, a dip of slightly less than 13° should be used. 1621 * Calculations show that the proper dip to be 13.2456° (truncated to 13.24 that provides about 1.5 second 1622 * earlier (<em>lechumra</em>) time) below the horizon at that time. This makes a difference of 1 minute and 10 1623 * seconds in Jerusalem during the Equinox, and 1 minute 29 seconds during the solstice as compared to the proper 1624 * 13.24°. For NY during the solstice, the difference is 1 minute 56 seconds. 1625 * 1626 * @return the <code>Date</code> of the sun being 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith} 1627 * (90°). If the calculation can't be computed such as northern and southern locations even south of the 1628 * Arctic Circle and north of the Antarctic Circle where the sun may not reach low enough below the horizon 1629 * for this calculation, a null will be returned. See detailed explanation on top of the 1630 * {@link AstronomicalCalendar} documentation. 1631 * 1632 * @see #ZENITH_13_POINT_24 1633 * @see #getBainHasmashosRT58Point5Minutes() 1634 */ 1635 public Date getBainHasmashosRT13Point24Degrees() { 1636 return getSunsetOffsetByDegrees(ZENITH_13_POINT_24); 1637 } 1638 1639 /** 1640 * This method returns <em>Bain Hashmashos<em> of <em>Rabainu Tam</em> calculated as a 58.5 minute offset after 1641 * sunset. <em>Bain hashmashos</em> is 3/4 of a <em>Mil</em> before <em>tzais</em> or 3 1/4 <em>Mil</em> after 1642 * sunset. With a <em>Mil<em> calculated as 18 minutes, 3.25 * 18 1643 * = 58.5 minutes. 1644 * 1645 * @return the <code>Date</code> of 58.5 minutes after sunset. If the calculation can't be computed such as in the 1646 * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does 1647 * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 1648 * documentation. 1649 * 1650 */ 1651 public Date getBainHasmashosRT58Point5Minutes() { 1652 return getTimeOffset(getSeaLevelSunset(), 58.5 * MINUTE_MILLIS); 1653 } 1654 1655 /** 1656 * This method returns the time of <em>bain hashmashos</em> based on the calculation of 13.5 minutes (3/4 of an 18 1657 * minute <em>Mil</em> before shkiah calculated as {@link #getTzaisGeonim7Point083Degrees() 7.083°}. 1658 * 1659 * @return the <code>Date</code> of the <em>bain hashmashos</em> of <em>Rabainu Tam</em> in this calculation. If the 1660 * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and 1661 * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this 1662 * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 1663 * documentation. 1664 * @see #getTzaisGeonim7Point083Degrees() 1665 */ 1666 public Date getBainHasmashosRT13Point5MinutesBefore7Point083Degrees() { 1667 return getTimeOffset(getSunsetOffsetByDegrees(ZENITH_7_POINT_083), -13.5 * MINUTE_MILLIS); 1668 } 1669 1670 /** 1671 * This method returns <em>bain hashmashos</em> of <em>Rabainu Tam</em> calculated according to the opinion of the 1672 * <em>Divray Yosef</em> (see Yisrael Vehazmanim) calculated 5/18th (27.77%) of the time between <em>alos</em> 1673 * (calculated as 19.8° before sunrise) and sunrise. This is added to sunset to arrive at the time for 1674 * <em>bain hashmashos</em> of <em>Rabainu Tam<em>). 1675 * 1676 * @return the <code>Date</code> of <em>bain hashmashos</em> of <em>Rabainu Tam</em> for this calculation. If the 1677 * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and 1678 * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this 1679 * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 1680 * documentation. 1681 */ 1682 public Date getBainHasmashosRT2Stars() { 1683 Date alos19Point8 = getAlos19Point8Degrees(); 1684 Date sunrise = getSeaLevelSunrise(); 1685 if (alos19Point8 == null || sunrise == null) { 1686 return null; 1687 } 1688 return getTimeOffset(getSeaLevelSunset(), (sunrise.getTime() - alos19Point8.getTime()) * (5 / 18d)); 1689 } 1690 1691 /** 1692 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated at the 1693 * sun's position at {@link #ZENITH_3_POINT_7 3.7°} below the western horizon. 1694 * 1695 * @return the <code>Date</code> representing the time when the sun is 3.7° below sea level. 1696 * @see #ZENITH_3_POINT_7 1697 */ 1698 // public Date getTzaisGeonim3Point7Degrees() { 1699 // return getSunsetOffsetByDegrees(ZENITH_3_POINT_7); 1700 // } 1701 1702 /** 1703 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated at the 1704 * sun's position at {@link #ZENITH_5_POINT_95 5.95°} below the western horizon. 1705 * 1706 * @return the <code>Date</code> representing the time when the sun is 5.95° below sea level. If the calculation 1707 * can't be computed such as northern and southern locations even south of the Arctic Circle and north of 1708 * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a 1709 * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1710 * @see #ZENITH_5_POINT_95 1711 */ 1712 public Date getTzaisGeonim5Point95Degrees() { 1713 return getSunsetOffsetByDegrees(ZENITH_5_POINT_95); 1714 } 1715 1716 /** 1717 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 3/4 1718 * of a <a href= "http://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement" >Mil</a> based on an 18 1719 * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_65 3.65°} below the western 1720 * horizon. This is a very early <em>zman</em> and should not be relied on without Rabbinical guidance. 1721 * 1722 * @return the <code>Date</code> representing the time when the sun is 3.65° below sea level. If the calculation 1723 * can't be computed such as northern and southern locations even south of the Arctic Circle and north of 1724 * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a 1725 * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1726 * @see #ZENITH_3_POINT_65 1727 */ 1728 public Date getTzaisGeonim3Point65Degrees() { 1729 return getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_65); 1730 } 1731 1732 /** 1733 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 3/4 1734 * of a <a href= "http://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement" >Mil</a> based on a 24 1735 * minute Mil, or 18 minutes. It is the sun's position at {@link #ZENITH_4_POINT_61 4.61°} below the western 1736 * horizon. This is a very early <em>zman</em> and should not be relied on without Rabbinical guidance. 1737 * 1738 * @return the <code>Date</code> representing the time when the sun is 4.61° below sea level. If the calculation 1739 * can't be computed such as northern and southern locations even south of the Arctic Circle and north of 1740 * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a 1741 * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1742 * @see #ZENITH_4_POINT_61 1743 */ 1744 public Date getTzaisGeonim4Point61Degrees() { 1745 return getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_4_POINT_61); 1746 } 1747 1748 /** 1749 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 3/4 1750 * of a <a href= "http://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement" >Mil</a>, based on a 22.5 1751 * minute Mil, or 16 7/8 minutes. It is the sun's position at {@link #ZENITH_4_POINT_37 4.37°} below the western 1752 * horizon. This is a very early <em>zman</em> and should not be relied on without Rabbinical guidance. 1753 * 1754 * @return the <code>Date</code> representing the time when the sun is 4.37° below sea level. If the calculation 1755 * can't be computed such as northern and southern locations even south of the Arctic Circle and north of 1756 * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a 1757 * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1758 * @see #ZENITH_4_POINT_37 1759 */ 1760 public Date getTzaisGeonim4Point37Degrees() { 1761 return getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_4_POINT_37); 1762 } 1763 1764 /** 1765 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 3/4 1766 * of a 24 minute 1767 * <em><a href= "http://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement" >Mil</a></em>, ( 1768 * <em>Baal Hatanya</em>) based on a <em>Mil</em> being 24 minutes, and is calculated as 18 + 2 + 4 for a total of 1769 * 24 minutes (FIXME: additional documentation details needed). It is the sun's position at 1770 * {@link #ZENITH_5_POINT_88 5.88°} below the western horizon. This is a very early <em>zman</em> and should not 1771 * be relied on without Rabbinical guidance. 1772 * 1773 * @return the <code>Date</code> representing the time when the sun is 5.88° below sea level. If the calculation 1774 * can't be computed such as northern and southern locations even south of the Arctic Circle and north of 1775 * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a 1776 * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1777 * @see #ZENITH_5_POINT_88 1778 */ 1779 public Date getTzaisGeonim5Point88Degrees() { 1780 return getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_5_POINT_88); 1781 } 1782 1783 /** 1784 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated as 3/4 1785 * of a <a href= "http://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement" >Mil</a> based on the 1786 * sun's position at {@link #ZENITH_4_POINT_8 4.8°} below the western horizon. This is based on Rabbi Leo Levi's 1787 * calculations. FIXME: additional documentation needed. This is the This is a very early <em>zman</em> and should 1788 * not be relied on without Rabbinical guidance. 1789 * 1790 * @return the <code>Date</code> representing the time when the sun is 4.8° below sea level. If the calculation 1791 * can't be computed such as northern and southern locations even south of the Arctic Circle and north of 1792 * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a 1793 * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1794 * @see #ZENITH_4_POINT_8 1795 */ 1796 public Date getTzaisGeonim4Point8Degrees() { 1797 return getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_4_POINT_8); 1798 } 1799 1800 /** 1801 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated at the 1802 * sun's position at {@link #ZENITH_7_POINT_083 7.083°} below the western horizon. 1803 * 1804 * @return the <code>Date</code> representing the time when the sun is 7.083° below sea level. If the 1805 * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and 1806 * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this 1807 * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 1808 * documentation. 1809 * @see #ZENITH_7_POINT_083 1810 */ 1811 public Date getTzaisGeonim7Point083Degrees() { 1812 return getSunsetOffsetByDegrees(ZENITH_7_POINT_083); 1813 } 1814 1815 /** 1816 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Geonim</em> calculated at the 1817 * sun's position at {@link #ZENITH_8_POINT_5 8.5°} below the western horizon. 1818 * 1819 * @return the <code>Date</code> representing the time when the sun is 8.5° below sea level. If the calculation 1820 * can't be computed such as northern and southern locations even south of the Arctic Circle and north of 1821 * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a 1822 * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1823 * @see #ZENITH_8_POINT_5 1824 */ 1825 public Date getTzaisGeonim8Point5Degrees() { 1826 return getSunsetOffsetByDegrees(ZENITH_8_POINT_5); 1827 } 1828 1829 /** 1830 * This method returns the <em>tzais</em> (nightfall) based on the opinion of the <em>Chavas Yair</em> and 1831 * </em>Divray Malkiel</em> that the time to walk the distance of a <em>Mil</em> is 15 minutes for a total of 60 1832 * minutes for 4 <em>Mil</em> after {@link #getSeaLevelSunset() sea level sunset}. 1833 * 1834 * @return the <code>Date</code> representing 60 minutes after sea level sunset. If the calculation can't be 1835 * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, 1836 * and one where it does not set, a null will be returned. See detailed explanation on top of the 1837 * {@link AstronomicalCalendar} documentation. 1838 * @see #getAlos60() 1839 */ 1840 public Date getTzais60() { 1841 return getTimeOffset(getSeaLevelSunset(), 60 * MINUTE_MILLIS); 1842 } 1843 1844 /** 1845 * This method returns <em>tzais</em> usually calculated as 40 minutes (configurable to any offset via 1846 * {@link #setAteretTorahSunsetOffset(double)}) after sunset. Please note that <em>Chacham Yosef Harari-Raful</em> 1847 * of <em>Yeshivat Ateret Torah</em> who uses this time, does so only for calculating various other 1848 * <em>zmanai hayom</em> such as <em>Sof Zman Krias Shema</em> and <em>Plag Hamincha</em>. His calendars do not 1849 * publish a <em>zman</em> for <em>Tzais</em>. It should also be noted that <em>Chacham Harari-Raful</em> provided a 1850 * 25 minute <em>zman</em> for Israel. This API uses 40 minutes year round in any place on the globe by default. 1851 * This offset can be changed by calling {@link #setAteretTorahSunsetOffset(double)}. 1852 * 1853 * @return the <code>Date</code> representing 40 minutes (configurable via {@link #setAteretTorahSunsetOffset}) 1854 * after sea level sunset. If the calculation can't be computed such as in the Arctic Circle where there is 1855 * at least one day a year where the sun does not rise, and one where it does not set, a null will be 1856 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 1857 * @see #getAteretTorahSunsetOffset() 1858 * @see #setAteretTorahSunsetOffset(double) 1859 */ 1860 public Date getTzaisAteretTorah() { 1861 return getTimeOffset(getSeaLevelSunset(), getAteretTorahSunsetOffset() * MINUTE_MILLIS); 1862 } 1863 1864 /** 1865 * Returns the offset in minutes after sunset used to calculate sunset for the Ateret Torah zmanim. The defaullt 1866 * value is 40 minutes. This affects most zmanim, since almost all zmanim use sunbset as part of their calculation. 1867 * 1868 * @return the number of minutes after sunset for <em>Tzait</em>. 1869 * @see #setAteretTorahSunsetOffset(double) 1870 */ 1871 public double getAteretTorahSunsetOffset() { 1872 return this.ateretTorahSunsetOffset; 1873 } 1874 1875 /** 1876 * Allows setting the offset in minutes after sunset for the Ateret Torah zmanim. The default if unset is 40 1877 * minutes. Chacham Yosef Harari-Raful of Yeshivat Ateret Torah uses 40 minutes globally with the exception of 1878 * Israel where a 25 minute offset is used. This 40 minute (or any other) offset can be overridden by this methd. 1879 * This offset impacts all Ateret Torah zmanim. 1880 * 1881 * @param ateretTorahSunsetOffset 1882 * the number of minutes after sunset to use as an offset for the Ateret Torah <em>tzais</em> 1883 * @see #getAteretTorahSunsetOffset() 1884 */ 1885 public void setAteretTorahSunsetOffset(double ateretTorahSunsetOffset) { 1886 this.ateretTorahSunsetOffset = ateretTorahSunsetOffset; 1887 } 1888 1889 /** 1890 * This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) based on the 1891 * calculation of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts 1892 * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending 1893 * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via 1894 * {@link #setAteretTorahSunsetOffset(double)}). <em>shaos zmaniyos</em> are calculated based on this day and added 1895 * to {@link #getAlos72Zmanis() alos} to reach this time. This time is 3 1896 * <em> {@link #getShaahZmanisAteretTorah() shaos zmaniyos}</em> (temporal hours) after 1897 * <em>{@link #getAlos72Zmanis() 1898 * alos 72 zmaniyos}</em>.<br /> 1899 * <b>Note: </b> Based on this calculation <em>chatzos</em> will not be at midday. 1900 * 1901 * @return the <code>Date</code> of the latest <em>zman krias shema</em> based on this calculation. If the 1902 * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where 1903 * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation 1904 * on top of the {@link AstronomicalCalendar} documentation. 1905 * @see #getAlos72Zmanis() 1906 * @see #getTzaisAteretTorah() 1907 * @see #getAteretTorahSunsetOffset() 1908 * @see #setAteretTorahSunsetOffset(double) 1909 * @see #getShaahZmanisAteretTorah() 1910 */ 1911 public Date getSofZmanShmaAteretTorah() { 1912 return getTimeOffset(getAlos72Zmanis(), getShaahZmanisAteretTorah() * 3); 1913 } 1914 1915 /** 1916 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) based on the calculation 1917 * of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of 1918 * the day} before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after 1919 * sunset} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). <em>shaos zmaniyos</em> are 1920 * calculated based on this day and added to {@link #getAlos72Zmanis() alos} to reach this time. This time is 4 * 1921 * <em>{@link #getShaahZmanisAteretTorah() shaos zmaniyos}</em> (temporal hours) after 1922 * <em>{@link #getAlos72Zmanis() alos 72 zmaniyos}</em>.<br /> 1923 * <b>Note: </b> Based on this calculation <em>chatzos</em> will not be at midday. 1924 * 1925 * @return the <code>Date</code> of the latest <em>zman krias shema</em> based on this calculation. If the 1926 * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where 1927 * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation 1928 * on top of the {@link AstronomicalCalendar} documentation. 1929 * @see #getAlos72Zmanis() 1930 * @see #getTzaisAteretTorah() 1931 * @see #getShaahZmanisAteretTorah() 1932 * @see #setAteretTorahSunsetOffset(double) 1933 */ 1934 public Date getSofZmanTfilahAteretTorah() { 1935 return getTimeOffset(getAlos72Zmanis(), getShaahZmanisAteretTorah() * 4); 1936 } 1937 1938 /** 1939 * This method returns the time of <em>mincha gedola</em> based on the calculation of 1940 * <em>Chacham Yosef Harari-Raful</em> of <em>Yeshivat Ateret Torah</em>, that the day starts 1941 * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending 1942 * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via 1943 * {@link #setAteretTorahSunsetOffset(double)}). This is the perfered earliest time to pray <em>mincha</em> 1944 * according to the opinion of the <em>Rambam</em> and others. For more information on this see the documentation on 1945 * <em>{@link #getMinchaGedola() mincha gedola}</em>. This is calculated as 6.5 {@link #getShaahZmanisAteretTorah() 1946 * solar hours} after alos. The calculation used is 6.5 * {@link #getShaahZmanisAteretTorah()} after 1947 * <em>{@link #getAlos72Zmanis() alos}</em>. 1948 * 1949 * @see #getAlos72Zmanis() 1950 * @see #getTzaisAteretTorah() 1951 * @see #getShaahZmanisAteretTorah() 1952 * @see #getMinchaGedola() 1953 * @see #getMinchaKetanaAteretTorah() 1954 * @see ZmanimCalendar#getMinchaGedola() 1955 * @see #getAteretTorahSunsetOffset() 1956 * @see #setAteretTorahSunsetOffset(double) 1957 * 1958 * @return the <code>Date</code> of the time of mincha gedola. If the calculation can't be computed such as in the 1959 * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does 1960 * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 1961 * documentation. 1962 */ 1963 public Date getMinchaGedolaAteretTorah() { 1964 return getTimeOffset(getAlos72Zmanis(), getShaahZmanisAteretTorah() * 6.5); 1965 } 1966 1967 /** 1968 * This method returns the time of <em>mincha ketana</em> based on the calculation of 1969 * <em>Chacham Yosef Harari-Raful</em> of <em>Yeshivat Ateret Torah</em>, that the day starts 1970 * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending 1971 * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via 1972 * {@link #setAteretTorahSunsetOffset(double)}). This is the perfered earliest time to pray <em>mincha</em> 1973 * according to the opinion of the <em>Rambam</em> and others. For more information on this see the documentation on 1974 * <em>{@link #getMinchaGedola() mincha gedola}</em>. This is calculated as 9.5 {@link #getShaahZmanisAteretTorah() 1975 * solar hours} after {@link #getAlos72Zmanis() alos}. The calculation used is 9.5 * 1976 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}. 1977 * 1978 * @see #getAlos72Zmanis() 1979 * @see #getTzaisAteretTorah() 1980 * @see #getShaahZmanisAteretTorah() 1981 * @see #getAteretTorahSunsetOffset() 1982 * @see #setAteretTorahSunsetOffset(double) 1983 * @see #getMinchaGedola() 1984 * @see #getMinchaKetana() 1985 * @return the <code>Date</code> of the time of mincha ketana. If the calculation can't be computed such as in the 1986 * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does 1987 * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 1988 * documentation. 1989 */ 1990 public Date getMinchaKetanaAteretTorah() { 1991 return getTimeOffset(getAlos72Zmanis(), getShaahZmanisAteretTorah() * 9.5); 1992 } 1993 1994 /** 1995 * This method returns the time of <em>plag hamincha</em> based on the calculation of Chacham Yosef Harari-Raful of 1996 * Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is 1997 * usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset 1998 * via {@link #setAteretTorahSunsetOffset(double)}). <em>shaos zmaniyos</em> are calculated based on this day and 1999 * added to {@link #getAlos72Zmanis() alos} to reach this time. This time is 10.75 2000 * <em>{@link #getShaahZmanisAteretTorah() shaos zmaniyos}</em> (temporal hours) after {@link #getAlos72Zmanis() 2001 * dawn}. 2002 * 2003 * @return the <code>Date</code> of the plag. If the calculation can't be computed such as in the Arctic Circle 2004 * where there is at least one day a year where the sun does not rise, and one where it does not set, a null 2005 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 2006 * @see #getAlos72Zmanis() 2007 * @see #getTzaisAteretTorah() 2008 * @see #getShaahZmanisAteretTorah() 2009 * @see #setAteretTorahSunsetOffset(double) 2010 * @see #getAteretTorahSunsetOffset() 2011 */ 2012 public Date getPlagHaminchaAteretTorah() { 2013 return getTimeOffset(getAlos72Zmanis(), getShaahZmanisAteretTorah() * 10.75); 2014 } 2015 2016 /** 2017 * This method returns the time of <em>misheyakir</em> based on the common calculation of the Syrian community in NY 2018 * that the <em>alos</em> is a fixed minute offset from day starting {@link #getAlos72Zmanis() 1/10th of the day} 2019 * before sunrise. The common offsets are 6 minutes (based on th <em>Pri Megadim</em>, but not linked to the 2020 * calculation of <em>Alos</em> as 1/10th of the day), 8 and 18 minutes (possibly attributed to 2021 * <em>Chacham Baruch Ben Haim</em>). Since there is no universal accepted offset, the user of this API will have to 2022 * specify one. <em>Chacham Yosef Harari-Raful</em> of <em>Yeshivat Ateret Torah</em> does not supply any 2023 * <em>zman</em> for <em>misheyakir</em> and does not endorse any specific calculation for <em>misheyakir</em>. For 2024 * that reason, this method is not a public method. 2025 * 2026 * @param minutes 2027 * the number of minutes after <em>alos</em> calculated as {@link #getAlos72Zmanis() 1/10th of the day} 2028 * @return the <code>Date</code> of <em>misheyakir</em>. If the calculation can't be computed such as in the Arctic 2029 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 2030 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2031 * documentation. 2032 * @see #getAlos72Zmanis() 2033 */ 2034 private Date getMesheyakirAteretTorah(double minutes) { 2035 return getTimeOffset(getAlos72Zmanis(), minutes * MINUTE_MILLIS); 2036 } 2037 2038 /** 2039 * Method to return <em>tzais</em> (dusk) calculated as 72 minutes zmaniyos, or 1/10th of the day after 2040 * {@link #getSeaLevelSunset() sea level sunset}. 2041 * 2042 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic 2043 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 2044 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2045 * documentation. 2046 * @see #getAlos72Zmanis() 2047 */ 2048 public Date getTzais72Zmanis() { 2049 long shaahZmanis = getShaahZmanisGra(); 2050 if (shaahZmanis == Long.MIN_VALUE) { 2051 return null; 2052 } 2053 return getTimeOffset(getSeaLevelSunset(), shaahZmanis * 1.2); 2054 } 2055 2056 /** 2057 * Method to return <em>tzais</em> (dusk) calculated using 90 minutes zmaniyos (<em>GRA</em> and the 2058 * <em>Baal Hatanya</em>) after {@link #getSeaLevelSunset() sea level sunset}. 2059 * 2060 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic 2061 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 2062 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2063 * documentation. 2064 * @see #getAlos90Zmanis() 2065 */ 2066 public Date getTzais90Zmanis() { 2067 long shaahZmanis = getShaahZmanisGra(); 2068 if (shaahZmanis == Long.MIN_VALUE) { 2069 return null; 2070 } 2071 return getTimeOffset(getSeaLevelSunset(), shaahZmanis * 1.5); 2072 } 2073 2074 /** 2075 * Method to return <em>tzais</em> (dusk) calculated using 96 minutes zmaniyos (<em>GRA</em> and the 2076 * <em>Baal Hatanya</em>) after {@link #getSeaLevelSunset() sea level sunset}. 2077 * 2078 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic 2079 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 2080 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2081 * documentation. 2082 * @see #getAlos96Zmanis() 2083 */ 2084 public Date getTzais96Zmanis() { 2085 long shaahZmanis = getShaahZmanisGra(); 2086 if (shaahZmanis == Long.MIN_VALUE) { 2087 return null; 2088 } 2089 return getTimeOffset(getSeaLevelSunset(), shaahZmanis * 1.6); 2090 } 2091 2092 /** 2093 * Method to return <em>tzais</em> (dusk) calculated as 90 minutes after sea level sunset. This method returns 2094 * <em>tzais</em> (nightfall) based on the opinion of the Magen Avraham that the time to walk the distance of a 2095 * <em>Mil</em> according to the <em>Rambam</em>'s opinion is 18 minutes for a total of 90 minutes based on the 2096 * opinion of <em>Ula</em> who calculated <em>tzais</em> as 5 <em>Mil</em> after sea level shkiah (sunset). A 2097 * similar calculation {@link #getTzais19Point8Degrees()}uses solar position calculations based on this time. 2098 * 2099 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic 2100 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 2101 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2102 * documentation. 2103 * @see #getTzais19Point8Degrees() 2104 * @see #getAlos90() 2105 */ 2106 public Date getTzais90() { 2107 return getTimeOffset(getSeaLevelSunset(), 90 * MINUTE_MILLIS); 2108 } 2109 2110 /** 2111 * This method returns <em>tzais</em> (nightfall) based on the opinion of the <em>Magen Avraham</em> that the time 2112 * to walk the distance of a <em>Mil</em> according to the <em>Rambam</em>'s opinion is 2/5 of an hour (24 minutes) 2113 * for a total of 120 minutes based on the opinion of <em>Ula</em> who calculated <em>tzais</em> as 5 <em>Mil</em> 2114 * after sea level <em>shkiah</em> (sunset). A similar calculation {@link #getTzais26Degrees()} uses temporal 2115 * calculations based on this time. 2116 * 2117 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic 2118 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 2119 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2120 * documentation. 2121 * @see #getTzais26Degrees() 2122 * @see #getAlos120() 2123 */ 2124 public Date getTzais120() { 2125 return getTimeOffset(getSeaLevelSunset(), 120 * MINUTE_MILLIS); 2126 } 2127 2128 /** 2129 * Method to return <em>tzais</em> (dusk) calculated using 120 minutes zmaniyos (<em>GRA</em> and the 2130 * <em>Baal Hatanya</em>) after {@link #getSeaLevelSunset() sea level sunset}. 2131 * 2132 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic 2133 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 2134 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2135 * documentation. 2136 * @see #getAlos120Zmanis() 2137 */ 2138 public Date getTzais120Zmanis() { 2139 long shaahZmanis = getShaahZmanisGra(); 2140 if (shaahZmanis == Long.MIN_VALUE) { 2141 return null; 2142 } 2143 return getTimeOffset(getSeaLevelSunset(), shaahZmanis * 2.0); 2144 } 2145 2146 /** 2147 * For information on how this is calculated see the comments on {@link #getAlos16Point1Degrees()} 2148 * 2149 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as northern and 2150 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may 2151 * not reach low enough below the horizon for this calculation, a null will be returned. See detailed 2152 * explanation on top of the {@link AstronomicalCalendar} documentation. 2153 * @see #getTzais72() 2154 * @see #getAlos16Point1Degrees() for more information on this calculation. 2155 */ 2156 public Date getTzais16Point1Degrees() { 2157 return getSunsetOffsetByDegrees(ZENITH_16_POINT_1); 2158 } 2159 2160 /** 2161 * For information on how this is calculated see the comments on {@link #getAlos26Degrees()} 2162 * 2163 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as northern and 2164 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may 2165 * not reach low enough below the horizon for this calculation, a null will be returned. See detailed 2166 * explanation on top of the {@link AstronomicalCalendar} documentation. 2167 * @see #getTzais120() 2168 * @see #getAlos26Degrees() 2169 */ 2170 public Date getTzais26Degrees() { 2171 return getSunsetOffsetByDegrees(ZENITH_26_DEGREES); 2172 } 2173 2174 /** 2175 * For information on how this is calculated see the comments on {@link #getAlos18Degrees()} 2176 * 2177 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as northern and 2178 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may 2179 * not reach low enough below the horizon for this calculation, a null will be returned. See detailed 2180 * explanation on top of the {@link AstronomicalCalendar} documentation. 2181 * @see #getAlos18Degrees() 2182 */ 2183 public Date getTzais18Degrees() { 2184 return getSunsetOffsetByDegrees(ASTRONOMICAL_ZENITH); 2185 } 2186 2187 /** 2188 * For information on how this is calculated see the comments on {@link #getAlos19Point8Degrees()} 2189 * 2190 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as northern and 2191 * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may 2192 * not reach low enough below the horizon for this calculation, a null will be returned. See detailed 2193 * explanation on top of the {@link AstronomicalCalendar} documentation. 2194 * @see #getTzais90() 2195 * @see #getAlos19Point8Degrees() 2196 */ 2197 public Date getTzais19Point8Degrees() { 2198 return getSunsetOffsetByDegrees(ZENITH_19_POINT_8); 2199 } 2200 2201 /** 2202 * A method to return <em>tzais</em> (dusk) calculated as 96 minutes after sea level sunset. For information on how 2203 * this is calculated see the comments on {@link #getAlos96()}. 2204 * 2205 * @return the <code>Date</code> representing the time. If the calculation can't be computed such as in the Arctic 2206 * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, 2207 * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} 2208 * documentation. 2209 * @see #getAlos96() 2210 */ 2211 public Date getTzais96() { 2212 return getTimeOffset(getSeaLevelSunset(), 96 * MINUTE_MILLIS); 2213 } 2214 2215 /** 2216 * A method that returns the local time for fixed <em>chatzos</em>. This time is noon and midnight adjusted from 2217 * standard time to account for the local latitude. The 360° of the globe divided by 24 calculates to 15° 2218 * per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... <em>Chatzos</em> in 12:00 noon. 2219 * Lakewood, N.J., whose longitude is -74.2094, is 0.7906 away from the closest multiple of 15 at -75°. This is 2220 * multiplied by 4 to yield 3 minutes and 10 seconds for a <em>chatzos</em> of 11:56:50. This method is not tied to 2221 * the theoretical 15° timezones, but will adjust to the actual timezone and <a 2222 * href="http://en.wikipedia.org/wiki/Daylight_saving_time">Daylight saving time</a>. 2223 * 2224 * @return the Date representing the local <em>chatzos</em> 2225 * @see GeoLocation#getLocalMeanTimeOffset() 2226 */ 2227 public Date getFixedLocalChatzos() { 2228 return getTimeOffset(getDateFromTime(12.0 - getGeoLocation().getTimeZone().getRawOffset() 2229 / (double) HOUR_MILLIS), -getGeoLocation().getLocalMeanTimeOffset()); 2230 } 2231 2232 /** 2233 * A method that returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) calculated as 3 2234 * hours before {@link #getFixedLocalChatzos()}. 2235 * 2236 * @return the <code>Date</code> of the latest <em>zman krias shema</em> calculated as 3 hours before 2237 * {@link #getFixedLocalChatzos()}.. 2238 * @see #getFixedLocalChatzos() 2239 * @see #getSofZmanTfilaFixedLocal() 2240 */ 2241 public Date getSofZmanShmaFixedLocal() { 2242 return getTimeOffset(getFixedLocalChatzos(), -180 * MINUTE_MILLIS); 2243 } 2244 2245 /** 2246 * This method returns the latest <em>zman tfila</em> (time to recite the morning prayers) calculated as 2 hours 2247 * before {@link #getFixedLocalChatzos()}. 2248 * 2249 * @return the <code>Date</code> of the latest <em>zman tfila</em>. 2250 * @see #getFixedLocalChatzos() 2251 * @see #getSofZmanShmaFixedLocal() 2252 */ 2253 public Date getSofZmanTfilaFixedLocal() { 2254 return getTimeOffset(getFixedLocalChatzos(), -120 * MINUTE_MILLIS); 2255 } 2256 2257 /** 2258 * Returns the latest time of Kiddush Levana according to the <a 2259 * href="http://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> opinion that it is calculated as 2260 * halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between molad and 2261 * molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad. If the time of 2262 * <em>sof zman Kiddush Levana</em> occurs during the day (between the <em>alos</em> and <em>tzais</em> passed in as 2263 * parameters), it returns the <em>alos</em> passed in. 2264 * 2265 * @param alos 2266 * @param tzais 2267 * @return the Date representing the moment halfway between molad and molad. If the time occurs between 2268 * <em>alos</em> and <em>tzais</em>, <em>alos</em> will be returned 2269 * @see #getSofZmanKidushLevanaBetweenMoldos() 2270 * @see #getSofZmanKidushLevana15Days(Date, Date) 2271 */ 2272 public Date getSofZmanKidushLevanaBetweenMoldos(Date alos, Date tzais) { 2273 JewishCalendar jewishCalendar = new JewishCalendar(); 2274 jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), 2275 getCalendar().get(Calendar.DAY_OF_MONTH)); 2276 Calendar sofZmanKidushLevanaCalendar = (Calendar) getCalendar().clone(); 2277 Date sofZmanKidushLevana = jewishCalendar.getSofZmanKidushLevanaBetweenMoldos(); 2278 sofZmanKidushLevanaCalendar.setTime(sofZmanKidushLevana); 2279 if (alos != null && tzais != null 2280 && sofZmanKidushLevanaCalendar.get(Calendar.YEAR) == getCalendar().get(Calendar.YEAR) 2281 && sofZmanKidushLevanaCalendar.get(Calendar.MONTH) == getCalendar().get(Calendar.MONTH) 2282 && sofZmanKidushLevanaCalendar.get(Calendar.DAY_OF_MONTH) == getCalendar().get(Calendar.DAY_OF_MONTH)) { 2283 if (sofZmanKidushLevana.after(alos) && sofZmanKidushLevana.before(tzais)) { 2284 return alos; 2285 } else { 2286 return sofZmanKidushLevana; 2287 } 2288 } 2289 return null; 2290 } 2291 2292 /** 2293 * Returns the latest time of Kiddush Levana according to the <a 2294 * href="http://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> opinion that it is calculated as 2295 * halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between 2296 * <em>molad</em> and <em>molad</em> (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad. If 2297 * the time of <em>sof zman Kiddush Levana</em> occurs during the day (between 2298 * <em>{@link net.sourceforge.zmanim.ZmanimCalendar#getAlos72() Alos}</em> and 2299 * <em>{@link net.sourceforge.zmanim.ZmanimCalendar#getTzais72() tzais}</em>) it return the <em>alos</em> prior to 2300 * the calculated <em>sof zman Kiddush Levana</em>. 2301 * 2302 * @return the Date representing the moment halfway between molad and molad. If the time occurs between 2303 * <em>alos</em> and <em>tzais</em>, <em>alos</em> will be returned 2304 * @see #getSofZmanKidushLevanaBetweenMoldos(Date, Date) 2305 * @see #getSofZmanKidushLevana15Days() 2306 */ 2307 public Date getSofZmanKidushLevanaBetweenMoldos() { 2308 return getSofZmanKidushLevanaBetweenMoldos(getAlos72(), getTzais72()); 2309 } 2310 2311 /** 2312 * Returns the latest time of <em>Kiddush Levana<em> calculated as 15 days after the <em>molad</em>. This is the 2313 * opinion brought down in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the 2314 * <http://en.wikipedia.org/wiki/Moses_Isserles">Rema</a> who brings down the opinion of the <a 2315 * href="http://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> of calculating 2316 * {@link #getSofZmanKidushLevanaBetweenMoldos(Date, Date) half way between molad and mold} is of the opinion that 2317 * Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, See Rabbi 2318 * Dovid Heber's very detailed writeup in Siman Daled (chapter 4) of <a 2319 * href="http://www.worldcat.org/oclc/461326125">Shaarei Zmanim</a>. If the time of <em>sof zman Kiddush Levana</em> 2320 * occurs during the day (between the <em>alos</em> and <em>tzais</em> passed in as parameters), it returns the 2321 * <em>alos</em> passed in. 2322 * 2323 * @param alos 2324 * @param tzais 2325 * @return the Date representing the moment 15 days after the molad. If the time occurs between <em>alos</em> and 2326 * <em>tzais</em>, <em>alos</em> will be returned 2327 * 2328 * @see #getSofZmanKidushLevanaBetweenMoldos(Date, Date) 2329 */ 2330 public Date getSofZmanKidushLevana15Days(Date alos, Date tzais) { 2331 JewishCalendar jewishCalendar = new JewishCalendar(); 2332 jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), 2333 getCalendar().get(Calendar.DAY_OF_MONTH)); 2334 Calendar sofZmanKidushLevanaCalendar = (Calendar) getCalendar().clone(); 2335 Date sofZmanKidushLevana = jewishCalendar.getSofZmanKidushLevana15Days(); 2336 sofZmanKidushLevanaCalendar.setTime(sofZmanKidushLevana); 2337 if (alos != null && tzais != null 2338 && sofZmanKidushLevanaCalendar.get(Calendar.YEAR) == getCalendar().get(Calendar.YEAR) 2339 && sofZmanKidushLevanaCalendar.get(Calendar.MONTH) == getCalendar().get(Calendar.MONTH) 2340 && sofZmanKidushLevanaCalendar.get(Calendar.DAY_OF_MONTH) == getCalendar().get(Calendar.DAY_OF_MONTH)) { 2341 if (sofZmanKidushLevana.after(alos) && sofZmanKidushLevana.before(tzais)) { 2342 return alos; 2343 } else { 2344 return sofZmanKidushLevana; 2345 } 2346 } 2347 return null; 2348 } 2349 2350 /** 2351 * Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the opinion brought down 2352 * in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the 2353 * <http://en.wikipedia.org/wiki/Moses_Isserles">Rema</a> who brings down the opinion of the <a 2354 * href="http://en.wikipedia.org/wiki/Yaakov_ben_Moshe_Levi_Moelin">Maharil's</a> of calculating 2355 * {@link #getSofZmanKidushLevanaBetweenMoldos(Date, Date) half way between molad and mold} is of the opinion that 2356 * Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, See Rabbi 2357 * Dovid Heber's very detailed writeup in Siman Daled (chapter 4) of <a 2358 * href="http://www.worldcat.org/oclc/461326125">Shaarei Zmanim</a>. If the time of <em>sof zman Kiddush Levana</em> 2359 * occurs during the day (between <em>{@link net.sourceforge.zmanim.ZmanimCalendar#getAlos72() Alos}</em> and 2360 * <em>{@link net.sourceforge.zmanim.ZmanimCalendar#getTzais72() tzais}</em>) it return the <em>alos</em> prior to 2361 * the calculated <em>sof zman Kiddush Levana</em>. 2362 * 2363 * @return the Date representing the moment 15 days after the <em>molad</em>. If the time occurs between 2364 * <em>alos</em> and <em>tzais</em>, <em>alos</em> will be returned 2365 * 2366 * @see #getSofZmanKidushLevana15Days(Date, Date) 2367 * @see #getSofZmanKidushLevanaBetweenMoldos() 2368 */ 2369 public Date getSofZmanKidushLevana15Days() { 2370 return getSofZmanKidushLevana15Days(getAlos72(), getTzais72()); 2371 } 2372 2373 public Date getTchilasZmanKidushLevana3Days(Date alos, Date tzais) { 2374 JewishCalendar jewishCalendar = new JewishCalendar(); 2375 jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), 2376 getCalendar().get(Calendar.DAY_OF_MONTH)); 2377 Date tchilasZmanKidushLevana = jewishCalendar.getTchilasZmanKidushLevana3Days(); 2378 Calendar tchilasZmanKidushLevanaCalendar = (Calendar) getCalendar().clone(); 2379 tchilasZmanKidushLevanaCalendar.setTime(tchilasZmanKidushLevana); 2380 if (alos != null 2381 && tzais != null 2382 && tchilasZmanKidushLevanaCalendar.get(Calendar.YEAR) == getCalendar().get(Calendar.YEAR) 2383 && tchilasZmanKidushLevanaCalendar.get(Calendar.MONTH) == getCalendar().get(Calendar.MONTH) 2384 && tchilasZmanKidushLevanaCalendar.get(Calendar.DAY_OF_MONTH) == getCalendar().get( 2385 Calendar.DAY_OF_MONTH)) { 2386 if (tchilasZmanKidushLevana.after(alos) && tchilasZmanKidushLevana.before(tzais)) { 2387 return tzais; 2388 } else { 2389 return tchilasZmanKidushLevana; 2390 } 2391 } 2392 return null; 2393 } 2394 2395 public Date getTchilasZmanKidushLevana3Days() { 2396 return getTchilasZmanKidushLevana3Days(getAlos72(), getTzais72()); 2397 } 2398 2399 public Date getTchilasZmanKidushLevana7Days(Date alos, Date tzais) { 2400 JewishCalendar jewishCalendar = new JewishCalendar(); 2401 jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), 2402 getCalendar().get(Calendar.DAY_OF_MONTH)); 2403 2404 Calendar tchilasZmanKidushLevanaCalendar = (Calendar) getCalendar().clone(); 2405 Date tchilasZmanKidushLevana = jewishCalendar.getTchilasZmanKidushLevana7Days(); 2406 tchilasZmanKidushLevanaCalendar.setTime(tchilasZmanKidushLevana); 2407 if (alos != null 2408 && tzais != null 2409 && tchilasZmanKidushLevanaCalendar.get(Calendar.YEAR) == getCalendar().get(Calendar.YEAR) 2410 && tchilasZmanKidushLevanaCalendar.get(Calendar.MONTH) == getCalendar().get(Calendar.MONTH) 2411 && tchilasZmanKidushLevanaCalendar.get(Calendar.DAY_OF_MONTH) == getCalendar().get( 2412 Calendar.DAY_OF_MONTH)) { 2413 if (tchilasZmanKidushLevana.after(alos) && tchilasZmanKidushLevana.before(tzais)) { 2414 return tzais; 2415 } else { 2416 return tchilasZmanKidushLevana; 2417 } 2418 } 2419 return null; 2420 } 2421 2422 public Date getTchilasZmanKidushLevana7Days() { 2423 return getTchilasZmanKidushLevana7Days(getAlos72(), getTzais72()); 2424 } 2425 2426 /** 2427 * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the opinion of the 2428 * <em>GRA</em> and the </em>Baal Hatanya</em>. This time is identical to the {@link #getSofZmanTfilaGRA() Sof zman 2429 * tefilah GRA}. This time is 4 hours into the day based on the opinion of the <em>GRA</em> and the </em>Baal 2430 * Hatanya</em> that the day is calculated from sunrise to sunset. This returns the time 4 * 2431 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea level sunrise}. 2432 * 2433 * @see ZmanimCalendar#getShaahZmanisGra() 2434 * @see ZmanimCalendar#getSofZmanTfilaGRA() 2435 * @return the <code>Date</code> one is allowed eating chametz on Erev Pesach. If the calculation can't be computed 2436 * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one 2437 * where it does not set, a null will be returned. See detailed explanation on top of the 2438 * {@link AstronomicalCalendar} documentation. 2439 */ 2440 public Date getSofZmanAchilasChametzGRA() { 2441 return getSofZmanTfilaGRA(); 2442 } 2443 2444 /** 2445 * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the opinion of the 2446 * <em>MGA</em> based on <em>alos</em> being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. 2447 * This time is identical to the {@link #getSofZmanTfilaMGA72Minutes() Sof zman tefilah MGA 72 minutes}. This time 2448 * is 4 <em>{@link #getShaahZmanisMGA() shaos zmaniyos}</em> (temporal hours) after {@link #getAlos72() dawn} based 2449 * on the opinion of the <em>MGA</em> that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes 2450 * before sunrise to {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 4 * 2451 * {@link #getShaahZmanisMGA()} after {@link #getAlos72() dawn}. 2452 * 2453 * @return the <code>Date</code> of the latest time of eating chametz. If the calculation can't be computed such as 2454 * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it 2455 * does not set), a null will be returned. See detailed explanation on top of the 2456 * {@link AstronomicalCalendar} documentation. 2457 * @see #getShaahZmanisMGA() 2458 * @see #getAlos72() 2459 * @see #getSofZmanTfilaMGA72Minutes() 2460 */ 2461 public Date getSofZmanAchilasChametzMGA72Minutes() { 2462 return getSofZmanTfilaMGA72Minutes(); 2463 } 2464 2465 /** 2466 * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the opinion of the 2467 * <em>MGA</em> based on <em>alos</em> being {@link #getAlos16Point1Degrees() 16.1°} before 2468 * {@link #getSunrise() sunrise}. This time is 4 <em>{@link #getShaahZmanis16Point1Degrees() shaos zmaniyos}</em> 2469 * (solar hours) after {@link #getAlos16Point1Degrees() dawn} based on the opinion of the <em>MGA</em> that the day 2470 * is calculated from dawn to nightfall with both being 16.1° below sunrise or sunset. This returns the time of 2471 * 4 {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}. 2472 * 2473 * @return the <code>Date</code> of the latest time of eating chametz. If the calculation can't be computed such as 2474 * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where 2475 * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See 2476 * detailed explanation on top of the {@link AstronomicalCalendar} documentation. 2477 * 2478 * @see #getShaahZmanis16Point1Degrees() 2479 * @see #getAlos16Point1Degrees() 2480 * @see #getSofZmanTfilaMGA16Point1Degrees() 2481 */ 2482 public Date getSofZmanAchilasChametzMGA16Point1Degrees() { 2483 return getSofZmanTfilaMGA16Point1Degrees(); 2484 } 2485 2486 /** 2487 * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of the 2488 * <em>GRA</em> and the </em>Baal Hatanya</em>. This time is 5 hours into the day based on the opinion of the 2489 * <em>GRA</em> and the </em>Baal Hatanya</em> that the day is calculated from sunrise to sunset. This returns the 2490 * time 5 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea level sunrise}. 2491 * 2492 * @see ZmanimCalendar#getShaahZmanisGra() 2493 * @return the <code>Date</code> of the latest time for burning chametz on Erev Pesach. If the calculation can't be 2494 * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, 2495 * and one where it does not set, a null will be returned. See detailed explanation on top of the 2496 * {@link AstronomicalCalendar} documentation. 2497 */ 2498 public Date getSofZmanBiurChametzGRA() { 2499 return getTimeOffset(getSeaLevelSunrise(), getShaahZmanisGra() * 5); 2500 } 2501 2502 /** 2503 * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of the 2504 * <em>MGA</em> based on <em>alos</em> being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. 2505 * This time is 5 <em>{@link #getShaahZmanisMGA() shaos zmaniyos}</em> (temporal hours) after {@link #getAlos72() 2506 * dawn} based on the opinion of the <em>MGA</em> that the day is calculated from a {@link #getAlos72() dawn} of 72 2507 * minutes before sunrise to {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 5 2508 * * {@link #getShaahZmanisMGA()} after {@link #getAlos72() dawn}. 2509 * 2510 * @return the <code>Date</code> of the latest time for burning chametz on Erev Pesach. If the calculation can't be 2511 * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, 2512 * and one where it does not set), a null will be returned. See detailed explanation on top of the 2513 * {@link AstronomicalCalendar} documentation. 2514 * @see #getShaahZmanisMGA() 2515 * @see #getAlos72() 2516 */ 2517 public Date getSofZmanBiurChametzMGA72Minutes() { 2518 return getTimeOffset(getAlos72(), getShaahZmanisMGA() * 5); 2519 } 2520 2521 /** 2522 * This method returns the latest time for burning <em>chametz</em> on <em>Erev Pesach</em> according to the opinion 2523 * of the <em>MGA</em> based on <em>alos</em> being {@link #getAlos16Point1Degrees() 16.1°} before 2524 * {@link #getSunrise() sunrise}. This time is 5 <em>{@link #getShaahZmanis16Point1Degrees() shaos zmaniyos}</em> 2525 * (solar hours) after {@link #getAlos16Point1Degrees() dawn} based on the opinion of the <em>MGA</em> that the day 2526 * is calculated from dawn to nightfall with both being 16.1° below sunrise or sunset. This returns the time of 2527 * 5 {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}. 2528 * 2529 * @return the <code>Date</code> of the latest time for burning chametz on Erev Pesach. If the calculation can't be 2530 * computed such as northern and southern locations even south of the Arctic Circle and north of the 2531 * Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a null 2532 * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. 2533 * 2534 * @see #getShaahZmanis16Point1Degrees() 2535 * @see #getAlos16Point1Degrees() 2536 */ 2537 public Date getSofZmanBiurChametzMGA16Point1Degrees() { 2538 return getTimeOffset(getAlos16Point1Degrees(), getShaahZmanis16Point1Degrees() * 5); 2539 } 2540 2541 /** 2542 * A method that returns "solar" midnight, or the time when the sun is at its <a 2543 * href="http://en.wikipedia.org/wiki/Nadir">nadir</a>. <br/> 2544 * <br/> 2545 * <b>Note:</b> this method is experimental and might be removed. 2546 * 2547 * @return the <code>Date</code> of Solar Midnight (chatzos layla). If the calculation can't be computed such as in 2548 * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it 2549 * does not set, a null will be returned. See detailed explanation on top of the 2550 * {@link AstronomicalCalendar} documentation. 2551 */ 2552 public Date getSolarMidnight() { 2553 ZmanimCalendar clonedCal = (ZmanimCalendar) clone(); 2554 clonedCal.getCalendar().add(Calendar.DAY_OF_MONTH, 1); 2555 Date sunset = getSunset(); 2556 Date sunrise = clonedCal.getSunrise(); 2557 return getTimeOffset(sunset, getTemporalHour(sunset, sunrise) * 6); 2558 } 2559}