Package com.kosherjava.zmanim
Class ZmanimCalendar
java.lang.Object
com.kosherjava.zmanim.AstronomicalCalendar
com.kosherjava.zmanim.ZmanimCalendar
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ComplexZmanimCalendar
public class ZmanimCalendar extends AstronomicalCalendar
The ZmanimCalendar is a specialized calendar that can calculate sunrise and sunset and Jewish zmanim
(religious times) for prayers and other Jewish religious duties. This class contains the main functionality of the
Zmanim library. For a much more extensive list of zmanim use the
ComplexZmanimCalendar
that extends this
class. See documentation for the ComplexZmanimCalendar
and AstronomicalCalendar
for simple examples
on using the API. According to Rabbi Dovid Yehudah Bursztyn in his Zmanim Kehilchasam (second edition published in 2007) chapter 2 (pages 186-187) no zmanim besides sunrise and
sunset should use elevation. However Rabbi Yechiel Avrahom Zilber in the Birur Halacha Vol. 6 Ch. 58 Pages 34
and 42 is of the opinion that elevation
should be accounted for in zmanim calculations. Related to this, Rabbi Yaakov Karp in Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons should
be factored into zmanim calculations. The setting defaults to false (elevation will not be used for zmanim calculations),
unless the setting is changed to true in setUseElevation(boolean)
. This will impact sunrise and sunset based
zmanim such as AstronomicalCalendar.getSunrise()
, AstronomicalCalendar.getSunset()
, getSofZmanShmaGRA()
, alos based zmanim such as
getSofZmanShmaMGA()
that are based on a fixed offset of sunrise or sunset and zmanim based on a percentage of
the day such as ComplexZmanimCalendar.getSofZmanShmaMGA90MinutesZmanis()
that are based on sunrise and sunset.
It will not impact zmanim that are a degree based offset of sunrise and sunset, such as
ComplexZmanimCalendar.getSofZmanShmaMGA16Point1Degrees()
or ComplexZmanimCalendar.getSofZmanShmaBaalHatanya()
.
Note: It is important to read the technical notes on top of the AstronomicalCalculator
documentation
before using this code.
I would like to thank Rabbi Yaakov Shakow, the author of Luach Ikvei Hayom who spent a considerable amount of time reviewing, correcting and making suggestions on the documentation in this library.
Disclaimer:
I did my best to get accurate results, but please double-check before relying on these zmanim for halacha lemaaseh.- Author:
- © Eliyahu Hershfeld 2004 - 2020
-
Field Summary
Fields Modifier and Type Field Description private double
candleLightingOffset
The default Shabbos candle lighting offset is 18 minutes.private boolean
useElevation
Is elevation factored in for some zmanim (seeisUseElevation()
for additional information).protected static double
ZENITH_16_POINT_1
The zenith of 16.1° below geometric zenith (90°).protected static double
ZENITH_8_POINT_5
The zenith of 8.5° below geometric zenith (90°).Fields inherited from class com.kosherjava.zmanim.AstronomicalCalendar
ASTRONOMICAL_ZENITH, CIVIL_ZENITH, GEOMETRIC_ZENITH, HOUR_MILLIS, MINUTE_MILLIS, NAUTICAL_ZENITH
-
Constructor Summary
Constructors Constructor Description ZmanimCalendar()
Default constructor will set a defaultGeoLocation()
, a defaultAstronomicalCalculator
and default the calendar to the current date.ZmanimCalendar(GeoLocation location)
A constructor that takes aGeoLocation
as a parameter. -
Method Summary
Modifier and Type Method Description Date
getAlos72()
Method to return alos (dawn) calculated using 72 minutes beforesunrise
orsea level sunrise
(depending on theisUseElevation()
setting).Date
getAlosHashachar()
Returns alos (dawn) based on the time when the sun is16.1°
below the easterngeometric horizon
beforesunrise
.Date
getCandleLighting()
A method to return candle lighting time, calculated asgetCandleLightingOffset()
minutes beforesea level sunset
.double
getCandleLightingOffset()
A method to get the offset in minutes beforesea level sunset
which is used in calculating candle lighting time.Date
getChatzos()
This method returns chatzos (midday) following most opinions that chatzos is the midpoint betweensea level sunrise
andsea level sunset
.protected Date
getElevationAdjustedSunrise()
This method will returnsea level sunrise
ifisUseElevation()
is false (the default), or elevation adjustedAstronomicalCalendar.getSunrise()
if it is true.protected Date
getElevationAdjustedSunset()
This method will returnsea level sunrise
ifisUseElevation()
is false (the default), or elevation adjustedAstronomicalCalendar.getSunrise()
if it is true.Date
getMinchaGedola()
This method returns the latest mincha gedola,the earliest time one can pray mincha that is 6.5 *shaos zmaniyos
(solar hours) aftersunrise
orsea level sunrise
(depending on theisUseElevation()
setting), according to the GRA.Date
getMinchaGedola(Date startOfDay, Date endOfDay)
A generic method for calculating the latest mincha gedola (the earliest time to recite the mincha prayers) that is 6.5 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end of the day passed to this method.Date
getMinchaKetana()
This method returns mincha ketana,the preferred earliest time to pray mincha in the opinion of the Rambam and others, that is 9.5 *shaos zmaniyos
(solar hours) aftersunrise
orsea level sunrise
(depending on theisUseElevation()
setting), according to the GRA.Date
getMinchaKetana(Date startOfDay, Date endOfDay)
A generic method for calculating mincha ketana, (the preferred time to recite the mincha prayers in the opinion of the Rambam and others) that is 9.5 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end of the day passed to this method.Date
getPlagHamincha()
This method returns plag hamincha, that is 10.75 *shaos zmaniyos
(solar hours) aftersunrise
orsea level sunrise
(depending on theisUseElevation()
setting), according to the GRA.Date
getPlagHamincha(Date startOfDay, Date endOfDay)
A generic method for calculating plag hamincha (the earliest time that Shabbos can be started) that is 10.75 hours after the start of the day, (or 1.25 hours before the end of the day) based on the start and end of the day passed to the method.Date
getShaahZmanisBasedZman(Date startOfDay, Date endOfDay, double hours)
A generic utility method for calculating any shaah zmanis (temporal hour) based zman with the day defined as the start and end of day (or night) and the number of shaahos zmaniyos passed to the method.long
getShaahZmanisGra()
A method that returns a shaah zmanis (temporal hour
) according to the opinion of the GRA.long
getShaahZmanisMGA()
A method that returns a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on a 72 minutes alos and tzais.Date
getSofZmanShma(Date startOfDay, Date endOfDay)
A generic method for calculating the latest zman krias shema (time to recite shema in the morning) that is 3 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end of the day passed to this method.Date
getSofZmanShmaGRA()
This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *shaos zmaniyos
(solar hours) aftersunrise
orsea level sunrise
(depending on theisUseElevation()
setting), according to the GRA.Date
getSofZmanShmaMGA()
This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *shaos zmaniyos
(solar hours) aftergetAlos72()
, according to the Magen Avraham (MGA).Date
getSofZmanTfila(Date startOfDay, Date endOfDay)
A generic method for calculating the latest zman tfilah (time to recite the morning prayers) that is 4 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end of the day passed to this method.Date
getSofZmanTfilaGRA()
This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *shaos zmaniyos
(solar hours) aftersunrise
orsea level sunrise
(depending on theisUseElevation()
setting), according to the GRA.Date
getSofZmanTfilaMGA()
This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *shaos zmaniyos
(solar hours) aftergetAlos72()
, according to the Magen Avraham (MGA).Date
getTzais()
A method that returns tzais (nightfall) when the sun is8.5°
below thegeometric horizon
(90°) aftersunset
, a time that Rabbi Meir Posen in his the Ohr Meir calculated that 3 small stars are visible, which is later than the required 3 medium stars.Date
getTzais72()
This method returns the tzais (nightfall) based on the opinion of Rabbeinu Tam that tzais hakochavim is calculated as 72 minutes, the time it takes to walk 4 Mil at 18 minutes a Mil.boolean
isAssurBemlacha(Date currentTime, Date tzais, boolean inIsrael)
This is a utility method to determine if the current Date (date-time) passed in has a melacha (work) prohibition.boolean
isUseElevation()
Is elevation above sea level calculated for times besides sunrise and sunset.void
setCandleLightingOffset(double candleLightingOffset)
A method to set the offset in minutes beforesea level sunset
that is used in calculating candle lighting time.void
setUseElevation(boolean useElevation)
Sets whether elevation above sea level is factored into zmanim calculations for times besides sunrise and sunset.Methods inherited from class com.kosherjava.zmanim.AstronomicalCalendar
clone, equals, getAstronomicalCalculator, getBeginAstronomicalTwilight, getBeginCivilTwilight, getBeginNauticalTwilight, getCalendar, getDateFromTime, getEndAstronomicalTwilight, getEndCivilTwilight, getEndNauticalTwilight, getGeoLocation, getSeaLevelSunrise, getSeaLevelSunset, getSunrise, getSunriseOffsetByDegrees, getSunriseSolarDipFromOffset, getSunset, getSunsetOffsetByDegrees, getSunsetSolarDipFromOffset, getSunTransit, getSunTransit, getTemporalHour, getTemporalHour, getTimeOffset, getTimeOffset, getUTCSeaLevelSunrise, getUTCSeaLevelSunset, getUTCSunrise, getUTCSunset, hashCode, setAstronomicalCalculator, setCalendar, setGeoLocation, toJSON, toString
-
Field Details
-
useElevation
Is elevation factored in for some zmanim (seeisUseElevation()
for additional information).- See Also:
isUseElevation()
,setUseElevation(boolean)
-
ZENITH_16_POINT_1
The zenith of 16.1° below geometric zenith (90°). This calculation is used for determining alos (dawn) and tzais (nightfall) in some opinions. It is based on the calculation that the time between dawn and sunrise (and sunset to nightfall) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes a mil (Rambam and others). The sun's position at 72 minutes beforesunrise
in Jerusalem on the equinox (on March 16, about 4 days before the astronomical equinox, the day that a solar hour is 60 minutes) is 16.1° belowgeometric zenith
.- See Also:
getAlosHashachar()
,ComplexZmanimCalendar.getAlos16Point1Degrees()
,ComplexZmanimCalendar.getTzais16Point1Degrees()
,ComplexZmanimCalendar.getSofZmanShmaMGA16Point1Degrees()
,ComplexZmanimCalendar.getSofZmanTfilaMGA16Point1Degrees()
,ComplexZmanimCalendar.getMinchaGedola16Point1Degrees()
,ComplexZmanimCalendar.getMinchaKetana16Point1Degrees()
,ComplexZmanimCalendar.getPlagHamincha16Point1Degrees()
,ComplexZmanimCalendar.getPlagAlos16Point1ToTzaisGeonim7Point083Degrees()
,ComplexZmanimCalendar.getSofZmanShmaAlos16Point1ToSunset()
, Constant Field Values
-
ZENITH_8_POINT_5
The zenith of 8.5° below geometric zenith (90°). This calculation is used for calculating alos (dawn) and tzais (nightfall) in some opinions. This calculation is based on the position of the sun 36 minutes aftersunset
in Jerusalem on March 16, about 4 days before the equinox, the day that a solar hour is 60 minutes, which is 8.5° belowgeometric zenith
. The Ohr Meir considers this the time that 3 small stars are visible, which is later than the required 3 medium stars. -
candleLightingOffset
The default Shabbos candle lighting offset is 18 minutes. This can be changed via thesetCandleLightingOffset(double)
and retrieved by thegetCandleLightingOffset()
.
-
-
Constructor Details
-
ZmanimCalendar
public ZmanimCalendar()Default constructor will set a defaultGeoLocation()
, a defaultAstronomicalCalculator
and default the calendar to the current date.- See Also:
AstronomicalCalendar()
-
ZmanimCalendar
A constructor that takes aGeoLocation
as a parameter.- Parameters:
location
- the location
-
-
Method Details
-
isUseElevation
Is elevation above sea level calculated for times besides sunrise and sunset. According to Rabbi Dovid Yehuda Bursztyn in his Zmanim Kehilchasam (second edition published in 2007) chapter 2 (pages 186-187) no zmanim besides sunrise and sunset should use elevation. However Rabbi Yechiel Avrahom Zilber in the Birur Halacha Vol. 6 Ch. 58 Pages 34 and 42 is of the opinion that elevation should be accounted for in zmanim calculations. Related to this, Rabbi Yaakov Karp in Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons should be factored into zmanim calculations.The setting defaults to false (elevation will not be used for zmanim calculations), unless the setting is changed to true insetUseElevation(boolean)
. This will impact sunrise and sunset based zmanim such asAstronomicalCalendar.getSunrise()
,AstronomicalCalendar.getSunset()
,getSofZmanShmaGRA()
, alos based zmanim such asgetSofZmanShmaMGA()
that are based on a fixed offset of sunrise or sunset and zmanim based on a percentage of the day such asComplexZmanimCalendar.getSofZmanShmaMGA90MinutesZmanis()
that are based on sunrise and sunset. It will not impact zmanim that are a degree based offset of sunrise and sunset, such asComplexZmanimCalendar.getSofZmanShmaMGA16Point1Degrees()
orComplexZmanimCalendar.getSofZmanShmaBaalHatanya()
.- Returns:
- if the use of elevation is active
- See Also:
setUseElevation(boolean)
-
setUseElevation
Sets whether elevation above sea level is factored into zmanim calculations for times besides sunrise and sunset. SeeisUseElevation()
for more details.- Parameters:
useElevation
- set to true to use elevation in zmanim calculations- See Also:
isUseElevation()
-
getElevationAdjustedSunrise
This method will returnsea level sunrise
ifisUseElevation()
is false (the default), or elevation adjustedAstronomicalCalendar.getSunrise()
if it is true. This allows relevant zmanim in this and extending classes (such as theComplexZmanimCalendar
) to automatically adjust to the elevation setting.- Returns:
AstronomicalCalendar.getSeaLevelSunrise()
ifisUseElevation()
is false (the default), or elevation adjustedAstronomicalCalendar.getSunrise()
if it is true.- See Also:
AstronomicalCalendar.getSunrise()
-
getElevationAdjustedSunset
This method will returnsea level sunrise
ifisUseElevation()
is false (the default), or elevation adjustedAstronomicalCalendar.getSunrise()
if it is true. This allows relevant zmanim in this and extending classes (such as theComplexZmanimCalendar
) to automatically adjust to the elevation setting.- Returns:
AstronomicalCalendar.getSeaLevelSunset()
ifisUseElevation()
is false (the default), or elevation adjustedAstronomicalCalendar.getSunset()
if it is true.- See Also:
AstronomicalCalendar.getSunset()
-
getTzais
A method that returns tzais (nightfall) when the sun is8.5°
below thegeometric horizon
(90°) aftersunset
, a time that Rabbi Meir Posen in his the Ohr Meir calculated that 3 small stars are visible, which is later than the required 3 medium stars. See theZENITH_8_POINT_5
constant.- Returns:
- The
Date
of nightfall. If the calculation can't be computed such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation. - See Also:
ZENITH_8_POINT_5
,ComplexZmanimCalendar#getTzaisGeonim8Point5Degrees() that returns an identical time to this generic tzais
-
getAlosHashachar
Returns alos (dawn) based on the time when the sun is16.1°
below the easterngeometric horizon
beforesunrise
. This is based on the calculation that the time between dawn and sunrise (and sunset to nightfall) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes a mil (Rambam and others). The sun's position at 72 minutes beforesunrise
in Jerusalem on the equinox (on March 16, about 4 days before the astronomical equinox, the day that a solar hour is 60 minutes) is 16.1° below. See theAstronomicalCalendar.GEOMETRIC_ZENITH
constant.- Returns:
- The
Date
of dawn. If the calculation can't be computed such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation. - See Also:
ZENITH_16_POINT_1
,ComplexZmanimCalendar.getAlos16Point1Degrees()
-
getAlos72
Method to return alos (dawn) calculated using 72 minutes beforesunrise
orsea level sunrise
(depending on theisUseElevation()
setting). This time is based on the time to walk the distance of 4 Mil at 18 minutes a Mil. The 72 minute time (but not the concept of fixed minutes) is based on the opinion that the time of the Neshef (twilight between dawn and sunrise) does not vary by the time of year or location but depends on the time it takes to walk the distance of 4 Mil.- Returns:
- the
Date
representing the time. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation.
-
getChatzos
This method returns chatzos (midday) following most opinions that chatzos is the midpoint betweensea level sunrise
andsea level sunset
. A day starting at alos and ending at tzais using the same time or degree offset will also return the same time. The returned value is identical toAstronomicalCalendar.getSunTransit()
. In reality due to lengthening or shortening of day, this is not necessarily the exact midpoint of the day, but it is very close.- Returns:
- the
Date
of chatzos. If the calculation can't be computed such as in the Arctic Circle where there is at least one day where the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation. - See Also:
AstronomicalCalendar.getSunTransit()
-
getSofZmanShma
A generic method for calculating the latest zman krias shema (time to recite shema in the morning) that is 3 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end of the day passed to this method. The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and the latest zman krias shema is calculated as 3 of those shaos zmaniyos after the beginning of the day. As an example, passingsunrise
andsunset
orsea level sunrise
andsea level sunset
(depending on theisUseElevation()
elevation setting) to this method will return sof zman krias shema according to the opinion of the GRA.- Parameters:
startOfDay
- the start of day for calculating zman krias shema. This can be sunrise or any alos passed to this method.endOfDay
- the end of day for calculating zman krias shema. This can be sunset or any tzais passed to this method.- Returns:
- the
Date
of the latest zman shema based on the start and end of day times passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation.
-
getSofZmanShmaGRA
This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *shaos zmaniyos
(solar hours) aftersunrise
orsea level sunrise
(depending on theisUseElevation()
setting), according to the GRA. The day is calculated fromsea level sunrise
tosea level sunset
orsunrise
tosunset
(depending on theisUseElevation()
setting).- Returns:
- the
Date
of the latest zman shema according to the GRA. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set, a null will be returned. See the detailed explanation on top of theAstronomicalCalendar
documentation. - See Also:
getSofZmanShma(Date, Date)
,getShaahZmanisGra()
,isUseElevation()
,ComplexZmanimCalendar.getSofZmanShmaBaalHatanya()
-
getSofZmanShmaMGA
This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *shaos zmaniyos
(solar hours) aftergetAlos72()
, according to the Magen Avraham (MGA). The day is calculated from 72 minutes beforesea level sunrise
to 72 minutes aftersea level sunset
or from 72 minutes beforesunrise
tosunset
(depending on theisUseElevation()
setting).- Returns:
- the
Date
of the latest zman shema. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation. - See Also:
getSofZmanShma(Date, Date)
,ComplexZmanimCalendar.getShaahZmanis72Minutes()
,getAlos72()
,that
-
getTzais72
This method returns the tzais (nightfall) based on the opinion of Rabbeinu Tam that tzais hakochavim is calculated as 72 minutes, the time it takes to walk 4 Mil at 18 minutes a Mil. According to the Machtzis Hashekel in Orach Chaim 235:3, the Pri Megadim in Orach Chaim 261:2 (see the Biur Halacha) and others (see Hazmanim Bahalacha 17:3 and 17:5) the 72 minutes are standard clock minutes any time of the year in any location. Depending on theisUseElevation()
setting) a 72 minute offset from eithersunset
orsea level sunset
is used.- Returns:
- the
Date
representing 72 minutes after sunset. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set, a null will be returned See detailed explanation on top of theAstronomicalCalendar
documentation. - See Also:
ComplexZmanimCalendar.getTzais16Point1Degrees()
-
getCandleLighting
A method to return candle lighting time, calculated asgetCandleLightingOffset()
minutes beforesea level sunset
. This will return the time for any day of the week, since it can be used to calculate candle lighting time for Yom Tov (mid-week holidays) as well. Elevation adjustments are intentionally not performed by this method, but you can calculate it by passing the elevation adjusted sunset toAstronomicalCalendar.getTimeOffset(Date, long)
.- Returns:
- candle lighting time. If the calculation can't be computed such as in the Arctic Circle where there is at
least one day a year where the sun does not rise, and one where it does not set, a null will be returned.
See detailed explanation on top of the
AstronomicalCalendar
documentation. - See Also:
AstronomicalCalendar.getSeaLevelSunset()
,getCandleLightingOffset()
,setCandleLightingOffset(double)
-
getSofZmanTfila
A generic method for calculating the latest zman tfilah (time to recite the morning prayers) that is 4 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end of the day passed to this method. The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and sof zman tfila is calculated as 4 of those shaos zmaniyos after the beginning of the day. As an example, passingsunrise
andsunset
orsea level sunrise
andsea level sunset
(depending on theisUseElevation()
elevation setting) to this method will return zman tfilah according to the opinion of the GRA.- Parameters:
startOfDay
- the start of day for calculating zman tfilah. This can be sunrise or any alos passed to this method.endOfDay
- the end of day for calculating zman tfilah. This can be sunset or any tzais passed to this method.- Returns:
- the
Date
of the latest zman tfilah based on the start and end of day times passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation.
-
getSofZmanTfilaGRA
This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *shaos zmaniyos
(solar hours) aftersunrise
orsea level sunrise
(depending on theisUseElevation()
setting), according to the GRA. The day is calculated fromsea level sunrise
tosea level sunset
orsunrise
tosunset
(depending on theisUseElevation()
setting).- Returns:
- the
Date
of the latest zman tfilah. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation. - See Also:
getSofZmanTfila(Date, Date)
,getShaahZmanisGra()
,ComplexZmanimCalendar.getSofZmanTfilaBaalHatanya()
-
getSofZmanTfilaMGA
This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *shaos zmaniyos
(solar hours) aftergetAlos72()
, according to the Magen Avraham (MGA). The day is calculated from 72 minutes beforesea level sunrise
to 72 minutes aftersea level sunset
or from 72 minutes beforesunrise
tosunset
(depending on theisUseElevation()
setting).- Returns:
- the
Date
of the latest zman tfila. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set), a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation. - See Also:
getSofZmanTfila(Date, Date)
,getShaahZmanisMGA()
,getAlos72()
-
getMinchaGedola
A generic method for calculating the latest mincha gedola (the earliest time to recite the mincha prayers) that is 6.5 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end of the day passed to this method. The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and mincha gedola is calculated as 6.5 of those shaos zmaniyos after the beginning of the day. As an example, passingsunrise
andsunset
orsea level sunrise
andsea level sunset
(depending on theisUseElevation()
elevation setting) to this method will return mincha gedola according to the opinion of the GRA.- Parameters:
startOfDay
- the start of day for calculating Mincha gedola. This can be sunrise or any alos passed to this method.endOfDay
- the end of day for calculating Mincha gedola. This can be sunrise or any alos passed to this method.- Returns:
- the
Date
of the time of Mincha gedola based on the start and end of day times passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation.
-
getMinchaGedola
This method returns the latest mincha gedola,the earliest time one can pray mincha that is 6.5 *shaos zmaniyos
(solar hours) aftersunrise
orsea level sunrise
(depending on theisUseElevation()
setting), according to the GRA. Mincha gedola is the earliest time one can pray mincha. The Ramba"m is of the opinion that it is better to delay mincha untilmincha ketana
while the Ra"sh, Tur, GRA and others are of the opinion that mincha can be prayed lechatchila starting at mincha gedola. The day is calculated fromsea level sunrise
tosea level sunset
orsunrise
tosunset
(depending on theisUseElevation()
setting).- Returns:
- the
Date
of the time of mincha gedola. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation. - See Also:
getMinchaGedola(Date, Date)
,getShaahZmanisGra()
,getMinchaKetana()
,ComplexZmanimCalendar.getMinchaGedolaBaalHatanya()
-
getMinchaKetana
A generic method for calculating mincha ketana, (the preferred time to recite the mincha prayers in the opinion of the Rambam and others) that is 9.5 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end of the day passed to this method. The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and mincha ketana is calculated as 9.5 of those shaos zmaniyos after the beginning of the day. As an example, passingsunrise
andsunset
orsea level sunrise
andsea level sunset
(depending on theisUseElevation()
elevation setting) to this method will return mincha ketana according to the opinion of the GRA.- Parameters:
startOfDay
- the start of day for calculating Mincha ketana. This can be sunrise or any alos passed to this method.endOfDay
- the end of day for calculating Mincha ketana. This can be sunrise or any alos passed to this method.- Returns:
- the
Date
of the time of Mincha ketana based on the start and end of day times passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation.
-
getMinchaKetana
This method returns mincha ketana,the preferred earliest time to pray mincha in the opinion of the Rambam and others, that is 9.5 *shaos zmaniyos
(solar hours) aftersunrise
orsea level sunrise
(depending on theisUseElevation()
setting), according to the GRA. For more information on this see the documentation onmincha gedola
. The day is calculated fromsea level sunrise
tosea level sunset
orsunrise
tosunset
(depending on theisUseElevation()
setting.- Returns:
- the
Date
of the time of mincha ketana. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation. - See Also:
getMinchaKetana(Date, Date)
,getShaahZmanisGra()
,getMinchaGedola()
,ComplexZmanimCalendar.getMinchaKetanaBaalHatanya()
-
getPlagHamincha
A generic method for calculating plag hamincha (the earliest time that Shabbos can be started) that is 10.75 hours after the start of the day, (or 1.25 hours before the end of the day) based on the start and end of the day passed to the method. The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and plag hamincha is calculated as 10.75 of those shaos zmaniyos after the beginning of the day. As an example, passingsunrise
andsunset
orsea level sunrise
andsea level sunset
(depending on theisUseElevation()
elevation setting) to this method will return plag mincha according to the opinion of the GRA.- Parameters:
startOfDay
- the start of day for calculating plag. This can be sunrise or any alos passed to this method.endOfDay
- the end of day for calculating plag. This can be sunrise or any alos passed to this method.- Returns:
- the
Date
of the time of plag hamincha based on the start and end of day times passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation.
-
getPlagHamincha
This method returns plag hamincha, that is 10.75 *shaos zmaniyos
(solar hours) aftersunrise
orsea level sunrise
(depending on theisUseElevation()
setting), according to the GRA. Plag hamincha is the earliest time that Shabbos can be started. The day is calculated fromsea level sunrise
tosea level sunset
orsunrise
tosunset
(depending on theisUseElevation()
- Returns:
- the
Date
of the time of plag hamincha. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation. - See Also:
getPlagHamincha(Date, Date)
,ComplexZmanimCalendar.getPlagHaminchaBaalHatanya()
-
getShaahZmanisGra
A method that returns a shaah zmanis (temporal hour
) according to the opinion of the GRA. This calculation divides the day based on the opinion of the GRA that the day runs from fromsea level sunrise
tosea level sunset
orsunrise
tosunset
(depending on theisUseElevation()
setting). The day is split into 12 equal parts with each one being a shaah zmanis. This method is similar toAstronomicalCalendar.getTemporalHour()
, but can account for elevation.- Returns:
- the
long
millisecond length of a shaah zmanis calculated from sunrise to sunset. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set,Long.MIN_VALUE
will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation. - See Also:
AstronomicalCalendar.getTemporalHour(Date, Date)
,AstronomicalCalendar.getSeaLevelSunrise()
,AstronomicalCalendar.getSeaLevelSunset()
,ComplexZmanimCalendar.getShaahZmanisBaalHatanya()
-
getShaahZmanisMGA
A method that returns a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on a 72 minutes alos and tzais. This calculation divides the day that runs from dawn to dusk (for sof zman krias shema and tfila). Dawn for this calculation is 72 minutes beforesunrise
orsea level sunrise
(depending on theisUseElevation()
elevation setting) and dusk is 72 minutes aftersunset
orsea level sunset
(depending on theisUseElevation()
elevation setting). This day is split into 12 equal parts with each part being a shaah zmanis. Alternate methods of calculating a shaah zmanis according to the Magen Avraham (MGA) are available in the subclassComplexZmanimCalendar
.- Returns:
- the
long
millisecond length of a shaah zmanis. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set,Long.MIN_VALUE
will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation.
-
getCandleLightingOffset
A method to get the offset in minutes beforesea level sunset
which is used in calculating candle lighting time. The default time used is 18 minutes before sea level sunset. Some calendars use 15 minutes, while the custom in Jerusalem is to use a 40 minute offset. Please check the local custom for candle lighting time.- Returns:
- Returns the currently set candle lighting offset in minutes.
- See Also:
getCandleLighting()
,setCandleLightingOffset(double)
-
setCandleLightingOffset
A method to set the offset in minutes beforesea level sunset
that is used in calculating candle lighting time. The default time used is 18 minutes before sunset. Some calendars use 15 minutes, while the custom in Jerusalem is to use a 40 minute offset.- Parameters:
candleLightingOffset
- The candle lighting offset to set in minutes.- See Also:
getCandleLighting()
,getCandleLightingOffset()
-
isAssurBemlacha
This is a utility method to determine if the current Date (date-time) passed in has a melacha (work) prohibition. Since there are many opinions on the time of tzais, the tzais for the current day has to be passed to this class. Sunset is the classes current day'selevation adjusted sunset
that observes theisUseElevation()
settings. TheJewishCalendar.getInIsrael()
will be set by the inIsrael parameter.- Parameters:
currentTime
- the current timetzais
- the time of tzaisinIsrael
- whether to use Israel holiday scheme or not- Returns:
- true if melacha is prohibited or false if it is not.
- See Also:
JewishCalendar.isAssurBemelacha()
,JewishCalendar.hasCandleLighting()
,JewishCalendar.setInIsrael(boolean)
-
getShaahZmanisBasedZman
A generic utility method for calculating any shaah zmanis (temporal hour) based zman with the day defined as the start and end of day (or night) and the number of shaahos zmaniyos passed to the method. This simplifies the code in other methods such asgetPlagHamincha(Date, Date)
and cuts down on code replication. As an example, passingsunrise
andsunset
orsea level sunrise
andsea level sunset
(depending on theisUseElevation()
elevation setting) and 10.75 hours to this method will return plag mincha according to the opinion of the GRA.- Parameters:
startOfDay
- the start of day for calculating the zman. This can be sunrise or any alos passed to this method.endOfDay
- the end of day for calculating the zman. This can be sunrise or any alos passed to this method.hours
- the number of shaahos zmaniyos (temporal hours) to offset from the start of day- Returns:
- the
Date
of the time of zman with the shaahos zmaniyos (temporal hours) in the day offset from the start of day passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on top of theAstronomicalCalendar
documentation.
-