Initialize a Zmanim instance.
GeoLocation including latitude, longitude, and timezone
Regular or Hebrew Date. If date is a regular Date,
hours, minutes, seconds and milliseconds are ignored.
use elevation for calculations (default false).
If true, use elevation to affect the calculation of all sunrise/sunset based
zmanim. Note: there are some zmanim such as degree-based zmanim that are driven
by the amount of light in the sky and are not impacted by elevation.
These zmanim intentionally do not support elevation adjustment.
Returns the Baal Hatanya's alos (dawn) calculated as the time when the sun is 16.9° below the eastern GEOMETRIC_ZENITH geometric horizon before getSunrise() sunrise.
The zenith of 16.9° below is based on the calculation that the time between dawn and netz amiti (sunrise) 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 before getSunriseBaalHatanya netz amiti (sunrise) in Jerusalem <a href=../media/src "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux is 16.9° below GEOMETRIC_ZENITH geometric zenith.
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.
Dawn – Alot haShachar; Sun is 16.1° below the horizon in the morning. Because degree-based functions estimate the amount of light in the sky, the result is not impacted by elevation.
Dawn – Alot haShachar; calculated as 72 minutes before sunrise or sea level sunrise.
Rabbeinu Tam holds that bein hashmashos is a specific time between sunset and tzeis hakochavim. One opinion on how to calculate this time is that it is 13.5 minutes before tzies 7.083. Because degree-based functions estimate the amount of light in the sky, the result is not impacted by elevation.
Midday – Chatzot; Sunrise plus 6 halachic hours
Midnight – Chatzot; Sunset plus 6 halachic hours. If elevation is enabled, this function will include elevation in the calculation.
Civil dawn; Sun is 6° below the horizon in the morning. Because degree-based functions estimate the amount of light in the sky, the result is not impacted by elevation.
Civil dusk; Sun is 6° below the horizon in the evening. Because degree-based functions estimate the amount of light in the sky, the result is not impacted by elevation.
Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the opinion of the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the Rema who brings down the opinion of the Maharil's of calculating half way between molad and molad is of the opinion that the Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, See Rabbi Dovid Heber's very detailed write-up in Siman Daled (chapter 4) of Shaarei Zmanim. The sof zman Kiddush Levana will be returned even if it occurs during the day. To limit the time to between tzais and alos, see getSofZmanKidushLevana15Days.
the Date representing the moment 15 days after the molad. If the time occurs between
alos and tzais, alos will be returned. If the zman will not occur on this day, a
null will be returned.
Returns the latest time of Kiddush Levana according to the Maharil's opinion that it is calculated as halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between molad and molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad. The sof zman Kiddush Levana will be returned even if it occurs during the day. To limit the time to between tzais and alos, see getSofZmanKidushLevanaBetweenMoldos.
the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at tzais), the time returned will be alos. If either the alos or tzais parameters are null, no daytime adjustment will be made.
the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at tzais), the time returned will be alos. If either the alos or tzais parameters are null, no daytime adjustment will be made.
the Date representing the moment halfway between molad and molad. If the time occurs between
alos and tzais, alos will be returned. If the zman will not occur on this
day, a null will be returned.
Returns the earliest time of Kiddush Levana according to <a href=../media/src "https://en.wikipedia.org/wiki/Yonah_Gerondi">Rabbeinu Yonah's opinion that it can be said 3 days after the molad. If the time of tchilas zman Kiddush Levana occurs during the day (between alos and tzais passed to this method) it will return the following tzais. If null is passed for either alos or tzais, the actual tchilas zman Kiddush Levana will be returned, regardless of if it is during the day or not.
the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at tzais), the time returned will be tzais. If either the alos or tzais parameters are null, no daytime adjustment will be made.
the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at tzais), the time returned will be tzais. If either the alos or tzais parameters are null, no daytime adjustment will be made.
the Date representing the moment 3 days after the molad. If the time occurs between alos and
tzais, tzais will be returned. If the zman will not occur on this day, a
null will be returned.
Returns the earliest time of Kiddush Levana according to the opinions that it should not be said until 7 days after the molad. The time will be returned even if it occurs during the day when Kiddush Levana can't be recited. Use getTchilasZmanKidushLevana7Days if you want to limit the time to night hours.
the Date representing the moment 7 days after the molad regardless of it is day or night. If the zman
will not occur on this day, a null will be returned.
Returns true if elevation adjustment is enabled
for zmanim support elevation adjustment
Returns the point in time of Molad as a Date Object. For the traditional day of week, hour,
minute and chalakim, () and the not yet completed
HebrewDateFormatter that will have formatting for this.
the Date representing the moment of the molad. If the molad does not occur on this day, a
null will be returned.
Returns sunset for the previous day. If elevation is enabled, this function will include elevation in the calculation.
Earliest Mincha – Mincha Gedola (GRA); Sunrise plus 6.5 halachic hours. If elevation is enabled, this function will include elevation in the calculation.
This method returns the latest mincha gedola, the earliest time one can pray mincha
that is 6.5 shaos zmaniyos (solar hours) after sunrise or sea level sunrise
(depending on the useElevation setting), according
to the GRA.
The Ramba"m is of the opinion that it is better to delay mincha until mincha ketana while the Ra"sh, Tur, GRA and others are of the opinion that mincha can be prayed lechatchila starting at mincha gedola.
This method returns the time of mincha gedola. Mincha gedola is the earliest time one can pray mincha. The Rambam is of the opinion that it is better to delay mincha until () mincha ketana while the Ra"sh, Tur, <a href=../media/src "https://en.wikipedia.org/wiki/Vilna_Gaon">GRA and others are of the opinion that mincha can be prayed lechatchila starting at mincha gedola. This is calculated as 6.5 getShaahZmanisBaalHatanya() sea level solar hours after getSunriseBaalHatanya() netz amiti (sunrise). This calculation is based on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time 6.5
the Date of the time of mincha gedola according to the Baal Hatanya. 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.
Earliest Mincha – Mincha Gedola (MGA); Sunrise plus 6.5 halachic hours. If elevation is enabled, this function will include elevation in the calculation.
This method returns the time of mincha gedola according to the Magen Avraham with the day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the earliest time to pray mincha.
Preferable earliest time to recite Minchah – Mincha Ketana; Sunrise plus 9.5 halachic hours. If elevation is enabled, this function will include elevation in the calculation.
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) after sunrise or sea level sunrise
(depending on the useElevation setting), according
to the GRA.
This method returns the time of mincha ketana. This is the preferred earliest time to pray mincha in the opinion of the Rambam and others. For more information on this see the documentation on () mincha gedola. This is calculated as 9.5 sea level solar hours after getSunriseBaalHatanya netz amiti (sunrise). This calculation is calculated based on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time 9.5 * after netz amiti (sunrise).
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.
This method returns the time of mincha ketana according to the Magen Avraham with the day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the preferred earliest time to pray mincha according to the opinion of the Rambam and others.
If elevation is enabled, this function will include elevation in the calculation.
Earliest talis & tefillin – Misheyakir; Sun is 11.5° below the horizon in the morning. Because degree-based functions estimate the amount of light in the sky, the result is not impacted by elevation.
Earliest talis & tefillin – Misheyakir Machmir; Sun is 10.2° below the horizon in the morning. Because degree-based functions estimate the amount of light in the sky, the result is not impacted by elevation.
Alias for sunrise
Plag haMincha; Sunrise plus 10.75 halachic hours. If elevation is enabled, this function will include elevation in the calculation.
This method returns the time of plag hamincha. This is calculated as 10.75 hours after sunrise. This calculation is based on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time 10.75 * getShaahZmanisBaalHatanya() after getSunriseBaalHatanya() netz amiti (sunrise).
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.
Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon). This function does not support elevation adjustment.
When the upper edge of the Sun disappears below the horizon (0.833° below horizon). This function does not support elevation adjustment.
Enables or disables elevation adjustment for zmanim support elevation adjustment
Alias for sunset
This method returns the latest time for burning chametz on Erev Pesach according to the opinion of the GRA. This time is 5 hours into the day based on the opinion of the GRA that the day is calculated from sunrise to sunset. This returns the time 5 * #getShaahZmanisGra() after #getSeaLevelSunrise() sea level sunrise.
the Date of the latest time for burning chametz on Erev Pesach. If it is not
erev Pesach or 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.
Latest Shema (Gra); Sunrise plus 3 halachic hours, according to the Gra. If elevation is enabled, this function will include elevation in the calculation.
This method returns the latest zman krias shema (time to recite Shema in the morning). This time is 3 shaahZmanisBaalHatanya() shaos zmaniyos (solar hours) after getSunriseBaalHatanya() netz amiti (sunrise) based on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time 3 * getShaahZmanisBaalHatanya() after getSunriseBaalHatanya() netz amiti (sunrise).
the Date of the latest zman shema according to the Baal Hatanya. 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.
Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham. Based on the opinion of the MGA that the day is calculated from dawn being fixed 72 minutes before sea-level sunrise, and nightfall is fixed 72 minutes after sea-level sunset.
Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham. Based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° below the horizon.
Latest Shema (MGA); Sunrise plus 3 halachic hours, according to Magen Avraham. Based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 19.8° below the horizon.
This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem around the equinox / equilux which calculates to 19.8° below geometric zenith. https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
This method returns the latest zman tfilah (time to recite the morning prayers). This time is 4 hours into the day based on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time 4 * getShaahZmanisBaalHatanya() after getSunriseBaalHatanya() netz amiti (sunrise).
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.
Latest Shacharit (Gra); Sunrise plus 4 halachic hours, according to the Gra.
This method returns the latest zman tfila (time to recite shema in the morning)
that is 4 shaos zmaniyos (solar hours) after sunrise or sea level sunrise
(depending on the useElevation setting), according
to the GRA.
If elevation is enabled, this function will include elevation in the calculation.
Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham
Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham. Based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° below the horizon.
Latest Shacharit (MGA); Sunrise plus 4 halachic hours, according to Magen Avraham. Based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 19.8° below the horizon.
This calculation is based on the position of the sun 90 minutes after sunset in Jerusalem around the equinox / equilux which calculates to 19.8° below geometric zenith. https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/
Upper edge of the Sun appears over the eastern horizon in the morning (0.833° above horizon) If elevation is enabled, this function will include elevation in the calculation.
Returns sunrise + offset minutes (either positive or negative).
If elevation is enabled, this function will include elevation in the calculation
unless forceSeaLevel is true.
minutes
round time to nearest minute (default true)
use sea-level sunrise (default false)
When the upper edge of the Sun disappears below the horizon (0.833° below horizon). If elevation is enabled, this function will include elevation in the calculation.
Returns sunset + offset minutes (either positive or negative).
If elevation is enabled, this function will include elevation in the calculation
unless forceSeaLevel is true.
minutes
round time to nearest minute (default true)
use sea-level sunset (default false)
Convenience function to get the time when sun is above or below the horizon for a certain angle (in degrees). This function does not support elevation adjustment.
A method that returns tzais (nightfall) when the sun is 6° below the western geometric horizon (90°) after getSunset() sunset. For information on the source of this calculation see ZENITH_6_DEGREES.
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. *
Optionalangle: number = 8.5optional time for solar depression. Default is 8.5 degrees for 3 small stars, use 7.083 degrees for 3 medium-sized stars. Because degree-based functions estimate the amount of light in the sky, the result is not impacted by elevation.
StaticformatReturns a string like "2022-04-01T13:06:00-11:00"
StaticformatUses timeFormat to return a date like '20:34'.
Returns XX:XX if the date is invalid.
StaticmakeReturns the Hebrew date relative to the specified location and Gregorian date, taking into consideration whether the time is before or after sunset.
For example, if the given date and is 2024-09-22T10:35 (before sunset), and
sunset for the specified location is 19:04, then this function would
return a Hebrew date of 19th of Elul, 5784.
If the given date is the same Gregorian day after sunset
(for example 2024-09-22T20:07), this function would return a
Hebrew date of 20th of Elul, 5784.
const {GeoLocation, Zmanim, HDate} = require('@hebcal/core');
const latitude = 48.85341;
const longitude = 2.3488;
const timezone = 'Europe/Paris';
const gloc = new GeoLocation(null, latitude, longitude, 0, timezone);
const before = Zmanim.makeSunsetAwareHDate(gloc, new Date('2024-09-22T17:38:46.123Z'), false);
console.log(before.toString()); // '19 Elul 5784'
const after = Zmanim.makeSunsetAwareHDate(gloc, new Date('2024-09-22T23:45:18.345Z'), false);
console.log(after.toString()); // '20 Elul 5784'
StaticroundDiscards seconds, rounding to nearest minute.
StatictimeGet offset string (like "+05:00" or "-08:00") from tzid (like "Europe/Moscow")
Calculate halachic times (zmanim / זְמַנִּים) for a given day and location. Calculations are available for tzeit / tzais (nightfall), shkiah (sunset) and more.
Zmanim are estimated using an algorithm published by the US National Oceanic and Atmospheric Administration. The NOAA solar calculator is based on equations from Astronomical Algorithms by Jean Meeus.
The sunrise and sunset results are theoretically accurate to within a minute for locations between +/- 72° latitude, and within 10 minutes outside of those latitudes. However, due to variations in atmospheric composition, temperature, pressure and conditions, observed values may vary from calculations. https://gml.noaa.gov/grad/solcalc/calcdetails.html
Example