Returns true if the given moment (date + time) falls within a period
when melacha (work) is prohibited — i.e. Shabbat or a Yom Tov.
The Shabbat/Yom Tov window is taken to begin at sunset (shkiah) on the
preceding day (Erev Shabbat / Erev Yom Tov / Yom Tov sheni) and to end
at tzais (nightfall) on the day itself. Tzais is calculated using a
solar depression of 8.5° for simplicity; consult a halachic authority
for more stringent opinions.
useElevation controls whether the location's elevation is taken into
account when computing sunset (it has no effect on the degree-based
tzais calculation). The Israel/Diaspora schedule comes from
location.getIsrael().
Throws if sunset cannot be calculated for the given location
(e.g. polar regions).
Returns
trueif the given moment (date + time) falls within a period when melacha (work) is prohibited — i.e. Shabbat or a Yom Tov.The Shabbat/Yom Tov window is taken to begin at sunset (shkiah) on the preceding day (Erev Shabbat / Erev Yom Tov / Yom Tov sheni) and to end at tzais (nightfall) on the day itself. Tzais is calculated using a solar depression of 8.5° for simplicity; consult a halachic authority for more stringent opinions.
useElevationcontrols whether the location's elevation is taken into account when computing sunset (it has no effect on the degree-based tzais calculation). The Israel/Diaspora schedule comes fromlocation.getIsrael().Throws if sunset cannot be calculated for the given location (e.g. polar regions).