diff --git a/assets/js/WebsiteCalendar.js b/assets/js/WebsiteCalendar.js index 3639091..c0507ef 100644 --- a/assets/js/WebsiteCalendar.js +++ b/assets/js/WebsiteCalendar.js @@ -26,7 +26,9 @@ class WebsiteCalendar extends KosherZmanim.JewishCalendar { } } + /** @returns {{en: string; he: string}} */ formatJewishMonth() { + // @ts-ignore return ['en', 'he'] .map(locale => [locale, this.getDate().toLocaleString(locale + '-u-ca-hebrew', { month: 'long' })]) .reduce(function (obj, [key, val]) { @@ -480,8 +482,8 @@ class WebsiteCalendar extends KosherZmanim.JewishCalendar { const yomTovIndex = this.getYomTovIndex(); const mashivHarush = { - start: new KosherZmanim.JewishDate(this.getJewishYear(), KosherZmanim.JewishDate.TISHREI, 22), - end: new KosherZmanim.JewishDate(this.getJewishYear(), KosherZmanim.JewishDate.NISSAN, 15) + start: new KosherZmanim.JewishDate(this.getJewishYear(), KosherZmanim.JewishDate.TISHREI, 22).getDate(), + end: new KosherZmanim.JewishDate(this.getJewishYear(), KosherZmanim.JewishDate.NISSAN, 15).getDate() } const normalAmidah = !(this.getDayOfWeek() == 7 || [ @@ -566,7 +568,7 @@ class WebsiteCalendar extends KosherZmanim.JewishCalendar { hallel: hallel, tachanun: todaysTachanun ? 2 : 0, amidah: { - "mechayehHametim": (this.isInBetween(mashivHarush.start, mashivHarush.end) ? "משיב הרוח" : "מוריד הטל"), + "mechayehHametim": (KosherZmanim.temporalExtended.rangeDates(mashivHarush.start, this.getDate(), mashivHarush.end) ? "משיב הרוח" : "מוריד הטל"), "mevarechHashanim": (!normalAmidah ? null : (this.isBarechAleinu() ? "ברך עלינו" : "ברכנו")), "ulChaparatPesha": (!this.isRoshChodesh() ? null : ulChaparatPesha) @@ -639,14 +641,6 @@ class WebsiteCalendar extends KosherZmanim.JewishCalendar { return validAv || validTamuz || validSefira } - /** - * @param {KosherZmanim.JewishDate} startDate - * @param {KosherZmanim.JewishDate} endDate - */ - isInBetween(startDate, endDate) { - return (this.compareTo(startDate) > 0 && this.compareTo(endDate) < 0); - } - /* * If an attribute returns true, that means the mourning customs are in effect */ diff --git a/assets/js/icsHandler.js b/assets/js/icsHandler.js index 91307a3..5d202b4 100644 --- a/assets/js/icsHandler.js +++ b/assets/js/icsHandler.js @@ -74,7 +74,6 @@ export default function icsExport (amudehHoraahZman, plainDateParams, geoLocatio events.push({ start: calc.getShkiya().epochMilliseconds, end: calc.chainDate(jCal.getDate().withCalendar("hebrew").with({ day: 15 })).getAlotHashachar().epochMilliseconds, - // @ts-ignore title: funcSettings.language == "he" ? "ברכת הלבנה - חדש " + jMonth.he : "Birkat Halevana - Month of " + jMonth.en, description: "End-time of the Rama (Stringent): " + birkLev.data.end.toLocaleString() }) diff --git a/assets/js/zmanimListUpdater.js b/assets/js/zmanimListUpdater.js index 0947d3a..36e9ace 100644 --- a/assets/js/zmanimListUpdater.js +++ b/assets/js/zmanimListUpdater.js @@ -381,24 +381,44 @@ class zmanimListUpdater { } fastContainer.style.removeProperty("display"); + /** + * @param {Element} contElem + */ + function hideErev(contElem, inverse=false) { + const cond = (inverse ? !todayFast : todayFast) + contElem.querySelectorAll('[data-zfFind="erevTzom"]') + .forEach(elem => { + if (!(elem instanceof HTMLElement)) + return; + + if (cond) + elem.style.display = "none"; + else + elem.style.removeProperty("display"); + }); + } + const fastJCal = this.jCal.isTaanis() || this.jCal.isTaanisBechoros() ? this.jCal : this.jCal.tomorrow(); const fastCalc = this.zmanFuncs.chainDate(fastJCal.getDate()); const nameElements = [...fastContainer.getElementsByTagName("h5")]; nameElements.forEach(element => element.style.display = "none"); const ourFast = nameElements.find(element => element.getAttribute("data-zfFind") == fastJCal.getYomTovIndex().toString()); + hideErev(ourFast); ourFast.style.removeProperty("display"); - if (todayFast) { - ourFast.querySelectorAll('[data-zfFind="erevTzom"]').forEach(element => element.style.display = "none") - } else { - ourFast.querySelectorAll('[data-zfFind="erevTzom"]').forEach(element => element.style.removeProperty("display")) - } + + /** @type {Record<'multiDay' | 'oneDay', HTMLElement>} */ + const timeList = { + multiDay: fastContainer.querySelector('[data-zfFind="twoDayTimes"]'), + oneDay: fastContainer.querySelector('[data-zfFind="oneDayTimes"]') + }; if ([KosherZmanim.JewishCalendar.TISHA_BEAV, KosherZmanim.JewishCalendar.YOM_KIPPUR].includes(fastJCal.getYomTovIndex())) { - fastContainer.querySelector('[data-zfFind="oneDayTimes"]').style.display = "none"; + timeList.oneDay.style.display = "none"; + timeList.multiDay.style.removeProperty("display"); - const multiDayTimesList = fastContainer.querySelector('[data-zfFind="twoDayTimes"]'); - const erevTzom = multiDayTimesList.firstElementChild; + const erevTzom = timeList.multiDay.firstElementChild; + hideErev(erevTzom); if (erevTzom.lastChild.nodeType == Node.TEXT_NODE) { erevTzom.lastChild.remove(); } @@ -408,13 +428,8 @@ class zmanimListUpdater { (fastJCal.getYomTovIndex() == KosherZmanim.JewishCalendar.YOM_KIPPUR ? erevCalc.getCandleLighting() : erevCalc.getShkiya()) erevTzom.appendChild(document.createTextNode(timeOnErev.toLocaleString(...this.dtF))); - if (this.jCal.isTaanis()) { - erevTzom.querySelectorAll('[data-zfFind="erevTzom"]').forEach(element => element.style.display = "none") - } else { - erevTzom.querySelectorAll('[data-zfFind="erevTzom"]').forEach(element => element.style.removeProperty("display")) - } - - const yomTzom = multiDayTimesList.lastElementChild; + const yomTzom = timeList.multiDay.lastElementChild; + hideErev(yomTzom, true); if (yomTzom.lastChild.nodeType == Node.TEXT_NODE) yomTzom.lastChild.remove(); @@ -426,13 +441,13 @@ class zmanimListUpdater { yomTzom.appendChild(document.createTextNode(fastCalc.getTzaitLechumra().toLocaleString(...this.dtF))) } } else { - fastContainer.querySelector('[data-zfFind="twoDayTimes"]').style.display = "none"; - const timeBox = fastContainer.querySelector('[data-zfFind="oneDayTimes"]'); - if (timeBox.lastChild.nodeType == Node.TEXT_NODE) { - timeBox.lastChild.remove(); + timeList.multiDay.style.display = "none"; + timeList.oneDay.style.removeProperty("display") + if (timeList.oneDay.lastChild.nodeType == Node.TEXT_NODE) { + timeList.oneDay.lastChild.remove(); } - timeBox.appendChild(document.createTextNode( + timeList.oneDay.appendChild(document.createTextNode( fastCalc.getAlotHashachar().toLocaleString(...this.dtF) + ' - ' + fastCalc.getTzaitLechumra().toLocaleString(...this.dtF) )) } diff --git a/assets/libraries/kosherZmanim/kosher-zmanim.esm.d.ts b/assets/libraries/kosherZmanim/kosher-zmanim.esm.d.ts index b11c59c..a877217 100644 --- a/assets/libraries/kosherZmanim/kosher-zmanim.esm.d.ts +++ b/assets/libraries/kosherZmanim/kosher-zmanim.esm.d.ts @@ -1482,1453 +1482,980 @@ export interface OutputMetadata { timeZoneOffset: string; } /** - * A class for various location calculations - * Most of the code in this class is ported from Chris Veness' - * LGPL Javascript Implementation + * The JewishDate is the base calendar class, that supports maintenance of a {@link java.util.GregorianCalendar} + * instance along with the corresponding Jewish date. This class can use the standard Java Date and Calendar + * classes for setting and maintaining the dates, but it does not subclass these classes or use them internally + * in any calculations. This class also does not have a concept of a time (which the Date class does). Please + * note that the calendar does not currently support dates prior to 1/1/1 Gregorian. Also keep in mind that the + * Gregorian calendar started on October 15, 1582, so any calculations prior to that are suspect (at least from + * a Gregorian perspective). While 1/1/1 Gregorian and forward are technically supported, any calculations prior to Hillel II's (Hakatan's) calendar (4119 in the Jewish Calendar / 359 + * CE Julian as recorded by Rav Hai Gaon) would be just an + * approximation. * - * @author © Eliyahu Hershfeld 2009 - 2020 - * @deprecated All methods in this class are available in the {@link GeoLocation} class, and this class that duplicates that - * code will be removed in a future release. + * This open source Java code was written by Avrom Finkelstien from his C++ + * code. It was refactored to fit the KosherJava Zmanim API with simplification of the code, enhancements and some bug + * fixing. + * + * Some of Avrom's original C++ code was translated from C/C++ + * code in Calendrical Calculations by Nachum Dershowitz and Edward M. + * Reingold, Software-- Practice & Experience, vol. 20, no. 9 (September, 1990), pp. 899- 928. Any method with the mark + * "ND+ER" indicates that the method was taken from this source with minor modifications. + * + * If you are looking for a class that implements a Jewish calendar version of the Calendar class, one is available from + * the ICU (International Components for Unicode) project, formerly part of + * IBM's DeveloperWorks. + * + * @see JewishCalendar + * @see HebrewDateFormatter + * @see java.util.Date + * @see java.util.Calendar + * @author © Avrom Finkelstien 2002 + * @author © Eliyahu Hershfeld 2011 - 2015 */ -export declare class GeoLocationUtils { - /** - * Constant for a distance type calculation. - * @see #getGeodesicDistance(GeoLocation, GeoLocation) - */ - private static readonly DISTANCE; +export declare class JewishDate { /** - * Constant for a initial bearing type calculation. - * @see #getGeodesicInitialBearing(GeoLocation, GeoLocation) + * Value of the month field indicating Nissan, the first numeric month of the year in the Jewish calendar. With the + * year starting at {@link #TISHREI}, it would actually be the 7th (or 8th in a {@link #isJewishLeapYear() leap + * year}) month of the year. */ - private static readonly INITIAL_BEARING; + static readonly NISSAN: number; /** - * Constant for a final bearing type calculation. - * @see #getGeodesicFinalBearing(GeoLocation, GeoLocation) + * Value of the month field indicating Iyar, the second numeric month of the year in the Jewish calendar. With the + * year starting at {@link #TISHREI}, it would actually be the 8th (or 9th in a {@link #isJewishLeapYear() leap + * year}) month of the year. */ - private static readonly FINAL_BEARING; + static readonly IYAR: number; /** - * Calculate the geodesic initial bearing between this Object and - * a second Object passed to this method using Thaddeus - * Vincenty's inverse formula See T Vincenty, "Direct and - * Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII - * no 176, 1975. - * - * @param location - * the initial location - * @param destination - * the destination location - * @return the geodesic bearing + * Value of the month field indicating Sivan, the third numeric month of the year in the Jewish calendar. With the + * year starting at {@link #TISHREI}, it would actually be the 9th (or 10th in a {@link #isJewishLeapYear() leap + * year}) month of the year. */ - static getGeodesicInitialBearing(location: GeoLocation, destination: GeoLocation): number; + static readonly SIVAN: number; /** - * Calculate the geodesic final bearing between this Object - * and a second Object passed to this method using Thaddeus Vincenty's - * inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics - * on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975. - * - * @param location - * the initial location - * @param destination - * the destination location - * @return the geodesic bearing + * Value of the month field indicating Tammuz, the fourth numeric month of the year in the Jewish calendar. With the + * year starting at {@link #TISHREI}, it would actually be the 10th (or 11th in a {@link #isJewishLeapYear() leap + * year}) month of the year. */ - static getGeodesicFinalBearing(location: GeoLocation, destination: GeoLocation): number; + static readonly TAMMUZ: number; /** - * Calculate geodesic distance in Meters - * between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, - * "Direct and Inverse Solutions of Geodesics on the - * Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975. This uses the - * WGS-84 geodetic model. - * @param location - * the initial location - * @param destination - * the destination location - * @return the geodesic distance in Meters + * Value of the month field indicating Av, the fifth numeric month of the year in the Jewish calendar. With the year + * starting at {@link #TISHREI}, it would actually be the 11th (or 12th in a {@link #isJewishLeapYear() leap year}) + * month of the year. */ - static getGeodesicDistance(location: GeoLocation, destination: GeoLocation): number; + static readonly AV: number; /** - * Calculates the initial geodesic bearing, final bearing or - * geodesic distance using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid - * with application of nested equations", Survey Review, vol XXII no 176, 1975. - * - * @param location - * the initial location - * @param destination - * the destination location - * @param formula - * This formula calculates initial bearing ({@link #INITIAL_BEARING}), - * final bearing ({@link #FINAL_BEARING}) and distance ({@link #DISTANCE}). - * @return - * the geodesic distance, initial or final bearing (based on the formula passed in) between the location - * and destination in Meters - * @see #getGeodesicDistance(GeoLocation, GeoLocation) - * @see #getGeodesicInitialBearing(GeoLocation, GeoLocation) - * @see #getGeodesicFinalBearing(GeoLocation, GeoLocation) + * Value of the month field indicating Elul, the sixth numeric month of the year in the Jewish calendar. With the + * year starting at {@link #TISHREI}, it would actually be the 12th (or 13th in a {@link #isJewishLeapYear() leap + * year}) month of the year. */ - private static vincentyFormula; + static readonly ELUL: number; /** - * Returns the rhumb line - * bearing from the current location to the GeoLocation passed in. - * - * @param location - * the initial location - * @param destination - * the destination location - * @return the bearing in degrees + * Value of the month field indicating Tishrei, the seventh numeric month of the year in the Jewish calendar. With + * the year starting at this month, it would actually be the 1st month of the year. */ - static getRhumbLineBearing(location: GeoLocation, destination: GeoLocation): number; + static readonly TISHREI: number; /** - * Returns the rhumb line distance from the current - * location to the GeoLocation passed in. Ported from Chris Veness' - * Javascript Implementation. - * - * @param location - * the initial location - * @param destination - * the destination location - * @return the distance in Meters + * Value of the month field indicating Cheshvan/marcheshvan, the eighth numeric month of the year in the Jewish + * calendar. With the year starting at {@link #TISHREI}, it would actually be the 2nd month of the year. */ - static getRhumbLineDistance(location: GeoLocation, destination: GeoLocation): number; -} -/** - * A wrapper class for a astronomical times / zmanim that is mostly intended to allow sorting collections of astronomical times. - * It has fields for both date/time and duration based zmanim, name / labels as well as a longer description or explanation of a - * zman. - * - * Here is an example of various ways of sorting zmanim. - *
First create the Calendar for the location you would like to calculate: - * - *
- * String locationName = "Lakewood, NJ"; - * double latitude = 40.0828; // Lakewood, NJ - * double longitude = -74.2094; // Lakewood, NJ - * double elevation = 20; // optional elevation correction in Meters - * // the String parameter in getTimeZone() has to be a valid timezone listed in {@link java.util.TimeZone#getAvailableIDs()} - * TimeZone timeZone = TimeZone.getTimeZone("America/New_York"); - * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone); - * ComplexZmanimCalendar czc = new ComplexZmanimCalendar(location); - * Zman sunset = new Zman(czc.getSunset(), "Sunset"); - * Zman shaah16 = new Zman(czc.getShaahZmanis16Point1Degrees(), "Shaah zmanis 16.1"); - * Zman sunrise = new Zman(czc.getSunrise(), "Sunrise"); - * Zman shaah = new Zman(czc.getShaahZmanisGra(), "Shaah zmanis GRA"); - * ArrayList<Zman> zl = new ArrayList<Zman>(); - * zl.add(sunset); - * zl.add(shaah16); - * zl.add(sunrise); - * zl.add(shaah); - * //will sort sunset, shaah 1.6, sunrise, shaah GRA - * System.out.println(zl); - * Collections.sort(zl, Zman.DATE_ORDER); - * // will sort sunrise, sunset, shaah, shaah 1.6 (the last 2 are not in any specific order) - * Collections.sort(zl, Zman.DURATION_ORDER); - * // will sort sunrise, sunset (the first 2 are not in any specific order), shaah GRA, shaah 1.6 - * Collections.sort(zl, Zman.NAME_ORDER); - * // will sort shaah 1.6, shaah GRA, sunrise, sunset - *- * - * @author © Eliyahu Hershfeld 2007-2020 - * @todo Add secondary sorting. As of now the {@code Comparator}s in this class do not sort by secondary order. This means that when sorting a - * {@link java.util.Collection} of zmanim and using the {@link #DATE_ORDER} {@code Comparator} will have the duration based zmanim - * at the end, but they will not be sorted by duration. This should be N/A for label based sorting. - */ -export declare class Zman { + static readonly CHESHVAN: number; /** - * The name / label of the zman. + * Value of the month field indicating Kislev, the ninth numeric month of the year in the Jewish calendar. With the + * year starting at {@link #TISHREI}, it would actually be the 3rd month of the year. */ - label: string | null; + static readonly KISLEV: number; /** - * The {@link Date} of the zman + * Value of the month field indicating Teves, the tenth numeric month of the year in the Jewish calendar. With the + * year starting at {@link #TISHREI}, it would actually be the 4th month of the year. */ - zman?: Temporal.ZonedDateTime; + static readonly TEVES: number; /** - * The duration if the zman is a {@link AstronomicalCalendar#getTemporalHour() temporal hour} (or the various - * shaah zmanis base times such as {@link ZmanimCalendar#getShaahZmanisGra() shaah Zmanis GRA} or - * {@link ComplexZmanimCalendar#getShaahZmanis16Point1Degrees() shaah Zmanis 16.1°}). + * Value of the month field indicating Shevat, the eleventh numeric month of the year in the Jewish calendar. With + * the year starting at {@link #TISHREI}, it would actually be the 5th month of the year. */ - duration?: number; + static readonly SHEVAT: number; /** - * A longer description or explanation of a zman. + * Value of the month field indicating Adar (or Adar I in a {@link #isJewishLeapYear() leap year}), the twelfth + * numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually + * be the 6th month of the year. */ - description?: string; + static readonly ADAR: number; /** - * The constructor setting a {@link Date} based zman and a label. - * @param date the Date of the zman. - * @param label the label of the zman such as "Sof Zman Krias Shema GRA". - * @see #Zman(long, String) + * Value of the month field indicating Adar II, the leap (intercalary or embolismic) thirteenth (Undecimber) numeric + * month of the year added in Jewish {@link #isJewishLeapYear() leap year}). The leap years are years 3, 6, 8, 11, + * 14, 17 and 19 of a 19 year cycle. With the year starting at {@link #TISHREI}, it would actually be the 7th month + * of the year. */ - constructor(date: Temporal.ZonedDateTime, label: string | null); + static readonly ADAR_II: number; /** - * The constructor setting a duration based zman such as - * {@link AstronomicalCalendar#getTemporalHour() temporal hour} (or the various shaah zmanis times such as - * {@link ZmanimCalendar#getShaahZmanisGra() shaah zmanis GRA} or - * {@link ComplexZmanimCalendar#getShaahZmanis16Point1Degrees() shaah Zmanis 16.1°}) and label. - * @param duration a duration based zman such as ({@link AstronomicalCalendar#getTemporalHour()} - * @param label the label of the zman such as "Shaah Zmanis GRA". - * @see #Zman(Date, String) + * the Jewish epoch using the RD (Rata Die/Fixed Date or Reingold Dershowitz) day used in Calendrical Calculations. + * Day 1 is January 1, 0001 Gregorian */ - constructor(duration: number, label: string | null); + private static readonly JEWISH_EPOCH; + /** The number of chalakim (18) in a minute. */ + private static readonly CHALAKIM_PER_MINUTE; + /** The number of chalakim (1080) in an hour. */ + private static readonly CHALAKIM_PER_HOUR; + /** The number of chalakim (25,920) in a 24 hour day. */ + private static readonly CHALAKIM_PER_DAY; + /** The number of chalakim in an average Jewish month. A month has 29 days, 12 hours and 793 + * chalakim (44 minutes and 3.3 seconds) for a total of 765,433 chalakim */ + private static readonly CHALAKIM_PER_MONTH; /** - * A {@link Comparator} that will compare and sort zmanim by date/time order. Compares its two arguments by the zman's date/time - * order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater - * than the second. - * Please note that this class will handle cases where either the {@code Zman} is a null or {@link #getZman()} returns a null. + * Days from the beginning of Sunday till molad BaHaRaD. Calculated as 1 day, 5 hours and 204 chalakim = (24 + 5) * + * 1080 + 204 = 31524 */ - static compareDateOrder(zman1: Zman, zman2: Zman): number; + private static readonly CHALAKIM_MOLAD_TOHU; /** - * A {@link Comparator} that will compare and sort zmanim by zmanim label order. Compares its two arguments by the zmanim label - * name order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater - * than the second. - * Please note that this class will will sort cases where either the {@code Zman} is a null or {@link #label} returns a null - * as empty {@code String}s. + * A short year where both {@link #CHESHVAN} and {@link #KISLEV} are 29 days. + * + * @see #getCheshvanKislevKviah() + * @see HebrewDateFormatter#getFormattedKviah(int) */ - static compareNameOrder(zman1: Zman, zman2: Zman): number; + static readonly CHASERIM: number; /** - * A {@link Comparator} that will compare and sort duration based zmanim such as - * {@link AstronomicalCalendar#getTemporalHour() temporal hour} (or the various shaah zmanis times - * such as {@link ZmanimCalendar#getShaahZmanisGra() shaah zmanis GRA} or - * {@link ComplexZmanimCalendar#getShaahZmanis16Point1Degrees() shaah zmanis 16.1°}). Returns a negative - * integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. - * Please note that this class will will sort cases where {@code Zman} is a null. + * An ordered year where {@link #CHESHVAN} is 29 days and {@link #KISLEV} is 30 days. + * + * @see #getCheshvanKislevKviah() + * @see HebrewDateFormatter#getFormattedKviah(int) */ - static compareDurationOrder(zman1: Zman, zman2: Zman): number; - toString(): string; -} -export type ZmanWithZmanDate = Zman & { - zman: Temporal.ZonedDateTime; -}; -export type ZmanWithDuration = Zman & { - duration: number; -}; -export declare namespace Utils { - function getAllMethodNames(obj: object, excludeContructors?: boolean): string[]; -} -export declare namespace TimeZone { + static readonly KESIDRAN: number; /** - * Returns the amount of time in nanoseconds to add to UTC to get - * standard time in this time zone. Because this value is not - * affected by daylight saving time, it is called raw - * offset. - * - * Since JS doesn't have a native function for this, use the lesser offset of January and July. + * A long year where both {@link #CHESHVAN} and {@link #KISLEV} are 30 days. * - * @return the amount of raw offset time in nanoseconds to add to UTC. + * @see #getCheshvanKislevKviah() + * @see HebrewDateFormatter#getFormattedKviah(int) */ - function getRawOffset(timeZoneId: string): number; + static readonly SHELAIMIM: number; + private date; + /** the internal count of molad hours. */ + private moladHours; + /** the internal count of molad minutes. */ + private moladMinutes; + /** the internal count of molad chalakim. */ + private moladChalakim; /** - * Returns a name in the specified style of this TimeZone suitable for presentation to the user in the default locale. - * @param {string} timeZoneId + * Returns the molad hours. Only a JewishDate object populated with {@link #getMolad()}, + * {@link #setJewishDate(int, int, int, int, int, int)} or {@link #setMoladHours(int)} will have this field + * populated. A regular JewishDate object will have this field set to 0. + * + * @return the molad hours + * @see #setMoladHours(int) + * @see #getMolad() + * @see #setJewishDate(int, int, int, int, int, int) */ - function getDisplayName(timeZoneId: string): string | null; + getMoladHours(): number; /** - * Returns the amount of time to be added to local standard time to get local wall clock time. - * The default implementation returns 3600000000000 nanoseconds (i.e., one hour) if a call to useDaylightTime() returns true. - * Otherwise, 0 (zero) is returned. - * @param {string} timeZoneId - * @return {number} + * Sets the molad hours. + * + * @param moladHours + * the molad hours to set + * @see #getMoladHours() + * @see #getMolad() + * @see #setJewishDate(int, int, int, int, int, int) + * */ - function getDSTSavings(timeZoneId: string): number; + setMoladHours(moladHours: number): void; /** - * Returns the offset of this time zone from UTC at the specified date. If Daylight Saving Time is in effect at the - * specified date, the offset value is adjusted with the amount of daylight saving. + * Returns the molad minutes. Only an object populated with {@link #getMolad()}, + * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladMinutes(int)} will have these fields + * populated. A regular JewishDate object will have this field set to 0. * - * This method returns a historically correct offset value if an underlying TimeZone implementation subclass - * supports historical Daylight Saving Time schedule and GMT offset changes. - * @param {string} timeZoneId - * @param {number} millisSinceEpoch + * @return the molad minutes + * @see #setMoladMinutes(int) + * @see #getMolad() + * @see #setJewishDate(int, int, int, int, int, int) */ - function getOffset(timeZoneId: string, millisSinceEpoch: number): number; -} -/** - * java.util.Calendar - */ -export declare namespace Calendar { - const JANUARY: number; - const FEBRUARY: number; - const MARCH: number; - const APRIL: number; - const MAY: number; - const JUNE: number; - const JULY: number; - const AUGUST: number; - const SEPTEMBER: number; - const OCTOBER: number; - const NOVEMBER: number; - const DECEMBER: number; - const SUNDAY: number; - const MONDAY: number; - const TUESDAY: number; - const WEDNESDAY: number; - const THURSDAY: number; - const FRIDAY: number; - const SATURDAY: number; - const DATE = 5; - const MONTH = 2; - const YEAR = 1; -} -/** - * java.lang.Math - */ -export declare namespace MathUtils { + getMoladMinutes(): number; /** - * java.lang.Math.toRadians - * @param degrees + * Sets the molad minutes. The expectation is that the traditional minute-less chalakim will be broken out to + * minutes and {@link #setMoladChalakim(int) chalakim/parts} , so 793 (TaShTZaG) parts would have the minutes set to + * 44 and chalakim to 1. + * + * @param moladMinutes + * the molad minutes to set + * @see #getMoladMinutes() + * @see #setMoladChalakim(int) + * @see #getMolad() + * @see #setJewishDate(int, int, int, int, int, int) + * */ - function degreesToRadians(degrees: number): number; + setMoladMinutes(moladMinutes: number): void; /** - * java.lang.Math.toDegrees - * @param radians + * Sets the molad chalakim/parts. The expectation is that the traditional minute-less chalakim will be broken out to + * {@link #setMoladMinutes(int) minutes} and chalakim, so 793 (TaShTZaG) parts would have the minutes set to 44 and + * chalakim to 1. + * + * @param moladChalakim + * the molad chalakim/parts to set + * @see #getMoladChalakim() + * @see #setMoladMinutes(int) + * @see #getMolad() + * @see #setJewishDate(int, int, int, int, int, int) + * */ - function radiansToDegrees(radians: number): number; -} -/** - * java.lang.String - */ -export declare namespace StringUtils { + setMoladChalakim(moladChalakim: number): void; /** - * Compares two strings lexicographically. - * The comparison is based on the Unicode value of each character in - * the strings. The character sequence represented by this - * {@code String} object is compared lexicographically to the - * character sequence represented by the argument string. The result is - * a negative integer if this {@code String} object - * lexicographically precedes the argument string. The result is a - * positive integer if this {@code String} object lexicographically - * follows the argument string. The result is zero if the strings - * are equal; {@code compareTo} returns {@code 0} exactly when - * the {@link #equals(Object)} method would return {@code true}. - *
- * This is the definition of lexicographic ordering. If two strings are - * different, then either they have different characters at some index - * that is a valid index for both strings, or their lengths are different, - * or both. If they have different characters at one or more index - * positions, let k be the smallest such index; then the string - * whose character at position k has the smaller value, as - * determined by using the < operator, lexicographically precedes the - * other string. In this case, {@code compareTo} returns the - * difference of the two character values at position {@code k} in - * the two string -- that is, the value: - *
- * If there is no index position at which they differ, then the shorter - * string lexicographically precedes the longer string. In this case, - * {@code compareTo} returns the difference of the lengths of the - * strings -- that is, the value: - *- * this.charAt(k)-anotherString.charAt(k) - *
+ * Returns the molad chalakim/parts. Only an object populated with {@link #getMolad()}, + * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladChalakim(int)} will have these fields + * populated. A regular JewishDate object will have this field set to 0. * - * @param string1 - * @param string2 the {@code String} to be compared. - * @return the value {@code 0} if the argument string is equal to - * this string; a value less than {@code 0} if this string - * is lexicographically less than the string argument; and a - * value greater than {@code 0} if this string is - * lexicographically greater than the string argument. + * @return the molad chalakim/parts + * @see #setMoladChalakim(int) + * @see #getMolad() + * @see #setJewishDate(int, int, int, int, int, int) */ - function compareTo(string1: string, string2: string): number; -} -export declare namespace IntegerUtils { + getMoladChalakim(): number; /** - * Compares 2 numbers - * @param x - * @param y + * Returns the last day in a gregorian month + * + * @param month + * the Gregorian month + * @return the last day of the Gregorian month */ - function compare(x: number, y: number): number; -} -export declare const Long_MIN_VALUE: number; -/** - * @param {number} num - * @param {number} places - The number of places to pad with zeros - * @returns {string} - The formatted integer - */ -export declare function padZeros(num: number, places: number): string; -/** - * Implementation of sunrise and sunset methods to calculate astronomical times based on the NOAA algorithm. This calculator uses the Java algorithm based on the implementation by NOAA - National Oceanic and Atmospheric Administration's Surface Radiation Research Branch. NOAA's implementation is based on equations from Astronomical Algorithms by Jean Meeus. Added to the algorithm is an adjustment of the zenith - * to account for elevation. The algorithm can be found in the Wikipedia Sunrise Equation article. - * - * @author © Eliyahu Hershfeld 2011 - 2019 - */ -export declare class NOAACalculator extends AstronomicalCalculator { + getLastDayOfGregorianMonth(month: number): number; /** - * The Julian day of January 1, 2000 + * Returns the number of days in a given month in a given month and year. + * + * @param month + * the month. As with other cases in this class, this is 1-based, not zero-based. + * @param year + * the year (only impacts February) + * @return the number of days in the month in the given year */ - private static readonly JULIAN_DAY_JAN_1_2000; + private static getLastDayOfGregorianMonth; /** - * Julian days per century + * Computes the Gregorian date from the absolute date. ND+ER + * @param absDate - the absolute date */ - private static readonly JULIAN_DAYS_PER_CENTURY; + private absDateToDate; /** - * @see AstronomicalCalculator#getCalculatorName() + * Computes the absolute date from a Gregorian date. ND+ER + * + * @param year + * the Gregorian year + * @param month + * the Gregorian month. Unlike the Java Calendar where January has the value of 0,This expects a 1 for + * January + * @param dayOfMonth + * the day of the month (1st, 2nd, etc...) + * @return the absolute Gregorian day */ - getCalculatorName(): string; + private static gregorianDateToAbsDate; /** - * @see AstronomicalCalculator#getUTCSunrise(Calendar, GeoLocation, double, boolean) + * Returns if the year is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19 year cycle are leap years. + * + * @param year + * the Jewish year. + * @return true if it is a leap year + * @see #isJewishLeapYear() */ - getUTCSunrise(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number; + private static isJewishLeapYear; /** - * @see AstronomicalCalculator#getUTCSunset(Calendar, GeoLocation, double, boolean) + * Returns if the year the calendar is set to is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19 year + * cycle are leap years. + * + * @return true if it is a leap year + * @see #isJewishLeapYear(int) */ - getUTCSunset(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number; + isJewishLeapYear(): boolean; /** - * Return the Julian day from a Java Calendar + * Returns the last month of a given Jewish year. This will be 12 on a non {@link #isJewishLeapYear(int) leap year} + * or 13 on a leap year. * - * @param calendar - * The Java Calendar - * @return the Julian day corresponding to the date Note: Number is returned for start of day. Fractional days - * should be added later. + * @param year + * the Jewish year. + * @return 12 on a non leap year or 13 on a leap year + * @see #isJewishLeapYear(int) */ - private static getJulianDay; + private static getLastMonthOfJewishYear; /** - * Convert Julian day to centuries since J2000.0. + * Returns the number of days elapsed from the Sunday prior to the start of the Jewish calendar to the mean + * conjunction of Tishri of the Jewish year. * - * @param julianDay - * the Julian Day to convert - * @return the centuries since 2000 Julian corresponding to the Julian Day + * @param year + * the Jewish year + * @return the number of days elapsed from prior to the molad Tohu BaHaRaD (Be = Monday, Ha= 5 hours and Rad =204 + * chalakim/parts) prior to the start of the Jewish calendar, to the mean conjunction of Tishri of the + * Jewish year. BeHaRaD is 23:11:20 on Sunday night(5 hours 204/1080 chalakim after sunset on Sunday + * evening). */ - private static getJulianCenturiesFromJulianDay; + static getJewishCalendarElapsedDays(year: number): number; /** - * Convert centuries since J2000.0 to Julian day. + * Adds the 4 dechiyos for molad Tishrei. These are: + *- * this.length()-anotherString.length() - *
Date
to set the calendar to
+ * @throws IllegalArgumentException
+ * if the date would fall prior to the January 1, 1 AD
*/
- private static getApproxTimeDays;
/**
- * Calculate the Sun's mean anomaly in degrees, at sunrise or sunset, given the longitude in degrees
+ * A constructor that initializes the date to the {@link java.util.Calendar Calendar} paremeter.
*
- * @param dayOfYear the day of the year
- * @param longitude longitude
- * @param isSunrise true for sunrise and false for sunset
- * @return the Sun's mean anomaly in degrees
- */
- private static getMeanAnomaly;
- /**
- * Calculates the Sun's true longitude in degrees. The result is an angle gte 0 and lt 360. Requires the Sun's mean
- * anomaly, also in degrees
- */
- private static getSunTrueLongitude;
- /**
- * Calculates the Sun's right ascension in hours, given the Sun's true longitude in degrees. Input and output are
- * angles gte 0 and lt 360.
+ * @param calendar
+ * the Calendar
to set the calendar to
+ * @throws IllegalArgumentException
+ * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC}
*/
- private static getSunRightAscensionHours;
/**
- * Calculate the cosine of the Sun's local hour angle
+ * Sets the date based on a {@link java.util.Calendar Calendar} object. Modifies the Jewish date as well.
*
- * @param sunTrueLongitude the sun's true longitude
- * @param latitude the latitude
- * @param zenith the zenith
- * @return the cosine of the Sun's local hour angle
+ * @param date
+ * the Calendar
to set the calendar to
+ * @throws IllegalArgumentException
+ * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC}
*/
- private static getCosLocalHourAngle;
+ setDate(date: Temporal.PlainDate): void;
/**
- * Calculate local mean time of rising or setting. By `local' is meant the exact time at the location, assuming that
- * there were no time zone. That is, the time difference between the location and the Meridian depended entirely on
- * the longitude. We can't do anything with this time directly; we must convert it to UTC and then to a local time.
- * The result is expressed as a fractional number of hours since midnight
- *
- * @param localHour the local hour
- * @param sunRightAscensionHours the sun's right ascention in hours
- * @param approxTimeDays approximate time days
+ * Sets the date based on a {@link java.util.Date Date} object. Modifies the Jewish date as well.
*
- * @return the fractional number of hours since midnight as a double
+ * @param date
+ * the Date
to set the calendar to
+ * @throws IllegalArgumentException
+ * if the date would fall prior to the year 1 AD
*/
- private static getLocalMeanTime;
/**
- * Get sunrise or sunset time in UTC, according to flag.
+ * Sets the Gregorian Date, and updates the Jewish date accordingly. Like the Java Calendar A value of 0 is expected
+ * for January.
*
* @param year
- * 4-digit year
+ * the Gregorian year
* @param month
- * month, 1-12 (not the zero based Java month
- * @param day
- * day of month, 1-31
- * @param longitude
- * in degrees, longitudes west of Meridian are negative
- * @param latitude
- * in degrees, latitudes south of equator are negative
- * @param zenith
- * Sun's zenith, in degrees
- * @param type
- * type of calculation to carry out {@link #TYPE_SUNRISE} or {@link #TYPE_SUNRISE}.
- *
- * @return the time as a double. If an error was encountered in the calculation (expected behavior for some
- * locations such as near the poles, {@link Double.NaN} will be returned.
+ * the Gregorian month. Like the Java Calendar, this class expects 0 for January
+ * @param dayOfMonth
+ * the Gregorian day of month. If this is > the number of days in the month/year, the last valid date of
+ * the month will be set
+ * @throws IllegalArgumentException
+ * if a year of < 1, a month < 0 or > 11 or a day of month < 1 is passed in
*/
- private static getTimeUTC;
- /**
- * Return the Universal Coordinated Time (UTC)
- * of solar noon for the given day at the given location
- * on earth. This implementation returns solar noon as the time halfway between sunrise and sunset.
- * Other calculators may return true solar noon. See The Definition of Chatzos for details on solar
- * noon calculations.
- * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation)
- * @see NOAACalculator
- *
- * @param calendar
- * The Calendar representing the date to calculate solar noon for
- * @param geoLocation
- * The location information used for astronomical calculating sun times.
- * @return the time in minutes from zero UTC
- */
- getUTCNoon(calendar: Temporal.PlainDate, geoLocation: GeoLocation): number;
-}
-/**
- * The ZmanimCalendar is a specialized calendar that can calculate sunrise, 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 {@link ComplexZmanimCalendar} that
- * extends this class. See documentation for the {@link ComplexZmanimCalendar} and {@link AstronomicalCalendar} for
- * simple examples on using the API.
- * Elevation based zmanim (even sunrise and sunset) should not be used lekula without the guidance
- * of a posek. According to Rabbi Dovid Yehudah Bursztyn in his
- * Zmanim Kehilchasam, 7th edition chapter 2, section 7 (pages 181-182)
- * and section 9 (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 besides sunrise and sunset), unless the setting is changed to true in {@link
- * #setUseElevation(boolean)}. This will impact sunrise and sunset-based zmanim such as {@link #getSunrise()},
- * {@link #getSunset()}, {@link #getSofZmanShmaGRA()}, alos-based zmanim such as {@link #getSofZmanShmaMGA()}
- * that are based on a fixed offset of sunrise or sunset and zmanim based on a percentage of the day such as
- * {@link ComplexZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. Even when set to
- * true it will not impact zmanim that are a degree-based offset of sunrise and sunset, such as {@link
- * ComplexZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link ComplexZmanimCalendar#getSofZmanShmaBaalHatanya()} since
- * these zmanim are not linked to sunrise or sunset times (the calculations are based on the astronomical definition of
- * sunrise and sunset calculated in a vacuum with the solar radius above the horizon), and are therefore not impacted by the use
- * of elevation.
- * For additional information on the halachic impact of elevation on zmanim see:
- * Note: It is important to read the technical notes on top of the {@link 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. - *
true
will
- * keep the standard astronomical chatzos calculation, while setting it to false
will use half of
- * a solar day calculation for chatzos.
- * @see #isUseAstronomicalChatzos()
- * @see #setUseAstronomicalChatzos(boolean)
- * @see #getChatzos()
- * @see #getSunTransit()
- * @see #getChatzosAsHalfDay()
- * @see #useAstronomicalChatzosForOtherZmanim
- */
- private useAstronomicalChatzos;
+ * Sets the Jewish Date and updates the Gregorian date accordingly.
+ *
+ * @param year
+ * the Jewish year. The year can't be negative
+ * @param month
+ * the Jewish month starting with Nisan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for
+ * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar
+ * II) to avoid any confusion.
+ * @param dayOfMonth
+ * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only
+ * has 29 days, the day will be set as 29.
+ * @throws IllegalArgumentException
+ * if a A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a
+ * leap year) or the day of month is < 1 or > 30 is passed in
+ */
/**
- * Is {@link #getSunTransit() astronomical chatzos} used for {@link #getChatzos()} for enhanced accuracy. For
- * example as the day is lengthens, the second half of the day is longer than the first and astronomical chatzos
- * would be a drop earlier than half of the time between sunrise and sunset.
+ * Sets the Jewish Date and updates the Gregorian date accordingly.
*
- * @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA()
- * Sof zman Shma GRA} would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos
- * zmaniyos would be calculated a a 6th of the time between sunrise and chatzos, as opposed to a 12th of the
- * time between sunrise and sunset. {@link #getMinchaGedola() mincha gedola} will be calculated as half a
- * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical
- * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag
- * hamincha} would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75
- * shaaos zmaniyos after sunrise. Etc.
+ * @param year
+ * the Jewish year. The year can't be negative
+ * @param month
+ * the Jewish month starting with Nisan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for
+ * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar
+ * II) to avoid any confusion.
+ * @param dayOfMonth
+ * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only
+ * has 29 days, the day will be set as 29.
*
- * @return if the use of astronomical chatzos is active.
- * @see #useAstronomicalChatzos
- * @see #setUseAstronomicalChatzos(boolean)
- * @see #getChatzos()
- * @see #getSunTransit()
- * @see #getChatzosAsHalfDay()
- * @see #isUseAstronomicalChatzosForOtherZmanim()
+ * @param hours
+ * the hour of the day. Used for Molad calculations
+ * @param minutes
+ * the minutes. Used for Molad calculations
+ * @param chalakim
+ * the chalakim/parts. Used for Molad calculations. The chalakim should not exceed 17. Minutes should be
+ * used for larger numbers.
+ *
+ * @throws IllegalArgumentException
+ * if a A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a
+ * leap year), the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 > 59 or chalakim < 0 >
+ * 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the chalakim into minutes (18
+ * chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG).
*/
- isUseAstronomicalChatzos(): boolean;
+ setJewishDate(year: number, month: number, dayOfMonth: number, hours: number, minutes: number, chalakim: number): void;
+ setJewishDate(year: number, month: number, dayOfMonth: number): void;
/**
- * Sets if astronomical chatzos should be used in calculations of other zmanim for enhanced accuracy.
- * @param useAstronomicalChatzos set to true to use astronomical in chatzos in zmanim calculations.
- * @see #useAstronomicalChatzos
- * @see #isUseAstronomicalChatzos()
- * @see #getChatzos()
- * @see #getSunTransit()
- * @see #getChatzosAsHalfDay()
- * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)
+ * Returns this object's date as a {@link java.util.Calendar} object.
+ *
+ * @return The {@link java.util.Calendar}
*/
- setUseAstronomicalChatzos(useAstronomicalChatzos: boolean): void;
+ getDate(): Temporal.PlainDate;
/**
- * Is astronomical chatzos used for zmanim calculations besides chatzos itself for enhanced
- * accuracy. The default value of false
will keep the standard start to end of day calculations, while setting
- * it to true
will use half of a solar day calculation for zmanim.
- * @see #isUseAstronomicalChatzosForOtherZmanim()
- * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)
- * @see #isUseAstronomicalChatzos()
- * @see #setUseAstronomicalChatzos(boolean)
- * @see #getChatzos()
+ * Resets this date to the current system date.
*/
- private useAstronomicalChatzosForOtherZmanim;
+ resetDate(): void;
/**
- * Is astronomical chatzos used for zmanim calculations besides chatzos itself for enhanced
- * accuracy. For example as the day is lengthening (as we approach spring season), the second half of the day is longer than
- * the first and astronomical chatzos would be a drop earlier than half of the time between sunrise and sunset.
- * Conversely, the second half of the day would be shorter in the fall season as the days start getting shorter.
+ * Returns a string containing the Jewish date in the form, "day Month, year" e.g. "21 Shevat, 5729". For more
+ * complex formatting, use the formatter classes.
*
- * @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA()
- * Sof zman Shma GRA} would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos
- * zmaniyos would be calculated a a 6th of the time between sunrise and chatzos, as opposed to a 12th of the
- * time between sunrise and sunset. {@link #getMinchaGedola() mincha gedola} will be calculated as half a
- * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical
- * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag
- * hamincha} would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75
- * shaaos zmaniyos after sunrise. Etc.
+ * This functionality is duplicated from {@link HebrewDateFormatter} to avoid circular dependencies.
*
- * @return if the use of astronomical chatzos is active.
- * @see #useAstronomicalChatzosForOtherZmanim
- * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)
- * @see #useAstronomicalChatzos
- * @see #setUseAstronomicalChatzos(boolean)
- */
- isUseAstronomicalChatzosForOtherZmanim(): boolean;
- /**
- * Sets if astronomical chatzos should be used in calculations of other zmanim for enhanced accuracy.
- * @param useAstronomicalChatzosForOtherZmanim set to true to use astronomical in chatzos in zmanim calculations.
- * @see #useAstronomicalChatzos
- * @see #isUseAstronomicalChatzos()
+ * @return the Jewish date in the form "day Month, year" e.g. "21 Shevat, 5729"
+ * @see HebrewDateFormatter#format(JewishDate)
*/
- setUseAstronomicalChatzosForOtherZmanim(useAstronomicalChatzosForOtherZmanim: boolean): void;
+ toString(): string;
/**
- * 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 before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux is
- * 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}.
- *
- * @see #getAlosHashachar()
- * @see ComplexZmanimCalendar#getAlos16Point1Degrees()
- * @see ComplexZmanimCalendar#getTzais16Point1Degrees()
- * @see ComplexZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()
- * @see ComplexZmanimCalendar#getSofZmanTfilaMGA16Point1Degrees()
- * @see ComplexZmanimCalendar#getMinchaGedola16Point1Degrees()
- * @see ComplexZmanimCalendar#getMinchaKetana16Point1Degrees()
- * @see ComplexZmanimCalendar#getPlagHamincha16Point1Degrees()
- * @see ComplexZmanimCalendar#getPlagAlos16Point1ToTzaisGeonim7Point083Degrees()
- * @see ComplexZmanimCalendar#getSofZmanShmaAlos16Point1ToSunset()
- */
- protected static readonly ZENITH_16_POINT_1: number;
- /**
- * 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 after {@link #getSunset sunset} in Jerusalem around the equinox / equilux, which
- * is 8.5° below {@link #GEOMETRIC_ZENITH geometric zenith}. The Ohr Meir considers this the time that 3 small stars are visible,
- * which is later than the required 3 medium stars.
- *
- * @see #getTzais()
- * @see ComplexZmanimCalendar#getTzaisGeonim8Point5Degrees()
- */
- protected static readonly ZENITH_8_POINT_5: number;
+ * Rolls the date, month or year forward by the amount passed in. It modifies both the Gregorian and Jewish dates
+ * accordingly. If manipulation beyond the fields supported here is required, use the {@link Calendar} class
+ * {@link Calendar#add(int, int)} or {@link Calendar#roll(int, int)} methods in the following manner.
+ *
+ *
+ *
+ * Calendar cal = jewishDate.getTime(); // get a java.util.Calendar representation of the JewishDate
+ * cal.add(Calendar.MONTH, 3); // add 3 Gregorian months
+ * jewishDate.setDate(cal); // set the updated calendar back to this class
+ *
+ *
+ *
+ * @param field the calendar field to be forwarded. The must be {@link Calendar#DATE}, {@link Calendar#MONTH} or {@link Calendar#YEAR}
+ * @param amount the positive amount to move forward
+ * @throws IllegalArgumentException if the field is anything besides {@link Calendar#DATE}, {@link Calendar#MONTH}
+ * or {@link Calendar#YEAR} or if the amount is less than 1
+ *
+ * @see #back()
+ * @see Calendar#add(int, int)
+ * @see Calendar#roll(int, int)
+ */
+ forward(field: number, amount: number): void;
/**
- * The default Shabbos candle lighting offset is 18 minutes. This can be changed via the
- * {@link #setCandleLightingOffset(double)} and retrieved by the {@link #getCandleLightingOffset()}.
- */
- private candleLightingOffset;
+ * Rolls the date back by 1 day. It modifies both the Gregorian and Jewish dates accordingly. The API does not
+ * currently offer the ability to forward more than one day t a time, or to forward by month or year. If such
+ * manipulation is required use the {@link Calendar} class {@link Calendar#add(int, int)} or
+ * {@link Calendar#roll(int, int)} methods in the following manner.
+ *
+ *
+ *
+ * Calendar cal = jewishDate.getTime(); // get a java.util.Calendar representation of the JewishDate
+ * cal.add(Calendar.MONTH, -3); // subtract 3 Gregorian months
+ * jewishDate.setDate(cal); // set the updated calendar back to this class
+ *
+ *
+ *
+ * @see #back()
+ * @see Calendar#add(int, int)
+ * @see Calendar#roll(int, int)
+ */
+ back(): void;
/**
- * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the
- * default), or elevation adjusted {@link AstronomicalCalendar#getSunrise()} if it is true. This allows relevant zmanim
- * in this and extending classes (such as the {@link ComplexZmanimCalendar}) to automatically adjust to the elevation setting.
- *
- * @return {@link #getSeaLevelSunrise()} if {@link #isUseElevation()} is false (the default), or elevation adjusted
- * {@link AstronomicalCalendar#getSunrise()} if it is true.
- * @see AstronomicalCalendar#getSunrise()
- */
- protected getElevationAdjustedSunrise(): Temporal.ZonedDateTime | null;
+ * Indicates whether some other object is "equal to" this one.
+ * @see Object#equals(Object)
+ */
+ equals(object: JewishDate): boolean;
/**
- * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the default),
- * or elevation adjusted {@link AstronomicalCalendar#getSunrise()} if it is true. This allows relevant zmanim
- * in this and extending classes (such as the {@link ComplexZmanimCalendar}) to automatically adjust to the elevation setting.
- *
- * @return {@link #getSeaLevelSunset()} if {@link #isUseElevation()} is false (the default), or elevation adjusted
- * {@link AstronomicalCalendar#getSunset()} if it is true.
- * @see AstronomicalCalendar#getSunset()
- */
- protected getElevationAdjustedSunset(): Temporal.ZonedDateTime | null;
+ * Compares two dates as per the compareTo() method in the Comparable interface. Returns a value less than 0 if this
+ * date is "less than" (before) the date, greater than 0 if this date is "greater than" (after) the date, or 0 if
+ * they are equal.
+ */
+ compareTo(jewishDate: JewishDate): number;
/**
- * A method that returns tzais (nightfall) when the sun is {@link #ZENITH_8_POINT_5 8.5°} below the
- * {@link #GEOMETRIC_ZENITH geometric horizon} (90°) after {@link #getSunset sunset}, 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 the {@link #ZENITH_8_POINT_5} constant.
- *
- * @see #ZENITH_8_POINT_5
- *
- * @return 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 the {@link AstronomicalCalendar} documentation.
- * @see #ZENITH_8_POINT_5
- * ComplexZmanimCalendar#getTzaisGeonim8Point5Degrees() that returns an identical time to this generic tzais
- */
- getTzais(): Temporal.ZonedDateTime | null;
+ * Returns the Gregorian month (between 0-11).
+ *
+ * @return the Gregorian month (between 0-11). Like the java.util.Calendar, months are 0 based.
+ */
+ getGregorianMonth(): number;
/**
- * Returns alos (dawn) based on the time when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the
- * eastern {@link #GEOMETRIC_ZENITH geometric horizon} before {@link #getSunrise sunrise}. 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 before {@link #getSunrise sunrise} in Jerusalem
- * on the around the equinox /
- * equilux is 16.1° below {@link #GEOMETRIC_ZENITH}.
- *
- * @see #ZENITH_16_POINT_1
- * @see ComplexZmanimCalendar#getAlos16Point1Degrees()
- *
- * @return 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 the {@link AstronomicalCalendar} documentation.
- */
- getAlosHashachar(): Temporal.ZonedDateTime | null;
+ * Returns the Gregorian day of the month.
+ *
+ * @return the Gregorian day of the mont
+ */
+ getGregorianDayOfMonth(): number;
/**
- * Method to return alos (dawn) calculated using 72 minutes before {@link #getSunrise() sunrise} or
- * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} 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.
- *
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
- */
- getAlos72(): Temporal.ZonedDateTime | undefined;
+ * Returns the Gregotian year.
+ *
+ * @return the Gregorian year
+ */
+ getGregorianYear(): number;
/**
- * This method returns chatzos (midday) following most opinions that chatzos is the midpoint
- * between {@link #getSeaLevelSunrise sea level sunrise} and {@link #getSeaLevelSunset sea 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 to {@link #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.
- *
- * @see AstronomicalCalendar#getSunTransit()
- * @return 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 the {@link AstronomicalCalendar} documentation.
- */
- getChatzos(): Temporal.ZonedDateTime | null;
+ * Returns the Jewish month 1-12 (or 13 years in a leap year). The month count starts with 1 for Nisan and goes to
+ * 13 for Adar II
+ *
+ * @return the Jewish month from 1 to 12 (or 13 years in a leap year). The month count starts with 1 for Nisan and
+ * goes to 13 for Adar II
+ */
+ getJewishMonth(): number;
/**
- * 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, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise()
- * sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()}
- * elevation setting) to this method will return sof zman krias shema according to the opinion of the
- * GRA.
- *
- * @param startOfDay
- * the start of day for calculating zman krias shema. This can be sunrise or any alos passed
- * to this method.
- * @param endOfDay
- * the end of day for calculating zman krias shema. This can be sunset or any tzais passed to
- * this method.
- * @return 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 the {@link AstronomicalCalendar} documentation.
- */
- getSofZmanShma(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
+ * Returns the Jewish day of month.
+ *
+ * @return the Jewish day of the month
+ */
+ getJewishDayOfMonth(): number;
/**
- * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *
- * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunrise() sunrise} or
- * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according
- * to the GRA.
- * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level
- * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}
- * setting).
- *
- * @see #getSofZmanShma(Date, Date)
- * @see #getShaahZmanisGra()
- * @see #isUseElevation()
- * @see ComplexZmanimCalendar#getSofZmanShmaBaalHatanya()
- * @return 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 the {@link
- * AstronomicalCalendar} documentation.
- */
- getSofZmanShmaGRA(): Temporal.ZonedDateTime | null;
+ * Returns the Jewish year.
+ *
+ * @return the Jewish year
+ */
+ getJewishYear(): number;
/**
- * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *
- * {@link #getShaahZmanisMGA() shaos zmaniyos} (solar hours) after {@link #getAlos72()}, according to the
- * Magen Avraham (MGA). The day is calculated
- * from 72 minutes before {@link #getSeaLevelSunrise() sea level sunrise} to 72 minutes after {@link
- * #getSeaLevelSunrise sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset()
- * sunset} (depending on the {@link #isUseElevation()} setting).
- *
- * @return 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getSofZmanShma(Date, Date)
- * @see ComplexZmanimCalendar#getShaahZmanis72Minutes()
- * @see ComplexZmanimCalendar#getAlos72()
- * @see ComplexZmanimCalendar#getSofZmanShmaMGA72Minutes() that
- */
- getSofZmanShmaMGA(): Temporal.ZonedDateTime | null;
+ * Returns the day of the week as a number between 1-7.
+ *
+ * @return the day of the week as a number between 1-7.
+ */
+ getDayOfWeek(): number;
/**
- * 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 the {@link #isUseElevation()} setting) a 72
- * minute offset from either {@link #getSunset() sunset} or {@link #getSeaLevelSunset() sea level sunset} is used.
- *
- * @see ComplexZmanimCalendar#getTzais16Point1Degrees()
- * @return 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 the
- * {@link AstronomicalCalendar} documentation.
- */
- getTzais72(): Temporal.ZonedDateTime | undefined;
- /**
- * A method to return candle lighting time, calculated as {@link #getCandleLightingOffset()} minutes before
- * {@link #getSeaLevelSunset() sea 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
- * to {@link #getTimeOffset(Date, long)}.
- *
- * @return 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 {@link AstronomicalCalendar} documentation.
- *
- * @see #getSeaLevelSunset()
- * @see #getCandleLightingOffset()
- * @see #setCandleLightingOffset(double)
- */
- getCandleLighting(): Temporal.ZonedDateTime | undefined;
- /**
- * 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, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise()
- * sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()}
- * elevation setting) to this method will return zman tfilah according to the opinion of the GRA.
- *
- * @param startOfDay
- * the start of day for calculating zman tfilah. This can be sunrise or any alos passed
- * to this method.
- * @param endOfDay
- * the end of day for calculating zman tfilah. This can be sunset or any tzais passed
- * to this method.
- * @return 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 the {@link AstronomicalCalendar} documentation.
- */
- getSofZmanTfila(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
- /**
- * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *
- * {@link #getShaahZmanisGra() shaos zmaniyos }(solar hours) after {@link #getSunrise() sunrise} or
- * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according
- * to the GRA.
- * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level
- * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}
- * setting).
- *
- * @see #getSofZmanTfila(Date, Date)
- * @see #getShaahZmanisGra()
- * @see ComplexZmanimCalendar#getSofZmanTfilaBaalHatanya()
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
- */
- getSofZmanTfilaGRA(): Temporal.ZonedDateTime | null;
- /**
- * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *
- * {@link #getShaahZmanisMGA() shaos zmaniyos} (solar hours) after {@link #getAlos72()}, according to the
- * Magen Avraham (MGA). The day is calculated
- * from 72 minutes before {@link #getSeaLevelSunrise() sea level sunrise} to 72 minutes after {@link
- * #getSeaLevelSunrise sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset()
- * sunset} (depending on the {@link #isUseElevation()} setting).
- *
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
- * @see #getSofZmanTfila(Date, Date)
- * @see #getShaahZmanisMGA()
- * @see #getAlos72()
- */
- getSofZmanTfilaMGA(): Temporal.ZonedDateTime | null;
- /**
- * 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, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level
- * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation
- * setting) to this method will return mincha gedola according to the opinion of the
- * GRA.
- *
- * @param startOfDay
- * the start of day for calculating Mincha gedola. This can be sunrise or any alos passed
- * to this method.
- * @param endOfDay
- * the end of day for calculating Mincha gedola. This can be sunset or any tzais passed
- * to this method.
- * @return 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 the {@link AstronomicalCalendar} documentation.
- */
- getMinchaGedola(startOfDay?: Temporal.ZonedDateTime | null, endOfDay?: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
- /**
- * A generic method for calculating samuch lemincha ketana, / near mincha ketana time that is half
- * an hour before {@link #getMinchaKetana(Date, Date)} or 9 * 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
- * samuch lemincha ketana is calculated as 9 of those shaos zmaniyos after the beginning of the day.
- * For example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea
- * level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation
- * setting) to this method will return samuch lemincha ketana according to the opinion of the
- * GRA.
- *
- * @param startOfDay
- * the start of day for calculating samuch lemincha ketana. This can be sunrise or any alos
- * passed to to this method.
- * @param endOfDay
- * the end of day for calculating samuch lemincha ketana. This can be sunset or any tzais
- * passed to this method.
- * @return 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 the {@link AstronomicalCalendar} documentation.
- *
- * @see ComplexZmanimCalendar#getSamuchLeMinchaKetanaGRA()
- * @see ComplexZmanimCalendar#getSamuchLeMinchaKetana16Point1Degrees()
- * @see ComplexZmanimCalendar#getSamuchLeMinchaKetana72Minutes()
- */
- getSamuchLeMinchaKetana(startOfDay: Temporal.ZonedDateTime, endOfDay: Temporal.ZonedDateTime): Temporal.ZonedDateTime | null;
- /**
- * 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, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level
- * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation
- * setting) to this method will return mincha ketana according to the opinion of the
- * GRA.
+ * Sets the Gregorian month.
*
- * @param startOfDay
- * the start of day for calculating Mincha ketana. This can be sunrise or any alos passed to
- * this method.
- * @param endOfDay
- * the end of day for calculating Mincha ketana. This can be sunrise or any alos passed to
- * this method.
- * @return 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 the {@link AstronomicalCalendar} documentation.
- */
- getMinchaKetana(startOfDay?: Temporal.ZonedDateTime | null, endOfDay?: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
- /**
- * 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, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level
- * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation
- * setting) to this method will return plag mincha according to the opinion of the
- * GRA.
+ * @param month
+ * the Gregorian month
*
- * @param startOfDay
- * the start of day for calculating plag. This can be sunrise or any alos passed to this method.
- * @param endOfDay
- * the end of day for calculating plag. This can be sunrise or any alos passed to this method.
- * @return 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 the {@link AstronomicalCalendar} documentation.
+ * @throws IllegalArgumentException
+ * if a month < 0 or > 11 is passed in
*/
- getPlagHamincha(startOfDay?: Temporal.ZonedDateTime | null, endOfDay?: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
+ setGregorianMonth(month: number): void;
/**
- * This method returns plag hamincha, that is 10.75 * {@link #getShaahZmanisGra() shaos zmaniyos}
- * (solar hours) after {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on
- * the {@link #isUseElevation()} setting), according to the GRA. Plag hamincha is the earliest time that Shabbos can be started.
- * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level
- * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}
+ * sets the Gregorian year.
*
- * @see #getPlagHamincha(Date, Date)
- * @see ComplexZmanimCalendar#getPlagHaminchaBaalHatanya()
- * @return 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 the
- * {@link AstronomicalCalendar} documentation.
+ * @param year
+ * the Gregorian year.
+ * @throws IllegalArgumentException
+ * if a year of < 1 is passed in
*/
+ setGregorianYear(year: number): void;
/**
- * A method that returns a shaah zmanis ({@link #getTemporalHour(Date, Date) 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 from {@link #getSeaLevelSunrise() sea
- * level sunrise} to {@link #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to
- * {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} setting). The day is split into 12 equal
- * parts with each one being a shaah zmanis. This method is similar to {@link #getTemporalHour}, but can
- * account for elevation.
+ * sets the Gregorian Day of month.
*
- * @return 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, {@link Long#MIN_VALUE} will be returned. See
- * detailed explanation on top of the {@link AstronomicalCalendar} documentation.
- * @see #getTemporalHour(Date, Date)
- * @see #getSeaLevelSunrise()
- * @see #getSeaLevelSunset()
- * @see ComplexZmanimCalendar#getShaahZmanisBaalHatanya()
+ * @param dayOfMonth
+ * the Gregorian Day of month.
+ * @throws IllegalArgumentException
+ * if the day of month of < 1 is passed in
*/
- getShaahZmanisGra(): Temporal.Duration | undefined;
+ setGregorianDayOfMonth(dayOfMonth: number): void;
/**
- * 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 before {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level
- * sunrise} (depending on the {@link #isUseElevation()} elevation setting) and dusk is 72 minutes after {@link #getSunset
- * sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} 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 subclass {@link ComplexZmanimCalendar}.
+ * sets the Jewish month.
*
- * @return 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, {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
- * {@link AstronomicalCalendar} documentation.
+ * @param month
+ * the Jewish month from 1 to 12 (or 13 years in a leap year). The month count starts with 1 for Nisan
+ * and goes to 13 for Adar II
+ * @throws IllegalArgumentException
+ * if a month < 1 or > 12 (or 13 on a leap year) is passed in
*/
- getShaahZmanisMGA(): Temporal.Duration | undefined;
+ setJewishMonth(month: number): void;
/**
- * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default
- * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.
+ * sets the Jewish year.
*
- * @see AstronomicalCalendar#AstronomicalCalendar()
+ * @param year
+ * the Jewish year
+ * @throws IllegalArgumentException
+ * if a year of < 3761 is passed in. The same will happen if the year is 3761 and the month and day
+ * previously set are < 18 Teves (preior to Jan 1, 1 AD)
*/
+ setJewishYear(year: number): void;
/**
- * A constructor that takes a {@link GeoLocation} as a parameter.
+ * sets the Jewish day of month.
*
- * @param location
- * the location
+ * @param dayOfMonth
+ * the Jewish day of month
+ * @throws IllegalArgumentException
+ * if the day of month is < 1 or > 30 is passed in
*/
+ setJewishDayOfMonth(dayOfMonth: number): void;
/**
- * A method to get the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea 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.
+ * A method that creates a deep copy of the object.
*
- * @return Returns the currently set candle lighting offset in minutes.
- * @see #getCandleLighting()
- * @see #setCandleLightingOffset(double)
+ * @see Object#clone()
*/
- getCandleLightingOffset(): number;
+ clone(): JewishDate;
+}
+declare function rangeDates(start: Temporal.PlainDate, middle: Temporal.PlainDate, end: Temporal.PlainDate, inclusive?: boolean): boolean;
+/**
+ * A class for various location calculations
+ * Most of the code in this class is ported from Chris Veness'
+ * LGPL Javascript Implementation
+ *
+ * @author © Eliyahu Hershfeld 2009 - 2020
+ * @deprecated All methods in this class are available in the {@link GeoLocation} class, and this class that duplicates that
+ * code will be removed in a future release.
+ */
+export declare class GeoLocationUtils {
/**
- * A method to set the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea 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.
- *
- * @param candleLightingOffset
- * The candle lighting offset to set in minutes.
- * @see #getCandleLighting()
- * @see #getCandleLightingOffset()
+ * Constant for a distance type calculation.
+ * @see #getGeodesicDistance(GeoLocation, GeoLocation)
*/
- setCandleLightingOffset(candleLightingOffset: number): void;
- getClassName(): string;
+ private static readonly DISTANCE;
/**
- * 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's {@link #getElevationAdjustedSunset() elevation adjusted sunset} that observes the
- * {@link #isUseElevation()} settings. The {@link JewishCalendar#getInIsrael()} will be set by the inIsrael parameter.
+ * Constant for a initial bearing type calculation.
+ * @see #getGeodesicInitialBearing(GeoLocation, GeoLocation)
+ */
+ private static readonly INITIAL_BEARING;
+ /**
+ * Constant for a final bearing type calculation.
+ * @see #getGeodesicFinalBearing(GeoLocation, GeoLocation)
+ */
+ private static readonly FINAL_BEARING;
+ /**
+ * Calculate the geodesic initial bearing between this Object and
+ * a second Object passed to this method using Thaddeus
+ * Vincenty's inverse formula See T Vincenty, "Direct and
+ * Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations", Survey Review, vol XXII
+ * no 176, 1975.
*
- * @param currentTime the current time
- * @param tzais the time of tzais
- * @param inIsrael whether to use Israel holiday scheme or not
+ * @param location
+ * the initial location
+ * @param destination
+ * the destination location
+ * @return the geodesic bearing
+ */
+ static getGeodesicInitialBearing(location: GeoLocation, destination: GeoLocation): number;
+ /**
+ * Calculate the geodesic final bearing between this Object
+ * and a second Object passed to this method using Thaddeus Vincenty's
+ * inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics
+ * on the Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975.
*
- * @return true if melacha is prohibited or false if it is not.
+ * @param location
+ * the initial location
+ * @param destination
+ * the destination location
+ * @return the geodesic bearing
+ */
+ static getGeodesicFinalBearing(location: GeoLocation, destination: GeoLocation): number;
+ /**
+ * Calculate geodesic distance in Meters
+ * between this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty,
+ * "Direct and Inverse Solutions of Geodesics on the
+ * Ellipsoid with application of nested equations", Survey Review, vol XXII no 176, 1975. This uses the
+ * WGS-84 geodetic model.
+ * @param location
+ * the initial location
+ * @param destination
+ * the destination location
+ * @return the geodesic distance in Meters
+ */
+ static getGeodesicDistance(location: GeoLocation, destination: GeoLocation): number;
+ /**
+ * Calculates the initial geodesic bearing, final bearing or
+ * geodesic distance using Thaddeus Vincenty's inverse formula See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid
+ * with application of nested equations", Survey Review, vol XXII no 176, 1975.
*
- * @see JewishCalendar#isAssurBemelacha()
- * @see JewishCalendar#hasCandleLighting()
- * @see JewishCalendar#setInIsrael(boolean)
+ * @param location
+ * the initial location
+ * @param destination
+ * the destination location
+ * @param formula
+ * This formula calculates initial bearing ({@link #INITIAL_BEARING}),
+ * final bearing ({@link #FINAL_BEARING}) and distance ({@link #DISTANCE}).
+ * @return
+ * the geodesic distance, initial or final bearing (based on the formula passed in) between the location
+ * and destination in Meters
+ * @see #getGeodesicDistance(GeoLocation, GeoLocation)
+ * @see #getGeodesicInitialBearing(GeoLocation, GeoLocation)
+ * @see #getGeodesicFinalBearing(GeoLocation, GeoLocation)
*/
- isAssurBemlacha(currentTime: Temporal.ZonedDateTime, tzais: Temporal.ZonedDateTime, inIsrael: boolean): boolean;
+ private static vincentyFormula;
/**
- * 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 as {@link #getPlagHamincha(Date, Date)} and cuts down on
- * code replication. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link
- * #getSeaLevelSunrise() sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the
- * {@link #isUseElevation()} elevation setting) and 10.75 hours to this method will return plag mincha
- * according to the opinion of the GRA.
+ * Returns the rhumb line
+ * bearing from the current location to the GeoLocation passed in.
*
- * @param startOfDay
- * the start of day for calculating the zman. This can be sunrise or any alos passed
- * to this method.
- * @param endOfDay
- * the end of day for calculating the zman. This can be sunrise or any alos passed to
- * this method.
- * @param hours
- * the number of shaahos zmaniyos (temporal hours) to offset from the start of day
- * @return 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 the {@link
- * AstronomicalCalendar} documentation.
+ * @param location
+ * the initial location
+ * @param destination
+ * the destination location
+ * @return the bearing in degrees
*/
- getShaahZmanisBasedZman(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null, hours: number): Temporal.ZonedDateTime | null;
+ static getRhumbLineBearing(location: GeoLocation, destination: GeoLocation): number;
/**
- * A utility method that returns the percentage of a shaah zmanis after sunset (or before sunrise) for a given degree
- * offset. For the equilux where there
- * is a 720-minute day, passing 16.1° for the location of Jerusalem will return about 1.2. This will work for any location
- * or date, but will typically only be of interest at the equinox/equilux to calculate the percentage of a shaah zmanis
- * for those who want to use the Minchas Cohen in Ma'amar 2:4
- * and the Pri Chadash who calculate tzais as a percentage
- * of the day after sunset. While the Minchas Cohen only applies this to 72 minutes or a 1/10 of the day around the world (based
- * on the equinox / equilux in Israel), this method allows calculations for any degrees level for any location.
- *
- * @param degrees
- * the number of degrees below the horizon after sunset.
- * @param sunset
- * if true
the calculation should be degrees after sunset, or if false
, degrees before sunrise.
- * @return the double
percentage of a sha'ah zmanis for a given set of degrees below the astronomical horizon
- * for the current calendar. If the calculation can't be computed a {@link Double#MIN_VALUE} will be returned. See detailed
- * explanation on top of the page.
- */
- getPercentOfShaahZmanisFromDegrees(degrees: number, sunset: boolean): number | null;
+ * Returns the rhumb line distance from the current
+ * location to the GeoLocation passed in. Ported from Chris Veness'
+ * Javascript Implementation.
+ *
+ * @param location
+ * the initial location
+ * @param destination
+ * the destination location
+ * @return the distance in Meters
+ */
+ static getRhumbLineDistance(location: GeoLocation, destination: GeoLocation): number;
}
/**
- * This class extends ZmanimCalendar and provides many more zmanim than available in the ZmanimCalendar. The basis - * for most zmanim in this class are from the sefer Yisroel - * Vehazmanim by Rabbi Yisrael Dovid Harfenes. - * As an example of the number of different zmanim made available by this class, there are methods to return 18 - * different calculations for alos (dawn), 18 for plag hamincha and 29 for tzais available in this - * API. The real power of this API is the ease in calculating zmanim that are not part of the library. The methods for - * zmanim calculations not present in this class or it's superclass {@link ZmanimCalendar} are contained in the - * {@link AstronomicalCalendar}, the base class of the calendars in our API since they are generic methods for calculating - * time based on degrees or time before or after {@link #getSunrise sunrise} and {@link #getSunset sunset} and are of interest - * for calculation beyond zmanim calculations. Here are some examples. + * A wrapper class for a astronomical times / zmanim that is mostly intended to allow sorting collections of astronomical times. + * It has fields for both date/time and duration based zmanim, name / labels as well as a longer description or explanation of a + * zman. + * + * Here is an example of various ways of sorting zmanim. *
First create the Calendar for the location you would like to calculate: * *
@@ -2936,4281 +2463,4755 @@ export declare class ZmanimCalendar extends AstronomicalCalendar { * double latitude = 40.0828; // Lakewood, NJ * double longitude = -74.2094; // Lakewood, NJ * double elevation = 20; // optional elevation correction in Meters - * // the String parameter in getTimeZone() has to be a valid timezone listed in - * // {@link java.util.TimeZone#getAvailableIDs()} + * // the String parameter in getTimeZone() has to be a valid timezone listed in {@link java.util.TimeZone#getAvailableIDs()} * TimeZone timeZone = TimeZone.getTimeZone("America/New_York"); * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone); * ComplexZmanimCalendar czc = new ComplexZmanimCalendar(location); - * // Optionally set the date or it will default to today's date - * czc.getCalendar().set(Calendar.MONTH, Calendar.FEBRUARY); - * czc.getCalendar().set(Calendar.DAY_OF_MONTH, 8);- *
- * Note: For locations such as Israel where the beginning and end of daylight savings time can fluctuate from
- * year to year, if your version of Java does not have an up to date timezone database, create a
- * {@link java.util.SimpleTimeZone} with the known start and end of DST.
- * To get alos calculated as 14° below the horizon (as calculated in the calendars published in Montreal),
- * add {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90) to the 14° offset to get the desired time:
- *
- *
- * Date alos14 = czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 14);- *
- * To get mincha gedola calculated based on the Magen Avraham (MGA) using a shaah zmanis based on the day starting - * 16.1° below the horizon (and ending 16.1° after sunset) the following calculation can be used: + * Zman sunset = new Zman(czc.getSunset(), "Sunset"); + * Zman shaah16 = new Zman(czc.getShaahZmanis16Point1Degrees(), "Shaah zmanis 16.1"); + * Zman sunrise = new Zman(czc.getSunrise(), "Sunrise"); + * Zman shaah = new Zman(czc.getShaahZmanisGra(), "Shaah zmanis GRA"); + * ArrayList<Zman> zl = new ArrayList<Zman>(); + * zl.add(sunset); + * zl.add(shaah16); + * zl.add(sunrise); + * zl.add(shaah); + * //will sort sunset, shaah 1.6, sunrise, shaah GRA + * System.out.println(zl); + * Collections.sort(zl, Zman.DATE_ORDER); + * // will sort sunrise, sunset, shaah, shaah 1.6 (the last 2 are not in any specific order) + * Collections.sort(zl, Zman.DURATION_ORDER); + * // will sort sunrise, sunset (the first 2 are not in any specific order), shaah GRA, shaah 1.6 + * Collections.sort(zl, Zman.NAME_ORDER); + * // will sort shaah 1.6, shaah GRA, sunrise, sunset + * * - *
- * Date minchaGedola = czc.getTimeOffset(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees() * 6.5);- *
- * or even simpler using the included convenience methods - *
- * Date minchaGedola = czc.getMinchaGedola(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees());- *
- * A little more complex example would be calculating zmanim that rely on a shaah zmanis that is
- * not present in this library. While a drop more complex, it is still rather easy. An example would be to calculate
- * the Trumas Hadeshen's alos to
- * tzais based plag hamincha as calculated in the Machzikei Hadass calendar in Manchester, England.
- * A number of this calendar's zmanim are calculated based on a day starting at alos of 12° before
- * sunrise and ending at tzais of 7.083° after sunset. Be aware that since the alos and tzais
- * do not use identical degree-based offsets, this leads to chatzos being at a time other than the
- * {@link #getSunTransit() solar transit} (solar midday). To calculate this zman, use the following steps. Note
- * that plag hamincha is 10.75 hours after the start of the day, and the following steps are all that it takes.
- *
- *
- * Date plag = czc.getPlagHamincha(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12), - * czc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));- *
- * Something a drop more challenging, but still simple, would be calculating a zman using the same "complex" - * offset day used in the above mentioned Manchester calendar, but for a shaos zmaniyos based zman not - * supported by this library, such as calculating the point that one should be makpid - * not to eat on erev Shabbos or erev Yom Tov. This is 9 shaos zmaniyos into the day. - *
- * long shaahZmanis = czc.getTemporalHour(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12), - * czc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083)); - * Date sofZmanAchila = getTimeOffset(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12), - * shaahZmanis * 9);- *
- * Calculating this sof zman achila according to the GRA - * is simplicity itself. - *
- * Date sofZamnAchila = czc.getTimeOffset(czc.getSunrise(), czc.getShaahZmanisGra() * 9);- * - *
+ * This is the definition of lexicographic ordering. If two strings are + * different, then either they have different characters at some index + * that is a valid index for both strings, or their lengths are different, + * or both. If they have different characters at one or more index + * positions, let k be the smallest such index; then the string + * whose character at position k has the smaller value, as + * determined by using the < operator, lexicographically precedes the + * other string. In this case, {@code compareTo} returns the + * difference of the two character values at position {@code k} in + * the two string -- that is, the value: + *
+ * If there is no index position at which they differ, then the shorter + * string lexicographically precedes the longer string. In this case, + * {@code compareTo} returns the difference of the lengths of the + * strings -- that is, the value: + *+ * this.charAt(k)-anotherString.charAt(k) + *
* - * @see #getTzaisGeonim6Point45Degrees() + * @param string1 + * @param string2 the {@code String} to be compared. + * @return the value {@code 0} if the argument string is equal to + * this string; a value less than {@code 0} if this string + * is lexicographically less than the string argument; and a + * value greater than {@code 0} if this string is + * lexicographically greater than the string argument. */ - protected static readonly ZENITH_6_POINT_45: number; + function compareTo(string1: string, string2: string): number; +} +export declare namespace IntegerUtils { /** - * The zenith of 7.65° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating misheyakir according to some opinions. - * - * @see #getMisheyakir7Point65Degrees() + * Compares 2 numbers + * @param x + * @param y */ - protected static readonly ZENITH_7_POINT_65: number; + function compare(x: number, y: number): number; +} +export declare const Long_MIN_VALUE: number; +/** + * @param {number} num + * @param {number} places - The number of places to pad with zeros + * @returns {string} - The formatted integer + */ +export declare function padZeros(num: number, places: number): string; +/** + * Implementation of sunrise and sunset methods to calculate astronomical times based on the NOAA algorithm. This calculator uses the Java algorithm based on the implementation by NOAA - National Oceanic and Atmospheric Administration's Surface Radiation Research Branch. NOAA's implementation is based on equations from Astronomical Algorithms by Jean Meeus. Added to the algorithm is an adjustment of the zenith + * to account for elevation. The algorithm can be found in the Wikipedia Sunrise Equation article. + * + * @author © Eliyahu Hershfeld 2011 - 2019 + */ +export declare class NOAACalculator extends AstronomicalCalculator { /** - * The zenith of 7.67° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating tzais according to some opinions. - * - * @see #getTzaisGeonim7Point67Degrees() + * The Julian day of January 1, 2000 */ - protected static readonly ZENITH_7_POINT_67: number; + private static readonly JULIAN_DAY_JAN_1_2000; /** - * The zenith of 9.3° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating tzais (nightfall) according to some opinions. - * - * @see #getTzaisGeonim9Point3Degrees() + * Julian days per century */ - protected static readonly ZENITH_9_POINT_3: number; + private static readonly JULIAN_DAYS_PER_CENTURY; /** - * The zenith of 9.5° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating misheyakir according to some opinions. - * - * @see #getMisheyakir9Point5Degrees() + * @see AstronomicalCalculator#getCalculatorName() */ - protected static readonly ZENITH_9_POINT_5: number; + getCalculatorName(): string; /** - * The zenith of 9.75° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating alos (dawn) and tzais (nightfall) according to some opinions. - * - * @see #getTzaisGeonim9Point75Degrees() + * @see AstronomicalCalculator#getUTCSunrise(Calendar, GeoLocation, double, boolean) */ - protected static readonly ZENITH_9_POINT_75: number; + getUTCSunrise(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number; /** - * The zenith of 2.1° above {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating the start of bain hashmashos (twilight) of 13.5 minutes before sunset converted to degrees - * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction - * and from the center of the sun. It would be 0.833° less without this. - * - * @see #getBainHashmashosYereim2Point1Degrees() + * @see AstronomicalCalculator#getUTCSunset(Calendar, GeoLocation, double, boolean) */ - protected static readonly ZENITH_MINUS_2_POINT_1: number; + getUTCSunset(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number; /** - * The zenith of 2.8° above {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating the start of bain hashmashos (twilight) of 16.875 minutes before sunset converted to degrees - * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction - * and from the center of the sun. It would be 0.833° less without this. + * Return the Julian day from a Java Calendar * - * @see #getBainHashmashosYereim2Point8Degrees() + * @param calendar + * The Java Calendar + * @return the Julian day corresponding to the date Note: Number is returned for start of day. Fractional days + * should be added later. */ - protected static readonly ZENITH_MINUS_2_POINT_8: number; + private static getJulianDay; /** - * The zenith of 3.05° above {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating the start of bain hashmashos (twilight) of 18 minutes before sunset converted to degrees - * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction - * and from the center of the sun. It would be 0.833° less without this. + * Convert Julian day to centuries since J2000.0. * - * @see #getBainHashmashosYereim3Point05Degrees() + * @param julianDay + * the Julian Day to convert + * @return the centuries since 2000 Julian corresponding to the Julian Day */ - protected static readonly ZENITH_MINUS_3_POINT_05: number; + private static getJulianCenturiesFromJulianDay; /** - * The offset in minutes (defaults to 40) after sunset used for tzeit based on calculations of - * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah. - * @see #getTzaisAteretTorah() - * @see #getAteretTorahSunsetOffset() - * @see #setAteretTorahSunsetOffset(double) + * Convert centuries since J2000.0 to Julian day. + * + * @param julianCenturies + * the number of Julian centuries since J2000.0 + * @return the Julian Day corresponding to the Julian centuries passed in */ - private ateretTorahSunsetOffset; + private static getJulianDayFromJulianCenturies; /** - * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default - * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date. + * Returns the Geometric Mean Longitude of the Sun. * - * @see AstronomicalCalendar#AstronomicalCalendar() + * @param julianCenturies + * the number of Julian centuries since J2000.0 + * @return the Geometric Mean Longitude of the Sun in degrees */ + private static getSunGeometricMeanLongitude; /** - * Method to return a shaah zmanis (temporal hour) calculated using a 19.8° dip. This calculation - * divides the day based on the opinion of the Magen - * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is 19.8° - * below the eastern geometric horizon before sunrise. Dusk for this is when the sun is 19.8° below the western - * geometric horizon after sunset. This day is split into 12 equal parts with each part being a shaah zmanis. + * Returns the Geometric Mean Anomaly of the Sun. * - * @return the+ * this.length()-anotherString.length() + *
long
millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE}
- * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
+ * @param julianCenturies
+ * the number of Julian centuries since J2000.0
+ * @return the Geometric Mean Anomaly of the Sun in degrees
*/
- getShaahZmanis19Point8Degrees(): Temporal.Duration | undefined;
+ private static getSunGeometricMeanAnomaly;
/**
- * Method to return a shaah zmanis (temporal hour) calculated using a 18° dip. This calculation divides
- * the day based on the opinion of the Magen Avraham
- * (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is 18° below the
- * eastern geometric horizon before sunrise. Dusk for this is when the sun is 18° below the western geometric
- * horizon after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.
+ * Return the eccentricity of earth's orbit.
*
- * @return the long
millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE}
- * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
+ * @param julianCenturies
+ * the number of Julian centuries since J2000.0
+ * @return the unitless eccentricity
*/
- getShaahZmanis18Degrees(): Temporal.Duration | undefined;
+ private static getEarthOrbitEccentricity;
/**
- * Method to return a shaah zmanis (temporal hour) calculated using a dip of 26°. This calculation
- * divides the day based on the opinion of the Magen
- * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is
- * {@link #getAlos26Degrees() 26°} below the eastern geometric horizon before sunrise. Dusk for this is when
- * the sun is {@link #getTzais26Degrees() 26°} below the western geometric horizon after sunset. This day is
- * split into 12 equal parts with each part being a shaah zmanis. Since zmanim that use this
- * method are extremely late or early and at a point when the sky is a long time past the 18° point where the
- * darkest point is reached, zmanim that use this should only be used lechumra, such as
- * delaying the start of nighttime mitzvos.
+ * Returns the equation of center for the sun.
*
- * @return the long
millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE}
- * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis120Minutes()
+ * @param julianCenturies
+ * the number of Julian centuries since J2000.0
+ * @return the equation of center for the sun in degrees
*/
- getShaahZmanis26Degrees(): Temporal.Duration | undefined;
+ private static getSunEquationOfCenter;
/**
- * Method to return a shaah zmanis (temporal hour) calculated using a dip of 16.1°. This calculation
- * divides the day based on the opinion that the day runs from dawn to dusk. Dawn for this calculation is when the
- * sun is 16.1° below the eastern geometric horizon before sunrise and dusk is when the sun is 16.1° below
- * the western geometric horizon after sunset. This day is split into 12 equal parts with each part being a
- * shaah zmanis.
- *
- * @return the long
millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE}
- * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
+ * Return the true longitude of the sun
*
- * @see #getAlos16Point1Degrees()
- * @see #getTzais16Point1Degrees()
- * @see #getSofZmanShmaMGA16Point1Degrees()
- * @see #getSofZmanTfilaMGA16Point1Degrees()
- * @see #getMinchaGedola16Point1Degrees()
- * @see #getMinchaKetana16Point1Degrees()
- * @see #getPlagHamincha16Point1Degrees()
+ * @param julianCenturies
+ * the number of Julian centuries since J2000.0
+ * @return the sun's true longitude in degrees
*/
- getShaahZmanis16Point1Degrees(): Temporal.Duration | undefined;
+ private static getSunTrueLongitude;
/**
- * Method to return a shaah zmanis (solar hour) according to the opinion of the Magen Avraham (MGA). This calculation
- * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is
- * 60 minutes before sunrise and dusk is 60 minutes after sunset. This day is split into 12 equal parts with each
- * part being a shaah zmanis. Alternate methods of calculating a shaah zmanis are available in the
- * subclass {@link ComplexZmanimCalendar}.
- *
- * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
- * {@link AstronomicalCalendar} documentation.
+ * Return the apparent longitude of the sun
*
- * @see #getAlos60()
- * @see #getTzais60()
- * @see #getPlagHamincha60Minutes()
+ * @param julianCenturies
+ * the number of Julian centuries since J2000.0
+ * @return sun's apparent longitude in degrees
*/
- getShaahZmanis60Minutes(): Temporal.Duration | undefined;
+ private static getSunApparentLongitude;
/**
- * Method to return a shaah zmanis (solar hour) according to the opinion of the Magen Avraham (MGA). This calculation divides the day
- * based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 72 minutes
- * before sunrise and dusk is 72 minutes after sunset. This day is split into 12 equal parts with each part
- * being a shaah zmanis. Alternate methods of calculating a shaah zmanis are available in the
- * subclass {@link ComplexZmanimCalendar}.
+ * Returns the mean obliquity of the ecliptic (Axial tilt).
*
- * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
- * {@link AstronomicalCalendar} documentation.
+ * @param julianCenturies
+ * the number of Julian centuries since J2000.0
+ * @return the mean obliquity in degrees
*/
- getShaahZmanis72Minutes(): Temporal.Duration | undefined;
+ private static getMeanObliquityOfEcliptic;
/**
- * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being
- * {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation
- * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation
- * is 72 minutes zmaniyos before sunrise and dusk is 72 minutes zmaniyos after sunset. This day
- * is split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/10th of the day
- * from {@link #getSunrise() sunrise} to {@link #getSunset() sunset}.
+ * Returns the corrected obliquity of the ecliptic (Axial
+ * tilt).
*
- * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
- * {@link AstronomicalCalendar} documentation.
- * @see #getAlos72Zmanis()
- * @see #getTzais72Zmanis()
+ * @param julianCenturies
+ * the number of Julian centuries since J2000.0
+ * @return the corrected obliquity in degrees
*/
- getShaahZmanis72MinutesZmanis(): Temporal.Duration | undefined;
+ private static getObliquityCorrection;
/**
- * Method to return a shaah zmanis (temporal hour) calculated using a dip of 90 minutes. This calculation
- * divides the day based on the opinion of the Magen
- * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes before sunrise
- * and dusk is 90 minutes after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.
+ * Return the declination of the sun.
*
- * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
- * {@link AstronomicalCalendar} documentation.
+ * @param julianCenturies
+ * the number of Julian centuries since J2000.0
+ * @return
+ * the sun's declination in degrees
*/
- getShaahZmanis90Minutes(): Temporal.Duration | undefined;
+ private static getSunDeclination;
/**
- * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being
- * {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides
- * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes
- * zmaniyos before sunrise and dusk is 90 minutes zmaniyos after sunset. This day is split into 12 equal
- * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link #getSunrise() sunrise} to
- * {@link #getSunset() sunset}.
+ * Return the Equation of Time - the difference between
+ * true solar time and mean solar time
*
- * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
- * {@link AstronomicalCalendar} documentation.
- * @see #getAlos90Zmanis()
- * @see #getTzais90Zmanis()
+ * @param julianCenturies
+ * the number of Julian centuries since J2000.0
+ * @return equation of time in minutes of time
*/
- getShaahZmanis90MinutesZmanis(): Temporal.Duration | undefined;
+ private static getEquationOfTime;
/**
- * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link
- * #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides the
- * day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes
- * zmaniyos before sunrise and dusk is 96 minutes zmaniyos after sunset. This day is split into 12
- * equal parts with each part being a shaah zmanis. This is identical to 1/7.5th of the day from
- * {@link #getSunrise() sunrise} to {@link #getSunset() sunset}.
+ * Return the hour angle of the sun at sunrise for the
+ * latitude.
*
- * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
- * {@link AstronomicalCalendar} documentation.
- * @see #getAlos96Zmanis()
- * @see #getTzais96Zmanis()
+ * @param lat
+ * , the latitude of observer in degrees
+ * @param solarDec
+ * the declination angle of sun in degrees
+ * @param zenith
+ * the zenith
+ * @return hour angle of sunrise in radians
*/
- getShaahZmanis96MinutesZmanis(): Temporal.Duration | undefined;
+ private static getSunHourAngleAtSunrise;
/**
- * Method to return a shaah zmanis (temporal hour) according to the opinion of the
- * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculated with alos being 1/10th
- * of sunrise to sunset day, or {@link #getAlos72Zmanis() 72} minutes zmaniyos of such a day before
- * {@link #getSunrise() sunrise}, and tzais is usually calculated as {@link #getTzaisAteretTorah() 40
- * minutes} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}) after {@link #getSunset()
- * sunset}. This day is split into 12 equal parts with each part being a shaah zmanis. Note that with this
- * system, chatzos (mid-day) will not be the point that the sun is {@link #getSunTransit() halfway across
- * the sky}.
+ * Returns the hour angle of the sun at sunset for the
+ * latitude. TODO: use - {@link #getSunHourAngleAtSunrise(double, double, double)} implementation to avoid
+ * duplication of code.
*
- * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
- * {@link AstronomicalCalendar} documentation.
- * @see #getAlos72Zmanis()
- * @see #getTzaisAteretTorah()
- * @see #getAteretTorahSunsetOffset()
- * @see #setAteretTorahSunsetOffset(double)
+ * @param lat
+ * the latitude of observer in degrees
+ * @param solarDec
+ * the declination angle of sun in degrees
+ * @param zenith
+ * the zenith
+ * @return the hour angle of sunset in radians
*/
- getShaahZmanisAteretTorah(): Temporal.Duration | undefined;
+ private static getSunHourAngleAtSunset;
/**
- * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of
- * Rabbi Yaakov Moshe Hillel as published in the
- * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before
- * sunrise in degrees {@link #getAlos16Point1Degrees() alos 16.1°} and ending 14 minutes after sunset in
- * degrees {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°}. This day is split into 12 equal parts with
- * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point
- * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha
- * Ketana and Plag Hamincha. The 14 minutes are based on 3/4 of an 18 minute mil, with half a minute
- * added for Rav Yosi.
- *
- * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
- * {@link AstronomicalCalendar} documentation.
+ * Return the Solar Elevation for the
+ * horizontal coordinate system at the given location at the given time. Can be negative if the sun is below the
+ * horizon. Not corrected for altitude.
*
- * @see #getMinchaKetanaAhavatShalom()
- * @see #getPlagAhavatShalom()
+ * @param cal
+ * time of calculation
+ * @param lat
+ * latitude of location for calculation
+ * @param lon
+ * longitude of location for calculation
+ * @return solar elevation in degrees - horizon is 0 degrees, civil twilight is -6 degrees
*/
- getShaahZmanisAlos16Point1ToTzais3Point8(): Temporal.Duration | undefined;
/**
- * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of
- * Rabbi Yaakov Moshe Hillel as published in the
- * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before
- * sunrise in degrees {@link #getAlos16Point1Degrees() alos 16.1°} and ending 13.5 minutes after sunset in
- * degrees {@link #getTzaisGeonim3Point7Degrees() tzais 3.7°}. This day is split into 12 equal parts with
- * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point
- * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha
- * Gedola calculation.
- *
- * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
- * {@link AstronomicalCalendar} documentation.
+ * Return the Solar Azimuth for the
+ * horizontal coordinate system at the given location at the given time. Not corrected for altitude. True south is 0
+ * degrees.
*
- * @see #getMinchaGedolaAhavatShalom()
+ * @param cal
+ * time of calculation
+ * @param latitude
+ * latitude of location for calculation
+ * @param lon
+ * longitude of location for calculation
+ * @return FIXME
*/
- getShaahZmanisAlos16Point1ToTzais3Point7(): Temporal.Duration | undefined;
/**
- * Method to return a shaah zmanis (temporal hour) calculated using a dip of 96 minutes. This calculation
- * divides the day based on the opinion of the Magen
- * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes before sunrise
- * and dusk is 96 minutes after sunset. This day is split into 12 equal parts with each part being a shaah
- * zmanis.
+ * Return the Universal Coordinated Time (UTC)
+ * of sunrise for the given day at the given location on earth
*
- * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
- * {@link AstronomicalCalendar} documentation.
- */
- getShaahZmanis96Minutes(): Temporal.Duration | undefined;
- /**
- * Method to return a shaah zmanis (temporal hour) calculated using a dip of 120 minutes. This calculation
- * divides the day based on the opinion of the Magen
- * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 120 minutes before sunrise and
- * dusk is 120 minutes after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.
- * Since zmanim that use this method are extremely late or early and at a point when the sky is a long time
- * past the 18° point where the darkest point is reached, zmanim that use this should only be used
- * lechumra only, such as delaying the start of nighttime mitzvos.
- *
- * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis26Degrees()
+ * @param julianDay
+ * the Julian day
+ * @param latitude
+ * the latitude of observer in degrees
+ * @param longitude
+ * the longitude of observer in degrees
+ * @param zenith
+ * the zenith
+ * @return the time in minutes from zero UTC
*/
- getShaahZmanis120Minutes(): Temporal.Duration | undefined;
- /**
- * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link
- * #getAlos120Zmanis() 120} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides
- * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is
- * 120 minutes zmaniyos before sunrise and dusk is 120 minutes zmaniyos after sunset. This day is
- * split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/6th of the day from
- * {@link #getSunrise() sunrise} to {@link #getSunset() sunset}. Since zmanim that use this method are
- * extremely late or early and at a point when the sky is a long time past the 18° point where the darkest point
- * is reached, zmanim that use this should only be used lechumra such as delaying the start of
- * nighttime mitzvos.
- *
- * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
- * {@link AstronomicalCalendar} documentation.
- * @see #getAlos120Zmanis()
- * @see #getTzais120Zmanis()
- */
- getShaahZmanis120MinutesZmanis(): Temporal.Duration | undefined;
+ private static getSunriseUTC;
+ getUTCNoon(calendar: Temporal.PlainDate, geoLocation: GeoLocation): number;
/**
- * This method should be used lechumra only and returns the time of plag hamincha based on sunrise
- * being 120 minutes zmaniyos or 1/6th of the day before sunrise. This is calculated as 10.75 hours after
- * {@link #getAlos120Zmanis() dawn}. The formula used is 10.75 * {@link #getShaahZmanis120MinutesZmanis()} after
- * {@link #getAlos120Zmanis() dawn}. Since the zman based on an extremely early alos and a very
- * late tzais, it should only be used lechumra.
- *
- * @deprecated This method should be used lechumra only since it returns a very late time, and if used
- * lekula can result in chillul Shabbos etc. There is no current plan to remove this
- * method from the API, and this deprecation is intended to alert developers of the danger of using it.
- *
- * @return 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 the
- * {@link AstronomicalCalendar} documentation.
+ * Return the Universal Coordinated Time (UTC)
+ * of solar noon for the given day at the given location
+ * on earth.
*
- * @see #getShaahZmanis120MinutesZmanis()
- * @see #getAlos120()
- * @see #getTzais120()
- * @see #getPlagHamincha26Degrees()
- * @see #getPlagHamincha120Minutes()
+ * @param julianCenturies
+ * the number of Julian centuries since J2000.0
+ * @param longitude
+ * the longitude of observer in degrees
+ * @return the time in minutes from zero UTC
*/
- getPlagHamincha120MinutesZmanis(): Temporal.ZonedDateTime | null;
+ private static getSolarNoonUTC;
/**
- * This method should be used lechumra only and returns the time of plag hamincha according to the
- * Magen Avraham with the day starting 120 minutes before sunrise and ending 120 minutes after sunset. This is
- * calculated as 10.75 hours after {@link #getAlos120() dawn 120 minutes}. The formula used is 10.75 {@link
- * #getShaahZmanis120Minutes()} after {@link #getAlos120()}. Since the zman based on an extremely early
- * alos and a very late tzais, it should only be used lechumra.
- *
- * @deprecated This method should be used lechumra only since it returns a very late time, and if used
- * lekula can result in chillul Shabbos etc. There is no current plan to remove this
- * method from the API, and this deprecation is intended to alert developers of the danger of using it.
- *
- * @return 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 the
- * {@link AstronomicalCalendar} documentation.
+ * Return the Universal Coordinated Time (UTC)
+ * of sunset for the given day at the given location on earth
*
- * @see #getShaahZmanis120Minutes()
- * @see #getPlagHamincha26Degrees()
+ * @param julianDay
+ * the Julian day
+ * @param latitude
+ * the latitude of observer in degrees
+ * @param longitude
+ * : longitude of observer in degrees
+ * @param zenith
+ * the zenith
+ * @return the time in minutes from zero Universal Coordinated Time (UTC)
*/
- getPlagHamincha120Minutes(): Temporal.ZonedDateTime | null;
+ private static getSunsetUTC;
+}
+/**
+ * Implementation of sunrise and sunset methods to calculate astronomical times. This calculator uses the Java algorithm
+ * written by Kevin
+ * Boone that is based on the US Naval Observatory'sAlmanac for Computer algorithm ( Amazon, Barnes & Noble) and is
+ * used with his permission. Added to Kevin's code is adjustment of the zenith to account for elevation.
+ *
+ * @author © Eliyahu Hershfeld 2004 - 2019
+ * @author © Kevin Boone 2000
+ * @version 1.1
+ */
+export declare class SunTimesCalculator extends AstronomicalCalculator {
/**
- * Method to return alos (dawn) calculated as 60 minutes before sunrise. This is the time to walk the
- * distance of 4 Mil at 15 minutes a Mil. This seems to be the opinion of the Chavas Yair in the Mekor Chaim, Orach Chaim Ch.
- * 90, though the Mekor Chaim in Ch. 58 and in the Chut Hashani Cha 97 states that
- * a a person walks 3 and a 1/3 mil in an hour, or an 18-minute mil. Also see the Divrei Malkiel Vol. 4, Ch. 20, page 34) who
- * mentions the 15 minute mil lechumra by baking matzos. Also see the Maharik Ch. 173 where the questioner quoting the
- * Ra'avan is of the opinion that the time to walk a
- * mil is 15 minutes (5 mil in a little over an hour). There are many who believe that there is a
- * ta'us sofer (scribe's error) in the Ra'avan, and it should 4 mil in a little over an hour, or an
- * 18-minute mil. Time based offset calculations are based on the opinion of the
- * Rishonim who stated that the time of the neshef
- * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it takes to
- * walk the distance of 4* mil. {@link #getTzaisGeonim9Point75Degrees()} is a related zman that is a
- * degree-based calculation based on 60 minutes.
- *
- * @return 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 the {@link AstronomicalCalendar}.
- * documentation.
- *
- * @see #getTzais60()
- * @see #getPlagHamincha60Minutes()
- * @see #getShaahZmanis60Minutes()
+ * @see AstronomicalCalculator#getCalculatorName()
*/
- getAlos60(): Temporal.ZonedDateTime | undefined;
+ getCalculatorName(): string;
/**
- * Method to return alos (dawn) calculated using 72 minutes zmaniyos or 1/10th of the day before
- * sunrise. This is based on an 18-minute Mil so the time for 4 Mil is 72 minutes which is 1/10th
- * of a day (12 * 60 = 720) based on the a day being from {@link #getSeaLevelSunrise() sea level sunrise} to
- * {@link #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset}
- * (depending on the {@link #isUseElevation()} setting).
- * The actual calculation is {@link #getSeaLevelSunrise()} - ({@link #getShaahZmanisGra()} * 1.2). This calculation
- * is used in the calendars published by the Hisachdus Harabanim D'Artzos Habris Ve'Canada.
- *
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
- * @see #getShaahZmanisGra()
+ * @see AstronomicalCalculator#getUTCSunrise(Calendar, GeoLocation, double, boolean)
*/
- getAlos72Zmanis(): Temporal.ZonedDateTime | null;
+ getUTCSunrise(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number;
/**
- * Method to return alos (dawn) calculated using 96 minutes before before {@link #getSunrise() sunrise} or
- * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting) that is based
- * on the time to walk the distance of 4 Mil at 24 minutes a Mil. Time based offset
- * calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef (time between dawn and sunrise) does not vary
- * by the time of year or location but purely depends on the time it takes to walk the distance of 4 Mil.
- *
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
+ * @see AstronomicalCalculator#getUTCSunset(Calendar, GeoLocation, double, boolean)
*/
- getAlos96(): Temporal.ZonedDateTime | undefined;
+ getUTCSunset(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number;
/**
- * Method to return alos (dawn) calculated using 90 minutes zmaniyos or 1/8th of the day before
- * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link
- * #isUseElevation()} setting). This is based on a 22.5-minute Mil so the time for 4 Mil is 90
- * minutes which is 1/8th of a day (12 * 60) / 8 = 90
- * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level
- * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}.
- * The actual calculation used is {@link #getSunrise()} - ({@link #getShaahZmanisGra()} * 1.5).
- *
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
- * @see #getShaahZmanisGra()
+ * The number of degrees of longitude that corresponds to one hour time difference.
*/
- getAlos90Zmanis(): Temporal.ZonedDateTime | null;
+ private static readonly DEG_PER_HOUR;
/**
- * This method returns alos (dawn) calculated using 96 minutes zmaniyos or 1/7.5th of the day before
- * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link
- * #isUseElevation()} setting). This is based on a 24-minute Mil so the time for 4 Mil is 96
- * minutes which is 1/7.5th of a day (12 * 60 / 7.5 = 96).
- * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level
- * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}.
- * The actual calculation used is {@link #getSunrise()} - ({@link #getShaahZmanisGra()} * 1.6).
- *
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
- * @see #getShaahZmanisGra()
+ * sin of an angle in degrees
*/
- getAlos96Zmanis(): Temporal.ZonedDateTime | null;
+ private static sinDeg;
/**
- * Method to return alos (dawn) calculated using 90 minutes before {@link #getSeaLevelSunrise() sea level
- * sunrise} based on the time to walk the distance of 4 Mil at 22.5 minutes a Mil. Time based
- * offset calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef
- * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it
- * takes to walk the distance of 4 Mil.
- *
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
+ * acos of an angle, result in degrees
*/
- getAlos90(): Temporal.ZonedDateTime | undefined;
+ private static acosDeg;
/**
- * This method should be used lechumra only and returns alos (dawn) calculated using 120 minutes
- * before {@link #getSeaLevelSunrise() sea level sunrise} (no adjustment for elevation is made) based on the time
- * to walk the distance of 5 Mil(Ula) at 24 minutes a Mil. Time based offset calculations
- * for alos are based on the* opinion of the Rishonim
- * who stated that the time of the neshef (time between dawn and sunrise) does not vary by the time of
- * year or location but purely depends on the time it takes to walk the distance of 5 Mil(Ula). Since
- * this time is extremely early, it should only be used lechumra, such as not eating after this time on a fast
- * day, and not as the start time for mitzvos that can only be performed during the day.
- *
- * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),
- * since it returns a very early time, and if used lekula can result in doing mitzvos hayom
- * too early according to most opinions. There is no current plan to remove this method from the API, and this
- * deprecation is intended to alert developers of the danger of using it.
- *
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
- *
- * @see #getTzais120()
- * @see #getAlos26Degrees()
+ * asin of an angle, result in degrees
*/
- getAlos120(): Temporal.ZonedDateTime | undefined;
+ private static asinDeg;
/**
- * This method should be used lechumra only and method returns alos (dawn) calculated using
- * 120 minutes zmaniyos or 1/6th of the day before {@link #getSunrise() sunrise} or {@link
- * #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This is based
- * on a 24-minute Mil so the time for 5 Mil is 120 minutes which is 1/6th of a day (12 * 60 /
- * 6 = 120). The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link
- * #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending
- * on the {@link #isUseElevation()}. The actual calculation used is {@link #getSunrise()} - ({@link
- * #getShaahZmanisGra()} * 2). Since this time is extremely early, it should only be used lechumra, such
- * as not eating after this time on a fast day, and not as the start time for mitzvos that can only be
- * performed during the day.
- *
- * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),
- * since it returns a very early time, and if used lekula can result in doing mitzvos hayom
- * too early according to most opinions. There is no current plan to remove this method from the API, and this
- * deprecation is intended to alert developers of the danger of using it.
- *
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
- * @see #getAlos120()
- * @see #getAlos26Degrees()
+ * tan of an angle in degrees
*/
- getAlos120Zmanis(): Temporal.ZonedDateTime | null;
+ private static tanDeg;
/**
- * This method should be used lechumra only and returns alos (dawn) calculated when the sun is {@link
- * #ZENITH_26_DEGREES 26°} below the eastern geometric horizon before sunrise. This calculation is based on the same
- * calculation of {@link #getAlos120() 120 minutes} but uses a degree-based calculation instead of 120 exact minutes. This
- * calculation is based on the position of the sun 120 minutes before sunrise in Jerusalem around the equinox / equilux, which
- * calculates to 26° below {@link #GEOMETRIC_ZENITH geometric zenith}. Since this time is extremely early, it should
- * only be used lechumra only, such as not eating after this time on a fast day, and not as the start time for
- * mitzvos that can only be performed during the day.
- *
- * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),
- * since it returns a very early time, and if used lekula can result in doing mitzvos hayom
- * too early according to most opinions. There is no current plan to remove this method from the API, and this
- * deprecation is intended to alert developers of the danger of using it.
+ * Calculate cosine of the angle in degrees
*
- * @return the Date
representing alos. 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 the {@link AstronomicalCalendar} documentation.
- * @see #ZENITH_26_DEGREES
- * @see #getAlos120()
- * @see #getTzais120()
- * @see #getTzais26Degrees()
+ * @param deg degrees
+ * @return cosine of the angle in degrees
*/
- getAlos26Degrees(): Temporal.ZonedDateTime | null;
+ private static cosDeg;
/**
- * A method to return alos (dawn) calculated when the sun is {@link #ASTRONOMICAL_ZENITH 18°} below the
- * eastern geometric horizon before sunrise.
- *
- * @return the Date
representing alos. 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 the {@link AstronomicalCalendar} documentation.
- * @see #ASTRONOMICAL_ZENITH
+ * Get time difference between location's longitude and the Meridian, in hours. West of Meridian has a negative time
+ * difference
*/
- getAlos18Degrees(): Temporal.ZonedDateTime | null;
+ private static getHoursFromMeridian;
/**
- * A method to return alos (dawn) calculated when the sun is {@link #ZENITH_19_DEGREES 19°} below the
- * eastern geometric horizon before sunrise. This is the Rambam's alos according to Rabbi Moshe Kosower's Maaglei Tzedek, page 88, Ayeles Hashachar Vol. I, page 12, Yom Valayla Shel Torah, Ch. 34, p. 222 and
- * Rabbi Yaakov Shakow's Luach Ikvei Hayom.
+ * Calculate the approximate time of sunset or sunrise in days since midnight Jan 1st, assuming 6am and 6pm events. We
+ * need this figure to derive the Sun's mean anomaly.
*
- * @return the Date
representing alos. 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 the {@link AstronomicalCalendar} documentation.
- * @see #ASTRONOMICAL_ZENITH
- */
- getAlos19Degrees(): Temporal.ZonedDateTime | null;
- /**
- * Method to return alos (dawn) calculated when the sun is {@link #ZENITH_19_POINT_8 19.8°} below the
- * eastern geometric horizon before sunrise. This calculation is based on the same calculation of
- * {@link #getAlos90() 90 minutes} but uses a degree-based calculation instead of 90 exact minutes. This calculation
- * is based on the position of the sun 90 minutes before sunrise in Jerusalem around the equinox / equilux, which
- * calculates to 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith}.
+ * @param dayOfYear the day of year
+ * @param hoursFromMeridian hours from the meridian
+ * @param isSunrise true for sunrise and false for sunset
*
- * @return the Date
representing alos. 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 the {@link AstronomicalCalendar} documentation.
- * @see #ZENITH_19_POINT_8
- * @see #getAlos90()
+ * @return the approximate time of sunset or sunrise in days since midnight Jan 1st, assuming 6am and 6pm events. We
+ * need this figure to derive the Sun's mean anomaly.
*/
- getAlos19Point8Degrees(): Temporal.ZonedDateTime | null;
+ private static getApproxTimeDays;
/**
- * Method to return alos (dawn) calculated when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the
- * eastern geometric horizon before sunrise. This calculation is based on the same calculation of
- * {@link #getAlos72() 72 minutes} but uses a degree-based calculation instead of 72 exact minutes. This calculation
- * is based on the position of the sun 72 minutes before sunrise in Jerusalem around the equinox / equilux, which
- * calculates to 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}.
+ * Calculate the Sun's mean anomaly in degrees, at sunrise or sunset, given the longitude in degrees
*
- * @return the Date
representing alos. 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 the {@link AstronomicalCalendar} documentation.
- * @see #ZENITH_16_POINT_1
- * @see #getAlos72()
+ * @param dayOfYear the day of the year
+ * @param longitude longitude
+ * @param isSunrise true for sunrise and false for sunset
+ * @return the Sun's mean anomaly in degrees
*/
- getAlos16Point1Degrees(): Temporal.ZonedDateTime | null;
+ private static getMeanAnomaly;
/**
- * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES
- * 11.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating
- * misheyakir according to some opinions. This calculation is based on the position of the sun 52 minutes
- * before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux,
- * which calculates to 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith}.
- * @todo recalculate.
- *
- * @return the Date
of misheyakir. 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 the {@link AstronomicalCalendar} documentation.
- * @see #ZENITH_11_POINT_5
+ * Calculates the Sun's true longitude in degrees. The result is an angle gte 0 and lt 360. Requires the Sun's mean
+ * anomaly, also in degrees
*/
- getMisheyakir11Point5Degrees(): Temporal.ZonedDateTime | null;
+ private static getSunTrueLongitude;
/**
- * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES
- * 11°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating
- * misheyakir according to some opinions. This calculation is based on the position of the sun 48 minutes
- * before {@link #getSunrise sunrise} in Jerusalem daround the equinox / equilux,
- * which calculates to 11° below {@link #GEOMETRIC_ZENITH geometric zenith}.
- *
- * @return 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #ZENITH_11_DEGREES
+ * Calculates the Sun's right ascension in hours, given the Sun's true longitude in degrees. Input and output are
+ * angles gte 0 and lt 360.
*/
- getMisheyakir11Degrees(): Temporal.ZonedDateTime | null;
+ private static getSunRightAscensionHours;
/**
- * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_10_POINT_2
- * 10.2°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating
- * misheyakir according to some opinions. This calculation is based on the position of the sun 45 minutes
- * before {@link #getSunrise sunrise} in Jerusalem around the equinox which calculates
- * to 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith}.
+ * Calculate the cosine of the Sun's local hour angle
*
- * @return the Date
of misheyakir. 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 the {@link AstronomicalCalendar} documentation.
- * @see #ZENITH_10_POINT_2
+ * @param sunTrueLongitude the sun's true longitude
+ * @param latitude the latitude
+ * @param zenith the zenith
+ * @return the cosine of the Sun's local hour angle
*/
- getMisheyakir10Point2Degrees(): Temporal.ZonedDateTime | null;
+ private static getCosLocalHourAngle;
/**
- * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_7_POINT_65
- * 7.65°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). The degrees are based on a 35/36 minute
- * zman around the
- * equinox / equilux, when the neshef (twilight) is the shortest. This time is based on Rabbi Moshe Feinstein who writes in Ohr Hachaim Vol. 4, Ch. 6)
- * that misheyakir in New York is 35-40 minutes before sunset, something that is a drop less than 8°.
- * Rabbi Yisroel Taplin in Zmanei Yisrael (page 117) notes that Rabbi Yaakov Kamenetsky stated that it is not less than 36
- * minutes before sunrise (maybe it is 40 minutes). Sefer Yisrael Vehazmanim (p. 7) quotes the Tamar Yifrach
- * in the name of the Satmar Rov that one should be stringent
- * not consider misheyakir before 36 minutes. This is also the accepted minhag in Lakewood that is used in the Yeshiva. This follows the opinion of Rabbi Shmuel Kamenetsky who provided the time of 35/36 minutes,
- * but did not provide a degree-based time. Since this zman depends on the level of light, Rabbi Yaakov Shakow
- * presented this degree-based calculations to Rabbi Kamenetsky who agreed to them.
+ * Calculate local mean time of rising or setting. By `local' is meant the exact time at the location, assuming that
+ * there were no time zone. That is, the time difference between the location and the Meridian depended entirely on
+ * the longitude. We can't do anything with this time directly; we must convert it to UTC and then to a local time.
+ * The result is expressed as a fractional number of hours since midnight
*
- * @return the Date
of misheyakir. 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 the {@link AstronomicalCalendar} documentation.
+ * @param localHour the local hour
+ * @param sunRightAscensionHours the sun's right ascention in hours
+ * @param approxTimeDays approximate time days
*
- * @see #ZENITH_7_POINT_65
- * @see #getMisheyakir9Point5Degrees()
+ * @return the fractional number of hours since midnight as a double
*/
- getMisheyakir7Point65Degrees(): Temporal.ZonedDateTime | null;
+ private static getLocalMeanTime;
/**
- * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_9_POINT_5
- * 9.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is based on Rabbi Dovid Kronglass's
- * Calculation of 45 minutes in Baltimore as mentioned in Divrei Chachamim No. 24 brought down by the Birur Halacha, Tinyana, Ch. 18. This calculates to
- * 9.5°. Also see Rabbi Yaakov Yitzchok Neiman in Kovetz
- * Eitz Chaim Vol. 9, p. 202 that the Vya'an Yosef did not want to rely on times earlier than 45 minutes in New York. This
- * zman is also used in the calendars published by Rabbi Hershel Edelstein. As mentioned in Yisroel Vehazmanim,
- * Rabbi Edelstein who was given the 45 minute zman by Rabbi Bick. The calendars published by the Edot Hamizrach communities also use this zman. This also
- * follows the opinion of Rabbi Shmuel Kamenetsky who provided
- * the time of 36 and 45 minutes, but did not provide a degree-based time. Since this zman depends on the level of
- * light, Rabbi Yaakov Shakow presented these degree-based times to Rabbi Shmuel Kamenetsky who agreed to them.
- *
- * @return the Date
of misheyakir. 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 the {@link AstronomicalCalendar} documentation.
+ * Get sunrise or sunset time in UTC, according to flag.
*
- * @see #ZENITH_9_POINT_5
- * @see #getMisheyakir7Point65Degrees()
- */
- getMisheyakir9Point5Degrees(): Temporal.ZonedDateTime | null;
- /**
- * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
- * opinion of the Magen Avraham (MGA) based on
- * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise() sunrise}. This
- * time is 3 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link
- * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall
- * with both being 19.8° below sunrise or sunset. This returns the time of 3 *
- * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.
+ * @param year
+ * 4-digit year
+ * @param month
+ * month, 1-12 (not the zero based Java month
+ * @param day
+ * day of month, 1-31
+ * @param longitude
+ * in degrees, longitudes west of Meridian are negative
+ * @param latitude
+ * in degrees, latitudes south of equator are negative
+ * @param zenith
+ * Sun's zenith, in degrees
+ * @param type
+ * type of calculation to carry out {@link #TYPE_SUNRISE} or {@link #TYPE_SUNRISE}.
*
- * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis19Point8Degrees()
- * @see #getAlos19Point8Degrees()
+ * @return the time as a double. If an error was encountered in the calculation (expected behavior for some
+ * locations such as near the poles, {@link Double.NaN} will be returned.
*/
- getSofZmanShmaMGA19Point8Degrees(): Temporal.ZonedDateTime | null;
+ private static getTimeUTC;
/**
- * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
- * opinion of the Magen Avraham (MGA) based
- * on alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time
- * is 3 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after
- * {@link #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from
- * dawn to nightfall with both being 16.1° below sunrise or sunset. This returns the time of
- * 3 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.
+ * Return the Universal Coordinated Time (UTC)
+ * of solar noon for the given day at the given location
+ * on earth. This implementation returns solar noon as the time halfway between sunrise and sunset.
+ * Other calculators may return true solar noon. See The Definition of Chatzos for details on solar
+ * noon calculations.
+ * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation)
+ * @see NOAACalculator
+ *
+ * @param calendar
+ * The Calendar representing the date to calculate solar noon for
+ * @param geoLocation
+ * The location information used for astronomical calculating sun times.
+ * @return the time in minutes from zero UTC
+ */
+ getUTCNoon(calendar: Temporal.PlainDate, geoLocation: GeoLocation): number;
+}
+/**
+ * The ZmanimCalendar is a specialized calendar that can calculate sunrise, 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 {@link ComplexZmanimCalendar} that
+ * extends this class. See documentation for the {@link ComplexZmanimCalendar} and {@link AstronomicalCalendar} for
+ * simple examples on using the API.
+ * Elevation based zmanim (even sunrise and sunset) should not be used lekula without the guidance
+ * of a posek. According to Rabbi Dovid Yehudah Bursztyn in his
+ * Zmanim Kehilchasam, 7th edition chapter 2, section 7 (pages 181-182)
+ * and section 9 (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 besides sunrise and sunset), unless the setting is changed to true in {@link
+ * #setUseElevation(boolean)}. This will impact sunrise and sunset-based zmanim such as {@link #getSunrise()},
+ * {@link #getSunset()}, {@link #getSofZmanShmaGRA()}, alos-based zmanim such as {@link #getSofZmanShmaMGA()}
+ * that are based on a fixed offset of sunrise or sunset and zmanim based on a percentage of the day such as
+ * {@link ComplexZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. Even when set to
+ * true it will not impact zmanim that are a degree-based offset of sunrise and sunset, such as {@link
+ * ComplexZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link ComplexZmanimCalendar#getSofZmanShmaBaalHatanya()} since
+ * these zmanim are not linked to sunrise or sunset times (the calculations are based on the astronomical definition of
+ * sunrise and sunset calculated in a vacuum with the solar radius above the horizon), and are therefore not impacted by the use
+ * of elevation.
+ * For additional information on the halachic impact of elevation on zmanim see:
+ * Note: It is important to read the technical notes on top of the {@link 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. + *
true
will
+ * keep the standard astronomical chatzos calculation, while setting it to false
will use half of
+ * a solar day calculation for chatzos.
+ * @see #isUseAstronomicalChatzos()
+ * @see #setUseAstronomicalChatzos(boolean)
+ * @see #getChatzos()
+ * @see #getSunTransit()
+ * @see #getChatzosAsHalfDay()
+ * @see #useAstronomicalChatzosForOtherZmanim
+ */
+ private useAstronomicalChatzos;
+ /**
+ * Is {@link #getSunTransit() astronomical chatzos} used for {@link #getChatzos()} for enhanced accuracy. For
+ * example as the day is lengthens, the second half of the day is longer than the first and astronomical chatzos
+ * would be a drop earlier than half of the time between sunrise and sunset.
*
- * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis16Point1Degrees()
- * @see #getAlos16Point1Degrees()
+ * @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA()
+ * Sof zman Shma GRA} would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos
+ * zmaniyos would be calculated a a 6th of the time between sunrise and chatzos, as opposed to a 12th of the
+ * time between sunrise and sunset. {@link #getMinchaGedola() mincha gedola} will be calculated as half a
+ * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical
+ * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag
+ * hamincha} would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75
+ * shaaos zmaniyos after sunrise. Etc.
+ *
+ * @return if the use of astronomical chatzos is active.
+ * @see #useAstronomicalChatzos
+ * @see #setUseAstronomicalChatzos(boolean)
+ * @see #getChatzos()
+ * @see #getSunTransit()
+ * @see #getChatzosAsHalfDay()
+ * @see #isUseAstronomicalChatzosForOtherZmanim()
*/
- getSofZmanShmaMGA16Point1Degrees(): Temporal.ZonedDateTime | null;
+ isUseAstronomicalChatzos(): boolean;
/**
- * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
- * opinion of the Magen Avraham (MGA) based
- * on alos being {@link #getAlos18Degrees() 18°} before {@link #getSunrise() sunrise}. This time is 3
- * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn}
- * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°
- * below sunrise or sunset. This returns the time of 3 * {@link #getShaahZmanis18Degrees()} after
- * {@link #getAlos18Degrees() dawn}.
- *
- * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis18Degrees()
- * @see #getAlos18Degrees()
+ * Sets if astronomical chatzos should be used in calculations of other zmanim for enhanced accuracy.
+ * @param useAstronomicalChatzos set to true to use astronomical in chatzos in zmanim calculations.
+ * @see #useAstronomicalChatzos
+ * @see #isUseAstronomicalChatzos()
+ * @see #getChatzos()
+ * @see #getSunTransit()
+ * @see #getChatzosAsHalfDay()
+ * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)
*/
- getSofZmanShmaMGA18Degrees(): Temporal.ZonedDateTime | null;
+ setUseAstronomicalChatzos(useAstronomicalChatzos: boolean): void;
/**
- * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
- * opinion of the Magen Avraham (MGA) based on
- * alos being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 3 {@link
- * #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on the opinion
- * of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to
- * {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link
- * #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to {@link
- * #getSofZmanShmaMGA()} and is repeated here for clarity.
- *
- * @return the Date
of the latest zman krias 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis72Minutes()
- * @see #getAlos72()
- * @see #getSofZmanShmaMGA()
+ * Is astronomical chatzos used for zmanim calculations besides chatzos itself for enhanced
+ * accuracy. The default value of false
will keep the standard start to end of day calculations, while setting
+ * it to true
will use half of a solar day calculation for zmanim.
+ * @see #isUseAstronomicalChatzosForOtherZmanim()
+ * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)
+ * @see #isUseAstronomicalChatzos()
+ * @see #setUseAstronomicalChatzos(boolean)
+ * @see #getChatzos()
*/
- getSofZmanShmaMGA72Minutes(): Temporal.ZonedDateTime | null;
+ private useAstronomicalChatzosForOtherZmanim;
/**
- * This method returns the latest zman krias shema (time to recite Shema in the morning) according
- * to the opinion of the Magen Avraham (MGA) based
- * on alos being {@link #getAlos72Zmanis() 72} minutes zmaniyos, or 1/10th of the day before
- * {@link #getSunrise() sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos}
- * (solar hours) after {@link #getAlos72Zmanis() dawn} based on the opinion of the MGA that the day is calculated
- * from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmaniyos, or 1/10th of the day before
- * {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getTzais72Zmanis() nightfall} of 72 minutes
- * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 3 *
- * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.
+ * Is astronomical chatzos used for zmanim calculations besides chatzos itself for enhanced
+ * accuracy. For example as the day is lengthening (as we approach spring season), the second half of the day is longer than
+ * the first and astronomical chatzos would be a drop earlier than half of the time between sunrise and sunset.
+ * Conversely, the second half of the day would be shorter in the fall season as the days start getting shorter.
*
- * @return the Date
of the latest zman krias 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis72MinutesZmanis()
- * @see #getAlos72Zmanis()
+ * @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA()
+ * Sof zman Shma GRA} would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos
+ * zmaniyos would be calculated a a 6th of the time between sunrise and chatzos, as opposed to a 12th of the
+ * time between sunrise and sunset. {@link #getMinchaGedola() mincha gedola} will be calculated as half a
+ * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical
+ * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag
+ * hamincha} would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75
+ * shaaos zmaniyos after sunrise. Etc.
+ *
+ * @return if the use of astronomical chatzos is active.
+ * @see #useAstronomicalChatzosForOtherZmanim
+ * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)
+ * @see #useAstronomicalChatzos
+ * @see #setUseAstronomicalChatzos(boolean)
*/
- getSofZmanShmaMGA72MinutesZmanis(): Temporal.ZonedDateTime | null;
+ isUseAstronomicalChatzosForOtherZmanim(): boolean;
/**
- * This method returns the latest zman krias shema (time to recite Shema in the morning) according
- * to the opinion of the Magen Avraham (MGA) based on
- * alos being {@link #getAlos90() 90} minutes before {@link #getSunrise() sunrise}. This time is 3
- * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on
- * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to
- * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 3 *
- * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}.
- *
- * @return the Date
of the latest zman krias 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis90Minutes()
- * @see #getAlos90()
+ * Sets if astronomical chatzos should be used in calculations of other zmanim for enhanced accuracy.
+ * @param useAstronomicalChatzosForOtherZmanim set to true to use astronomical in chatzos in zmanim calculations.
+ * @see #useAstronomicalChatzos
+ * @see #isUseAstronomicalChatzos()
*/
- getSofZmanShmaMGA90Minutes(): Temporal.ZonedDateTime | null;
+ setUseAstronomicalChatzosForOtherZmanim(useAstronomicalChatzosForOtherZmanim: boolean): void;
/**
- * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
- * opinion of the Magen Avraham (MGA) based
- * on alos being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise()
- * sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after
- * {@link #getAlos90Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link
- * #getAlos90Zmanis() dawn} of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall}
- * of 90 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis90MinutesZmanis()}
- * after {@link #getAlos90Zmanis() dawn}.
- *
- * @return the Date
of the latest zman krias 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis90MinutesZmanis()
- * @see #getAlos90Zmanis()
- */
- getSofZmanShmaMGA90MinutesZmanis(): Temporal.ZonedDateTime | null;
+ * 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 before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux is
+ * 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}.
+ *
+ * @see #getAlosHashachar()
+ * @see ComplexZmanimCalendar#getAlos16Point1Degrees()
+ * @see ComplexZmanimCalendar#getTzais16Point1Degrees()
+ * @see ComplexZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()
+ * @see ComplexZmanimCalendar#getSofZmanTfilaMGA16Point1Degrees()
+ * @see ComplexZmanimCalendar#getMinchaGedola16Point1Degrees()
+ * @see ComplexZmanimCalendar#getMinchaKetana16Point1Degrees()
+ * @see ComplexZmanimCalendar#getPlagHamincha16Point1Degrees()
+ * @see ComplexZmanimCalendar#getPlagAlos16Point1ToTzaisGeonim7Point083Degrees()
+ * @see ComplexZmanimCalendar#getSofZmanShmaAlos16Point1ToSunset()
+ */
+ protected static readonly ZENITH_16_POINT_1: number;
/**
- * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
- * opinion of the Magen Avraham (MGA) based
- * on alos being {@link #getAlos96() 96} minutes before {@link #getSunrise() sunrise}. This time is 3
- * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on
- * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before
- * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link
- * #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}.
- *
- * @return the Date
of the latest zman krias 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis96Minutes()
- * @see #getAlos96()
- */
- getSofZmanShmaMGA96Minutes(): Temporal.ZonedDateTime | null;
+ * 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 after {@link #getSunset sunset} in Jerusalem around the equinox / equilux, which
+ * is 8.5° below {@link #GEOMETRIC_ZENITH geometric zenith}. The Ohr Meir considers this the time that 3 small stars are visible,
+ * which is later than the required 3 medium stars.
+ *
+ * @see #getTzais()
+ * @see ComplexZmanimCalendar#getTzaisGeonim8Point5Degrees()
+ */
+ protected static readonly ZENITH_8_POINT_5: number;
/**
- * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
- * opinion of the Magen Avraham (MGA) based
- * on alos being {@link #getAlos90Zmanis() 96} minutes zmaniyos before {@link #getSunrise()
- * sunrise}. This time is 3 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after
- * {@link #getAlos96Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link
- * #getAlos96Zmanis() dawn} of 96 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall}
- * of 96 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis96MinutesZmanis()}
- * after {@link #getAlos96Zmanis() dawn}.
- *
- * @return the Date
of the latest zman krias 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis96MinutesZmanis()
- * @see #getAlos96Zmanis()
- */
- getSofZmanShmaMGA96MinutesZmanis(): Temporal.ZonedDateTime | null;
+ * The default Shabbos candle lighting offset is 18 minutes. This can be changed via the
+ * {@link #setCandleLightingOffset(double)} and retrieved by the {@link #getCandleLightingOffset()}.
+ */
+ private candleLightingOffset;
/**
- * This method returns the latest zman krias shema (time to recite Shema in the morning) calculated
- * as 3 hours (regular clock hours and not sha'os zmaniyos) before {@link ZmanimCalendar#getChatzos()}.
- * Generally known as part of the "Komarno" zmanim after Rav Yitzchak Eizik of
- * Komarno, a proponent of this calculation, it actually predates him a lot. It is the opinion of the
- * Shach in the Nekudas Hakesef (Yoreh Deah 184), Rav Moshe Lifshitz in his commentary
- * Lechem Mishneh on Brachos 1:2. It is
- * next brought down about 100 years later by the Yaavetz
- * (in his siddur, Mor Uktziah Orach
- * Chaim 1, Lechem Shamayim, Brachos 1:2
- * and She'elos Yaavetz vol. 1 no. 40),
- * Rav Yitzchak Eizik of Komarno in the Ma'aseh Oreg on Mishnayos Brachos 11:2, Shevus Yaakov, Chasan Sofer and others.
- * See Yisrael Vehazmanim vol. 1 7:3, page 55 -
- * 62. A variant of this calculation {@link #getSofZmanShmaFixedLocal()} uses {@link #getFixedLocalChatzos() fixed
- * local chatzos} for calculating this type of zman.
- *
- * @return the Date
of the latest zman krias 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see ZmanimCalendar#getChatzos()
- * @see #getSofZmanShmaFixedLocal()
- * @see #getSofZmanTfila2HoursBeforeChatzos()
- */
- getSofZmanShma3HoursBeforeChatzos(): Temporal.ZonedDateTime | undefined;
+ * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the
+ * default), or elevation adjusted {@link AstronomicalCalendar#getSunrise()} if it is true. This allows relevant zmanim
+ * in this and extending classes (such as the {@link ComplexZmanimCalendar}) to automatically adjust to the elevation setting.
+ *
+ * @return {@link #getSeaLevelSunrise()} if {@link #isUseElevation()} is false (the default), or elevation adjusted
+ * {@link AstronomicalCalendar#getSunrise()} if it is true.
+ * @see AstronomicalCalendar#getSunrise()
+ */
+ protected getElevationAdjustedSunrise(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
- * opinion of the Magen Avraham (MGA) based
- * on alos being {@link #getAlos120() 120} minutes or 1/6th of the day before {@link #getSunrise() sunrise}.
- * This time is 3 {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120()
- * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120 minutes
- * before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of 3
- * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman that
- * is very much a chumra.
- *
- * @return the Date
of the latest zman krias 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis120Minutes()
- * @see #getAlos120()
- */
- getSofZmanShmaMGA120Minutes(): Temporal.ZonedDateTime | null;
+ * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the default),
+ * or elevation adjusted {@link AstronomicalCalendar#getSunrise()} if it is true. This allows relevant zmanim
+ * in this and extending classes (such as the {@link ComplexZmanimCalendar}) to automatically adjust to the elevation setting.
+ *
+ * @return {@link #getSeaLevelSunset()} if {@link #isUseElevation()} is false (the default), or elevation adjusted
+ * {@link AstronomicalCalendar#getSunset()} if it is true.
+ * @see AstronomicalCalendar#getSunset()
+ */
+ protected getElevationAdjustedSunset(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman krias shema (time to recite Shema in the morning) based
- * on the opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at
- * {@link #getSeaLevelSunset() sea level sunset}. This is the opinion of the \u05D7\u05D9\u05D3\u05D5\u05E9\u05D9
- * \u05D5\u05DB\u05DC\u05DC\u05D5\u05EA \u05D4\u05E8\u05D6\u05F4\u05D4 and the \u05DE\u05E0\u05D5\u05E8\u05D4 \u05D4\u05D8\u05D4\u05D5\u05E8\u05D4 as
- * mentioned by Yisrael Vehazmanim vol 1, sec. 7,
- * ch. 3 no. 16. Three shaos zmaniyos are calculated based on this day and added to {@link
- * #getAlos16Point1Degrees() alos} to reach this time. This time is 3 shaos zmaniyos (solar hours)
- * after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link
- * #getAlos16Point1Degrees() alos 16.1°} to {@link #getSeaLevelSunset() sea level sunset}.
- * Note: Based on this calculation chatzos will not be at midday.
- *
- * @return the Date
of the latest zman krias shema based on this day. 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 the {@link AstronomicalCalendar} documentation.
- * @see #getAlos16Point1Degrees()
- * @see #getSeaLevelSunset()
- */
- getSofZmanShmaAlos16Point1ToSunset(): Temporal.ZonedDateTime | null;
+ * A method that returns tzais (nightfall) when the sun is {@link #ZENITH_8_POINT_5 8.5°} below the
+ * {@link #GEOMETRIC_ZENITH geometric horizon} (90°) after {@link #getSunset sunset}, 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 the {@link #ZENITH_8_POINT_5} constant.
+ *
+ * @see #ZENITH_8_POINT_5
+ *
+ * @return 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 the {@link AstronomicalCalendar} documentation.
+ * @see #ZENITH_8_POINT_5
+ * ComplexZmanimCalendar#getTzaisGeonim8Point5Degrees() that returns an identical time to this generic tzais
+ */
+ getTzais(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the
- * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at
- * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}. 3 shaos zmaniyos are calculated
- * based on this day and added to {@link #getAlos16Point1Degrees() alos} to reach this time. This time is 3
- * shaos zmaniyos (temporal hours) after {@link #getAlos16Point1Degrees() alos 16.1°} based on
- * the opinion that the day is calculated from a {@link #getAlos16Point1Degrees() alos 16.1°} to
- * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}.
- * Note: Based on this calculation chatzos will not be at midday.
- *
- * @return the Date
of the latest zman krias shema based on this calculation. 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 the {@link AstronomicalCalendar}
- * documentation.
- * @see #getAlos16Point1Degrees()
- * @see #getTzaisGeonim7Point083Degrees()
- */
- getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null;
+ * Returns alos (dawn) based on the time when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the
+ * eastern {@link #GEOMETRIC_ZENITH geometric horizon} before {@link #getSunrise sunrise}. 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 before {@link #getSunrise sunrise} in Jerusalem
+ * on the around the equinox /
+ * equilux is 16.1° below {@link #GEOMETRIC_ZENITH}.
+ *
+ * @see #ZENITH_16_POINT_1
+ * @see ComplexZmanimCalendar#getAlos16Point1Degrees()
+ *
+ * @return 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 the {@link AstronomicalCalendar} documentation.
+ */
+ getAlosHashachar(): Temporal.ZonedDateTime | null;
/**
- * From the GRA in Kol Eliyahu on Berachos #173 that states that zman krias shema is calculated as half the
- * time from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getFixedLocalChatzos() fixed local chatzos}.
- * The GRA himself seems to contradict this when he stated that zman krias shema is 1/4 of the day from
- * sunrise to sunset. See Sarah Lamoed #25 in Yisroel Vehazmanim Vol. III page 1016.
- *
- * @return the Date
of the latest zman krias shema based on this calculation. 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 {@link AstronomicalCalendar} documentation.
- * @see #getFixedLocalChatzos()
- *
- * @deprecated As per a conversation Rabbi Yisroel Twerski had with Rabbi Harfenes, this zman published in
- * the Yisrael Vehazmanim was based on a misunderstanding and should not be used. This deprecated method
- * will be removed (likely in KosherJava v3.0) pending confirmation from Rabbi Harfenes.
- */
- getSofZmanShmaKolEliyahu(): Temporal.ZonedDateTime | null;
+ * Method to return alos (dawn) calculated using 72 minutes before {@link #getSunrise() sunrise} or
+ * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} 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.
+ *
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
+ */
+ getAlos72(): Temporal.ZonedDateTime | undefined;
/**
- * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
- * of the Magen Avraham (MGA) based on
- * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise() sunrise}. This time
- * is 4 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link
- * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to
- * nightfall with both being 19.8° below sunrise or sunset. This returns the time of 4 * {@link
- * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.
- *
- * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
- *
- * @see #getShaahZmanis19Point8Degrees()
- * @see #getAlos19Point8Degrees()
- */
- getSofZmanTfilaMGA19Point8Degrees(): Temporal.ZonedDateTime | null;
+ * This method returns chatzos (midday) following most opinions that chatzos is the midpoint
+ * between {@link #getSeaLevelSunrise sea level sunrise} and {@link #getSeaLevelSunset sea 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 to {@link #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.
+ *
+ * @see AstronomicalCalendar#getSunTransit()
+ * @return 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 the {@link AstronomicalCalendar} documentation.
+ */
+ getChatzos(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
- * of the Magen Avraham (MGA) based on
- * alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time
- * is 4 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link
- * #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to
- * nightfall with both being 16.1° below sunrise or sunset. This returns the time of 4 * {@link
- * #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.
- *
- * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
- *
- * @see #getShaahZmanis16Point1Degrees()
- * @see #getAlos16Point1Degrees()
- */
- getSofZmanTfilaMGA16Point1Degrees(): Temporal.ZonedDateTime | null;
+ * 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, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise()
+ * sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()}
+ * elevation setting) to this method will return sof zman krias shema according to the opinion of the
+ * GRA.
+ *
+ * @param startOfDay
+ * the start of day for calculating zman krias shema. This can be sunrise or any alos passed
+ * to this method.
+ * @param endOfDay
+ * the end of day for calculating zman krias shema. This can be sunset or any tzais passed to
+ * this method.
+ * @return 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 the {@link AstronomicalCalendar} documentation.
+ */
+ getSofZmanShma(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
- * of the Magen Avraham (MGA) based on
- * alos being {@link #getAlos18Degrees() 18°} before {@link #getSunrise() sunrise}. This time is 4
- * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn}
- * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°
- * below sunrise or sunset. This returns the time of 4 * {@link #getShaahZmanis18Degrees()} after
- * {@link #getAlos18Degrees() dawn}.
- *
- * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
- *
- * @see #getShaahZmanis18Degrees()
- * @see #getAlos18Degrees()
- */
- getSofZmanTfilaMGA18Degrees(): Temporal.ZonedDateTime | null;
+ * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *
+ * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunrise() sunrise} or
+ * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according
+ * to the GRA.
+ * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level
+ * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}
+ * setting).
+ *
+ * @see #getSofZmanShma(Date, Date)
+ * @see #getShaahZmanisGra()
+ * @see #isUseElevation()
+ * @see ComplexZmanimCalendar#getSofZmanShmaBaalHatanya()
+ * @return 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 the {@link
+ * AstronomicalCalendar} documentation.
+ */
+ getSofZmanShmaGRA(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
- * of the Magen Avraham (MGA) based on
- * alos being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 4
- * {@link #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on
- * the opinion of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before
- * sunrise to {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 4 *
- * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to
- * {@link #getSofZmanTfilaMGA()} and is repeated here for clarity.
- *
- * @return 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis72Minutes()
- * @see #getAlos72()
- * @see #getSofZmanShmaMGA()
- */
- getSofZmanTfilaMGA72Minutes(): Temporal.ZonedDateTime | null;
+ * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *
+ * {@link #getShaahZmanisMGA() shaos zmaniyos} (solar hours) after {@link #getAlos72()}, according to the
+ * Magen Avraham (MGA). The day is calculated
+ * from 72 minutes before {@link #getSeaLevelSunrise() sea level sunrise} to 72 minutes after {@link
+ * #getSeaLevelSunrise sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset()
+ * sunset} (depending on the {@link #isUseElevation()} setting).
+ *
+ * @return 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 the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getSofZmanShma(Date, Date)
+ * @see ComplexZmanimCalendar#getShaahZmanis72Minutes()
+ * @see ComplexZmanimCalendar#getAlos72()
+ * @see ComplexZmanimCalendar#getSofZmanShmaMGA72Minutes() that
+ */
+ getSofZmanShmaMGA(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the
- * Magen Avraham (MGA) based on alos
- * being {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is 4
- * {@link #getShaahZmanis72MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos72Zmanis() dawn}
- * based on the opinion of the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72
- * minutes zmaniyos before sunrise to {@link #getTzais72Zmanis() nightfall} of 72 minutes zmaniyos
- * after sunset. This returns the time of 4 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.
- *
- * @return the Date
of the latest zman krias 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis72MinutesZmanis()
- * @see #getAlos72Zmanis()
- */
- getSofZmanTfilaMGA72MinutesZmanis(): Temporal.ZonedDateTime | null;
+ * 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 the {@link #isUseElevation()} setting) a 72
+ * minute offset from either {@link #getSunset() sunset} or {@link #getSeaLevelSunset() sea level sunset} is used.
+ *
+ * @see ComplexZmanimCalendar#getTzais16Point1Degrees()
+ * @return 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 the
+ * {@link AstronomicalCalendar} documentation.
+ */
+ getTzais72(): Temporal.ZonedDateTime | undefined;
/**
- * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
- * of the Magen Avraham (MGA) based on
- * alos being {@link #getAlos90() 90} minutes before {@link #getSunrise() sunrise}. This time is 4
- * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on
- * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to
- * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 4 *
- * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}.
- *
- * @return 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis90Minutes()
- * @see #getAlos90()
- */
- getSofZmanTfilaMGA90Minutes(): Temporal.ZonedDateTime | null;
+ * A method to return candle lighting time, calculated as {@link #getCandleLightingOffset()} minutes before
+ * {@link #getSeaLevelSunset() sea 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
+ * to {@link #getTimeOffset(Date, long)}.
+ *
+ * @return 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 {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getSeaLevelSunset()
+ * @see #getCandleLightingOffset()
+ * @see #setCandleLightingOffset(double)
+ */
+ getCandleLighting(): Temporal.ZonedDateTime | undefined;
+ /**
+ * 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, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise()
+ * sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()}
+ * elevation setting) to this method will return zman tfilah according to the opinion of the GRA.
+ *
+ * @param startOfDay
+ * the start of day for calculating zman tfilah. This can be sunrise or any alos passed
+ * to this method.
+ * @param endOfDay
+ * the end of day for calculating zman tfilah. This can be sunset or any tzais passed
+ * to this method.
+ * @return 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 the {@link AstronomicalCalendar} documentation.
+ */
+ getSofZmanTfila(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the
- * Magen Avraham (MGA) based on alos
- * being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is
- * 4 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos90Zmanis()
- * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos90Zmanis() dawn}
- * of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall} of 90 minutes
- * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis90MinutesZmanis()} after
- * {@link #getAlos90Zmanis() dawn}.
- *
- * @return the Date
of the latest zman krias 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis90MinutesZmanis()
- * @see #getAlos90Zmanis()
- */
- getSofZmanTfilaMGA90MinutesZmanis(): Temporal.ZonedDateTime | null;
+ * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *
+ * {@link #getShaahZmanisGra() shaos zmaniyos }(solar hours) after {@link #getSunrise() sunrise} or
+ * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according
+ * to the GRA.
+ * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level
+ * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}
+ * setting).
+ *
+ * @see #getSofZmanTfila(Date, Date)
+ * @see #getShaahZmanisGra()
+ * @see ComplexZmanimCalendar#getSofZmanTfilaBaalHatanya()
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
+ */
+ getSofZmanTfilaGRA(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
- * of the Magen Avraham (MGA) based on
- * alos being {@link #getAlos96() 96} minutes before {@link #getSunrise() sunrise}. This time is 4
- * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on
- * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before
- * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 4 *
- * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}.
- *
- * @return 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis96Minutes()
- * @see #getAlos96()
- */
- getSofZmanTfilaMGA96Minutes(): Temporal.ZonedDateTime | null;
+ * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *
+ * {@link #getShaahZmanisMGA() shaos zmaniyos} (solar hours) after {@link #getAlos72()}, according to the
+ * Magen Avraham (MGA). The day is calculated
+ * from 72 minutes before {@link #getSeaLevelSunrise() sea level sunrise} to 72 minutes after {@link
+ * #getSeaLevelSunrise sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset()
+ * sunset} (depending on the {@link #isUseElevation()} setting).
+ *
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
+ * @see #getSofZmanTfila(Date, Date)
+ * @see #getShaahZmanisMGA()
+ * @see #getAlos72()
+ */
+ getSofZmanTfilaMGA(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the
- * Magen Avraham (MGA) based on alos
- * being {@link #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is
- * 4 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos96Zmanis()
- * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos96Zmanis() dawn}
- * of 96 minutes zmaniyos before sunrise to {@link #getTzais96Zmanis() nightfall} of 96 minutes
- * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis96MinutesZmanis()} after
- * {@link #getAlos96Zmanis() dawn}.
+ * 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, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level
+ * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation
+ * setting) to this method will return mincha gedola according to the opinion of the
+ * GRA.
*
- * @return the Date
of the latest zman krias 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis90MinutesZmanis()
- * @see #getAlos90Zmanis()
+ * @param startOfDay
+ * the start of day for calculating Mincha gedola. This can be sunrise or any alos passed
+ * to this method.
+ * @param endOfDay
+ * the end of day for calculating Mincha gedola. This can be sunset or any tzais passed
+ * to this method.
+ * @return 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 the {@link AstronomicalCalendar} documentation.
*/
- getSofZmanTfilaMGA96MinutesZmanis(): Temporal.ZonedDateTime | null;
+ getMinchaGedola(startOfDay?: Temporal.ZonedDateTime | null, endOfDay?: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
- * of the Magen Avraham (MGA) based on
- * alos being {@link #getAlos120() 120} minutes before {@link #getSunrise() sunrise} . This time is 4
- * {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120() dawn}
- * based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120
- * minutes before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of
- * 4 * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman
- * that is very much a chumra.
+ * A generic method for calculating samuch lemincha ketana, / near mincha ketana time that is half
+ * an hour before {@link #getMinchaKetana(Date, Date)} or 9 * 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
+ * samuch lemincha ketana is calculated as 9 of those shaos zmaniyos after the beginning of the day.
+ * For example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea
+ * level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation
+ * setting) to this method will return samuch lemincha ketana according to the opinion of the
+ * GRA.
+ *
+ * @param startOfDay
+ * the start of day for calculating samuch lemincha ketana. This can be sunrise or any alos
+ * passed to to this method.
+ * @param endOfDay
+ * the end of day for calculating samuch lemincha ketana. This can be sunset or any tzais
+ * passed to this method.
+ * @return 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 the {@link AstronomicalCalendar} documentation.
+ *
+ * @see ComplexZmanimCalendar#getSamuchLeMinchaKetanaGRA()
+ * @see ComplexZmanimCalendar#getSamuchLeMinchaKetana16Point1Degrees()
+ * @see ComplexZmanimCalendar#getSamuchLeMinchaKetana72Minutes()
+ */
+ getSamuchLeMinchaKetana(startOfDay: Temporal.ZonedDateTime, endOfDay: Temporal.ZonedDateTime): Temporal.ZonedDateTime | null;
+ /**
+ * 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, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level
+ * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation
+ * setting) to this method will return mincha ketana according to the opinion of the
+ * GRA.
*
- * @return the Date
of the latest zman krias 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis120Minutes()
- * @see #getAlos120()
+ * @param startOfDay
+ * the start of day for calculating Mincha ketana. This can be sunrise or any alos passed to
+ * this method.
+ * @param endOfDay
+ * the end of day for calculating Mincha ketana. This can be sunrise or any alos passed to
+ * this method.
+ * @return 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 the {@link AstronomicalCalendar} documentation.
*/
- getSofZmanTfilaMGA120Minutes(): Temporal.ZonedDateTime | null;
+ getMinchaKetana(startOfDay?: Temporal.ZonedDateTime | null, endOfDay?: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman tfila (time to recite the morning prayers) calculated as 2 hours
- * before {@link ZmanimCalendar#getChatzos()}. This is based on the opinions that calculate
- * sof zman krias shema as {@link #getSofZmanShma3HoursBeforeChatzos()}. This returns the time of 2 hours
- * before {@link ZmanimCalendar#getChatzos()}.
+ * 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, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level
+ * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation
+ * setting) to this method will return plag mincha according to the opinion of the
+ * GRA.
*
- * @return the Date
of the latest zman krias 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see ZmanimCalendar#getChatzos()
- * @see #getSofZmanShma3HoursBeforeChatzos()
+ * @param startOfDay
+ * the start of day for calculating plag. This can be sunrise or any alos passed to this method.
+ * @param endOfDay
+ * the end of day for calculating plag. This can be sunrise or any alos passed to this method.
+ * @return 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 the {@link AstronomicalCalendar} documentation.
*/
- getSofZmanTfila2HoursBeforeChatzos(): Temporal.ZonedDateTime | undefined;
+ getPlagHamincha(startOfDay?: Temporal.ZonedDateTime | null, endOfDay?: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
/**
- * This method returns mincha gedola calculated as 30 minutes after {@link #getChatzos() chatzos}
- * and not 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} after {@link #getChatzos() chatzos} as
- * calculated by {@link #getMinchaGedola}. Some use this time to delay the start of mincha in the winter when
- * 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is less than 30 minutes. See
- * {@link #getMinchaGedolaGreaterThan30()} for a convenience method that returns the later of the 2 calculations. One
- * should not use this time to start mincha before the standard {@link #getMinchaGedola() mincha gedola}.
- * See Shulchan Aruch Orach Chayim 234:1 and
- * the Shaar Hatziyon seif katan ches.
+ * This method returns plag hamincha, that is 10.75 * {@link #getShaahZmanisGra() shaos zmaniyos}
+ * (solar hours) after {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on
+ * the {@link #isUseElevation()} setting), according to the GRA. Plag hamincha is the earliest time that Shabbos can be started.
+ * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level
+ * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}
*
- * @return the Date
of 30 minutes after chatzos. If the calculation can't be computed such as
+ * @see #getPlagHamincha(Date, Date)
+ * @see ComplexZmanimCalendar#getPlagHaminchaBaalHatanya()
+ * @return 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 the
* {@link AstronomicalCalendar} documentation.
- * @see #getMinchaGedola()
- * @see #getMinchaGedolaGreaterThan30()
- */
- getMinchaGedola30Minutes(): Temporal.ZonedDateTime | undefined;
- /**
- * 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. For
- * more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is
- * calculated as 6.5 {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *
- * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}.
- *
- * @see #getAlos72()
- * @see #getMinchaGedola()
- * @see #getMinchaKetana()
- * @see ZmanimCalendar#getMinchaGedola()
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
*/
- getMinchaGedola72Minutes(): Temporal.ZonedDateTime | null;
/**
- * This method returns the time of mincha gedola according to the Magen Avraham with the day starting and
- * ending 16.1° below the horizon. This is the earliest time to pray mincha. For more information on
- * this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is calculated as 6.5
- * {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *
- * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}.
+ * A method that returns a shaah zmanis ({@link #getTemporalHour(Date, Date) 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 from {@link #getSeaLevelSunrise() sea
+ * level sunrise} to {@link #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to
+ * {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} setting). The day is split into 12 equal
+ * parts with each one being a shaah zmanis. This method is similar to {@link #getTemporalHour}, but can
+ * account for elevation.
*
- * @see #getShaahZmanis16Point1Degrees()
- * @see #getMinchaGedola()
- * @see #getMinchaKetana()
- * @return the Date
of the time of mincha gedola. 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
+ * @return 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, {@link Long#MIN_VALUE} will be returned. See
* detailed explanation on top of the {@link AstronomicalCalendar} documentation.
+ * @see #getTemporalHour(Date, Date)
+ * @see #getSeaLevelSunrise()
+ * @see #getSeaLevelSunset()
+ * @see ComplexZmanimCalendar#getShaahZmanisBaalHatanya()
*/
- getMinchaGedola16Point1Degrees(): Temporal.ZonedDateTime | null;
+ getShaahZmanisGra(): Temporal.Duration | undefined;
/**
- * This method returns the time of mincha gedola based on the opinion of Rabbi Yaakov Moshe Hillel as published in the luach
- * of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that mincha gedola is calculated as half a shaah
- * zmanis after chatzos with shaos zmaniyos calculated based on a day starting 72 minutes befoe sunrise
- * {@link #getAlos16Point1Degrees() alos 16.1°} and ending 13.5 minutes after sunset {@link
- * #getTzaisGeonim3Point7Degrees() tzais 3.7°}. Mincha gedola is the earliest time to pray mincha.
- * The later of this time or 30 clock minutes after chatzos is returned. See {@link #getMinchaGedolaGreaterThan30()}
- * (though that calculation is based on mincha gedola GRA).
- * For more information about mincha gedola see the documentation on {@link #getMinchaGedola() mincha gedola}.
- *
- * @return the Date
of the mincha gedola. 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 the {@link AstronomicalCalendar} documentation.
+ * 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 before {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level
+ * sunrise} (depending on the {@link #isUseElevation()} elevation setting) and dusk is 72 minutes after {@link #getSunset
+ * sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} 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 subclass {@link ComplexZmanimCalendar}.
*
- * @see #getAlos16Point1Degrees()
- * @see #getTzaisGeonim3Point7Degrees()
- * @see #getShaahZmanisAlos16Point1ToTzais3Point7()
- * @see #getMinchaGedolaGreaterThan30()
+ * @return 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, {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
+ * {@link AstronomicalCalendar} documentation.
*/
- getMinchaGedolaAhavatShalom(): Temporal.ZonedDateTime | null;
+ getShaahZmanisMGA(): Temporal.Duration | undefined;
/**
- * This is a convenience method that returns the later of {@link #getMinchaGedola()} and
- * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is
- * less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise {@link #getMinchaGedola()}
- * will be returned.
+ * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default
+ * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.
*
- * @return the Date
of the later of {@link #getMinchaGedola()} and {@link #getMinchaGedola30Minutes()}.
- * 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 {@link AstronomicalCalendar} documentation.
+ * @see AstronomicalCalendar#AstronomicalCalendar()
*/
- getMinchaGedolaGreaterThan30(): Temporal.ZonedDateTime | null;
/**
- * This method returns the time of mincha ketana according to the Magen Avraham with the day starting and
- * ending 16.1° below the horizon. This is the preferred earliest time to pray mincha according to the
- * opinion of the Rambam and others. For more information on
- * this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is calculated as 9.5
- * {@link #getTemporalHour() solar hours} after alos. The calculation used is 9.5 *
- * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}.
+ * A constructor that takes a {@link GeoLocation} as a parameter.
*
- * @see #getShaahZmanis16Point1Degrees()
- * @see #getMinchaGedola()
- * @see #getMinchaKetana()
- * @return the Date
of the time of mincha ketana. 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 the {@link AstronomicalCalendar} documentation.
+ * @param location
+ * the location
*/
- getMinchaKetana16Point1Degrees(): Temporal.ZonedDateTime | null;
/**
- * This method returns the time of mincha ketana based on the opinion of Rabbi Yaakov Moshe Hillel as published in the luach
- * of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that mincha ketana is calculated as 2.5 shaos
- * zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos zmaniyos
- * calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and ending at
- * tzais 3.8°. Mincha ketana is the preferred earliest time to pray mincha according to
- * the opinion of the Rambam and others. For more information
- * on this see the documentation on {@link #getMinchaKetana() mincha ketana}.
- *
- * @return the the Date
of the time of mincha ketana. 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 the {@link AstronomicalCalendar} documentation.
+ * A method to get the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea 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.
*
- * @see #getShaahZmanisAlos16Point1ToTzais3Point8()
- * @see #getMinchaGedolaAhavatShalom()
- * @see #getPlagAhavatShalom()
+ * @return Returns the currently set candle lighting offset in minutes.
+ * @see #getCandleLighting()
+ * @see #setCandleLightingOffset(double)
*/
- getMinchaKetanaAhavatShalom(): Temporal.ZonedDateTime | undefined;
+ getCandleLightingOffset(): number;
/**
- * 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. For more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}.
- * This is calculated as 9.5 {@link #getShaahZmanis72Minutes()} after alos. The calculation used is 9.5 *
- * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}.
+ * A method to set the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea 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.
*
- * @see #getShaahZmanis16Point1Degrees()
- * @see #getMinchaGedola()
- * @see #getMinchaKetana()
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
+ * @param candleLightingOffset
+ * The candle lighting offset to set in minutes.
+ * @see #getCandleLighting()
+ * @see #getCandleLightingOffset()
*/
- getMinchaKetana72Minutes(): Temporal.ZonedDateTime | null;
+ setCandleLightingOffset(candleLightingOffset: number): void;
+ getClassName(): string;
/**
- * This method returns the time of plag hamincha according to the Magen Avraham with the day starting 60
- * minutes before sunrise and ending 60 minutes after sunset. This is calculated as 10.75 hours after
- * {@link #getAlos60() dawn}. The formula used is 10.75 {@link #getShaahZmanis60Minutes()} after {@link #getAlos60()}.
+ * 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's {@link #getElevationAdjustedSunset() elevation adjusted sunset} that observes the
+ * {@link #isUseElevation()} settings. The {@link JewishCalendar#getInIsrael()} will be set by the inIsrael parameter.
*
- * @return 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 the
- * {@link AstronomicalCalendar} documentation.
+ * @param currentTime the current time
+ * @param tzais the time of tzais
+ * @param inIsrael whether to use Israel holiday scheme or not
*
- * @see #getShaahZmanis60Minutes()
- * @see #getAlos60()
- * @see #getTzais60()
+ * @return true if melacha is prohibited or false if it is not.
+ *
+ * @see JewishCalendar#isAssurBemelacha()
+ * @see JewishCalendar#hasCandleLighting()
+ * @see JewishCalendar#setInIsrael(boolean)
*/
- getPlagHamincha60Minutes(): Temporal.ZonedDateTime | null;
+ isAssurBemlacha(currentTime: Temporal.ZonedDateTime, tzais: Temporal.ZonedDateTime, inIsrael: boolean): boolean;
+ /**
+ * 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 as {@link #getPlagHamincha(Date, Date)} and cuts down on
+ * code replication. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link
+ * #getSeaLevelSunrise() sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the
+ * {@link #isUseElevation()} elevation setting) and 10.75 hours to this method will return plag mincha
+ * according to the opinion of the GRA.
+ *
+ * @param startOfDay
+ * the start of day for calculating the zman. This can be sunrise or any alos passed
+ * to this method.
+ * @param endOfDay
+ * the end of day for calculating the zman. This can be sunrise or any alos passed to
+ * this method.
+ * @param hours
+ * the number of shaahos zmaniyos (temporal hours) to offset from the start of day
+ * @return 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 the {@link
+ * AstronomicalCalendar} documentation.
+ */
+ getShaahZmanisBasedZman(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null, hours: number): Temporal.ZonedDateTime | null;
+ /**
+ * A utility method that returns the percentage of a shaah zmanis after sunset (or before sunrise) for a given degree
+ * offset. For the equilux where there
+ * is a 720-minute day, passing 16.1° for the location of Jerusalem will return about 1.2. This will work for any location
+ * or date, but will typically only be of interest at the equinox/equilux to calculate the percentage of a shaah zmanis
+ * for those who want to use the Minchas Cohen in Ma'amar 2:4
+ * and the Pri Chadash who calculate tzais as a percentage
+ * of the day after sunset. While the Minchas Cohen only applies this to 72 minutes or a 1/10 of the day around the world (based
+ * on the equinox / equilux in Israel), this method allows calculations for any degrees level for any location.
+ *
+ * @param degrees
+ * the number of degrees below the horizon after sunset.
+ * @param sunset
+ * if true
the calculation should be degrees after sunset, or if false
, degrees before sunrise.
+ * @return the double
percentage of a sha'ah zmanis for a given set of degrees below the astronomical horizon
+ * for the current calendar. If the calculation can't be computed a {@link Double#MIN_VALUE} will be returned. See detailed
+ * explanation on top of the page.
+ */
+ getPercentOfShaahZmanisFromDegrees(degrees: number, sunset: boolean): number | null;
+}
+/**
+ * This class extends ZmanimCalendar and provides many more zmanim than available in the ZmanimCalendar. The basis + * for most zmanim in this class are from the sefer Yisroel + * Vehazmanim by Rabbi Yisrael Dovid Harfenes. + * As an example of the number of different zmanim made available by this class, there are methods to return 18 + * different calculations for alos (dawn), 18 for plag hamincha and 29 for tzais available in this + * API. The real power of this API is the ease in calculating zmanim that are not part of the library. The methods for + * zmanim calculations not present in this class or it's superclass {@link ZmanimCalendar} are contained in the + * {@link AstronomicalCalendar}, the base class of the calendars in our API since they are generic methods for calculating + * time based on degrees or time before or after {@link #getSunrise sunrise} and {@link #getSunset sunset} and are of interest + * for calculation beyond zmanim calculations. Here are some examples. + *
First create the Calendar for the location you would like to calculate: + * + *
+ * String locationName = "Lakewood, NJ"; + * double latitude = 40.0828; // Lakewood, NJ + * double longitude = -74.2094; // Lakewood, NJ + * double elevation = 20; // optional elevation correction in Meters + * // the String parameter in getTimeZone() has to be a valid timezone listed in + * // {@link java.util.TimeZone#getAvailableIDs()} + * TimeZone timeZone = TimeZone.getTimeZone("America/New_York"); + * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone); + * ComplexZmanimCalendar czc = new ComplexZmanimCalendar(location); + * // Optionally set the date or it will default to today's date + * czc.getCalendar().set(Calendar.MONTH, Calendar.FEBRUARY); + * czc.getCalendar().set(Calendar.DAY_OF_MONTH, 8);+ *
+ * Note: For locations such as Israel where the beginning and end of daylight savings time can fluctuate from
+ * year to year, if your version of Java does not have an up to date timezone database, create a
+ * {@link java.util.SimpleTimeZone} with the known start and end of DST.
+ * To get alos calculated as 14° below the horizon (as calculated in the calendars published in Montreal),
+ * add {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90) to the 14° offset to get the desired time:
+ *
+ *
+ * Date alos14 = czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 14);+ *
+ * To get mincha gedola calculated based on the Magen Avraham (MGA) using a shaah zmanis based on the day starting + * 16.1° below the horizon (and ending 16.1° after sunset) the following calculation can be used: + * + *
+ * Date minchaGedola = czc.getTimeOffset(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees() * 6.5);+ *
+ * or even simpler using the included convenience methods + *
+ * Date minchaGedola = czc.getMinchaGedola(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees());+ *
+ * A little more complex example would be calculating zmanim that rely on a shaah zmanis that is
+ * not present in this library. While a drop more complex, it is still rather easy. An example would be to calculate
+ * the Trumas Hadeshen's alos to
+ * tzais based plag hamincha as calculated in the Machzikei Hadass calendar in Manchester, England.
+ * A number of this calendar's zmanim are calculated based on a day starting at alos of 12° before
+ * sunrise and ending at tzais of 7.083° after sunset. Be aware that since the alos and tzais
+ * do not use identical degree-based offsets, this leads to chatzos being at a time other than the
+ * {@link #getSunTransit() solar transit} (solar midday). To calculate this zman, use the following steps. Note
+ * that plag hamincha is 10.75 hours after the start of the day, and the following steps are all that it takes.
+ *
+ *
+ * Date plag = czc.getPlagHamincha(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12), + * czc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));+ *
+ * Something a drop more challenging, but still simple, would be calculating a zman using the same "complex" + * offset day used in the above mentioned Manchester calendar, but for a shaos zmaniyos based zman not + * supported by this library, such as calculating the point that one should be makpid + * not to eat on erev Shabbos or erev Yom Tov. This is 9 shaos zmaniyos into the day. + *
+ * long shaahZmanis = czc.getTemporalHour(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12), + * czc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083)); + * Date sofZmanAchila = getTimeOffset(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12), + * shaahZmanis * 9);+ *
+ * Calculating this sof zman achila according to the GRA + * is simplicity itself. + *
+ * Date sofZamnAchila = czc.getTimeOffset(czc.getSunrise(), czc.getShaahZmanisGra() * 9);+ * + *
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 the
- * {@link AstronomicalCalendar} documentation.
+ * The zenith of 3.7° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating tzais (nightfall) based on the opinion of the Geonim that tzais is the
+ * time it takes to walk 3/4 of a Mil at 18 minutes a Mil, or 13.5 minutes after sunset. The sun
+ * is 3.7° below {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem around the equinox / equilux.
*
- * @see #getShaahZmanis72Minutes()
+ * @see #getTzaisGeonim3Point7Degrees()
*/
- getPlagHamincha72Minutes(): Temporal.ZonedDateTime | null;
+ protected static readonly ZENITH_3_POINT_7: number;
/**
- * This method should be used lechumra only and returns the time of plag hamincha according to the
- * Magen Avraham with the day starting 90 minutes before sunrise and ending 90 minutes after sunset. This is calculated
- * as 10.75 hours after {@link #getAlos90() dawn}. The formula used is 10.75 {@link #getShaahZmanis90Minutes()} after
- * {@link #getAlos90()}. Since plag by this calculation can occur after sunset, it should only be used
- * lechumra.
- *
- * @deprecated This method should be used lechumra only since it returns a very late time, and if used
- * lekula can result in chillul Shabbos etc. There is no current plan to remove this
- * method from the API, and this deprecation is intended to alert developers of the danger of using it.
- *
- * @return 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 the
- * {@link AstronomicalCalendar} documentation.
+ * The zenith of 3.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating tzais (nightfall) based on the opinion of the Geonim that tzais is the
+ * time it takes to walk 3/4 of a Mil at 18 minutes a Mil, or 13.5 minutes after sunset. The sun
+ * is 3.8° below {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem around the equinox / equilux.
*
- * @see #getShaahZmanis90Minutes()
+ * @see #getTzaisGeonim3Point8Degrees()
*/
- getPlagHamincha90Minutes(): Temporal.ZonedDateTime | null;
+ protected static readonly ZENITH_3_POINT_8: number;
/**
- * This method should be used lechumra only and returns the time of plag hamincha according to the Magen
- * Avraham with the day starting 96 minutes before sunrise and ending 96 minutes after sunset. This is calculated as 10.75
- * hours after {@link #getAlos96() dawn}. The formula used is 10.75 {@link #getShaahZmanis96Minutes()} after
- * {@link #getAlos96()}. Since plag by this calculation can occur after sunset, it should only be used
- * lechumra.
- *
- * @deprecated This method should be used lechumra only since it returns a very late time, and if used
- * lekula can result in chillul Shabbos etc. There is no current plan to remove this
- * method from the API, and this deprecation is intended to alert developers of the danger of using it.
+ * The zenith of 5.95° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating tzais (nightfall) according to some opinions. This calculation is based on the position of
+ * the sun 24 minutes after sunset in Jerusalem around the equinox / equilux,
+ * which calculates to 5.95° below {@link #GEOMETRIC_ZENITH geometric zenith}.
*
- * @return 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 the
- * {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanis96Minutes()
+ * @see #getTzaisGeonim5Point95Degrees()
*/
- getPlagHamincha96Minutes(): Temporal.ZonedDateTime | null;
- /**
- * This method should be used lechumra only and returns the time of plag hamincha. This is calculated
- * as 10.75 hours after {@link #getAlos96Zmanis() dawn}. The formula used is 10.75 * {@link
- * #getShaahZmanis96MinutesZmanis()} after {@link #getAlos96Zmanis() dawn}. Since plag by this calculation can
- * occur after sunset, it should only be used lechumra.
- *
- * @deprecated This method should be used lechumra only since it returns a very late time, and if used
- * lekula can result in chillul Shabbos etc. There is no current plan to remove this
- * method from the API, and this deprecation is intended to alert developers of the danger of using it.
- *
- * @return 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 the
- * {@link AstronomicalCalendar} documentation.
- */
- getPlagHamincha96MinutesZmanis(): Temporal.ZonedDateTime | null;
- /**
- * This method should be used lechumra only and returns the time of plag hamincha. This is calculated
- * as 10.75 hours after {@link #getAlos90Zmanis() dawn}. The formula used is 10.75 * {@link
- * #getShaahZmanis90MinutesZmanis()} after {@link #getAlos90Zmanis() dawn}. Since plag by this calculation can
- * occur after sunset, it should only be used lechumra.
- *
- * @deprecated This method should be used lechumra only since it returns a very late time, and if used
- * lekula can result in chillul Shabbos etc. There is no current plan to remove this
- * method from the API, and this deprecation is intended to alert developers of the danger of using it.
- *
- * @return 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 the
- * {@link AstronomicalCalendar} documentation.
- */
- getPlagHamincha90MinutesZmanis(): Temporal.ZonedDateTime | null;
+ protected static readonly ZENITH_5_POINT_95: number;
/**
- * This method should be used lechumra only and returns the time of plag hamincha. This is calculated as
- * 10.75 hours after {@link #getAlos72Zmanis()}. The formula used is 10.75 * {@link #getShaahZmanis72MinutesZmanis()} after
- * {@link #getAlos72Zmanis() dawn}. Since plag by this calculation can occur after sunset, it should only be used
- * lechumra.
- *
- * @deprecated This method should be used lechumra only since it returns a very late time, and if used
- * lekula can result in chillul Shabbos etc. There is no current plan to remove this
- * method from the API, and this deprecation is intended to alert developers of the danger of using it.
+ * The zenith of 7.083° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This is often referred to as
+ * 7°5' or 7° and 5 minutes. This calculation is used for calculating alos (dawn) and
+ * tzais (nightfall) according to some opinions. This calculation is based on observation of 3 medium sized
+ * stars by Dr. Baruch Cohen in his calendar published in in 1899 in Strasbourg, France. This calculates to
+ * 7.0833333° below {@link #GEOMETRIC_ZENITH geometric zenith}. The Sh"Ut
+ * Melamed Leho'il in Orach Chaim 30 agreed to this zman, as did the Sh"Ut Bnei Tziyon, Tenuvas Sadeh and
+ * it is very close to the time of the Mekor Chesed of the Sefer chasidim.
+ * It is close to the position of the sun 30 minutes after sunset in Jerusalem around the equinox / equilux, but not
+ * Exactly. The actual position of the sun 30 minutes after sunset in Jerusalem at the equilux is 7.205° and
+ * 7.199° at the equinox. See Hazmanim Bahalacha vol 2, pages 520-521 for details.
+ * @todo Hyperlink the proper sources.
*
- * @return 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 the
- * {@link AstronomicalCalendar} documentation.
+ * @see #getTzaisGeonim7Point083Degrees()
+ * @see #getBainHashmashosRT13Point5MinutesBefore7Point083Degrees()
*/
- getPlagHamincha72MinutesZmanis(): Temporal.ZonedDateTime | null;
+ protected static readonly ZENITH_7_POINT_083: number;
/**
- * This method should be used lechumra only and returns the time of plag hamincha based on the
- * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link
- * #getTzais16Point1Degrees() tzais 16.1°}. This is calculated as 10.75 hours zmaniyos
- * after {@link #getAlos16Point1Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis16Point1Degrees()}
- * after {@link #getAlos16Point1Degrees()}. Since plag by this calculation can occur after sunset, it
- * should only be used lechumra.
- *
- * @deprecated This method should be used lechumra only since it returns a very late time, and if used
- * lekula can result in chillul Shabbos etc. There is no current plan to remove this
- * method from the API, and this deprecation is intended to alert developers of the danger of using it.
- *
- * @return the Date
of the time of plag hamincha. 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 the {@link AstronomicalCalendar} documentation.
+ * The zenith of 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating misheyakir according to some opinions. This calculation is based on the position of the sun
+ * 45 minutes before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux which
+ * calculates to 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith}.
*
- * @see #getShaahZmanis16Point1Degrees()
+ * @see #getMisheyakir10Point2Degrees()
*/
- getPlagHamincha16Point1Degrees(): Temporal.ZonedDateTime | null;
+ protected static readonly ZENITH_10_POINT_2: number;
/**
- * This method should be used lechumra only and returns the time of plag hamincha based on the
- * opinion that the day starts at {@link #getAlos19Point8Degrees() alos 19.8°} and ends at {@link
- * #getTzais19Point8Degrees() tzais 19.8°}. This is calculated as 10.75 hours zmaniyos
- * after {@link #getAlos19Point8Degrees() dawn}. The formula used is 10.75 * {@link
- * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees()}. Since plag by this
- * calculation can occur after sunset, it should only be used lechumra.
- *
- * @deprecated This method should be used lechumra only since it returns a very late time, and if used
- * lekula can result in chillul Shabbos etc. There is no current plan to remove this
- * method from the API, and this deprecation is intended to alert developers of the danger of using it.
- *
- * @return the Date
of the time of plag hamincha. 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 the {@link AstronomicalCalendar} documentation.
+ * The zenith of 11° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating misheyakir according to some opinions. This calculation is based on the position of the sun
+ * 48 minutes before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux, which
+ * calculates to 11° below {@link #GEOMETRIC_ZENITH geometric zenith}.
*
- * @see #getShaahZmanis19Point8Degrees()
+ * @see #getMisheyakir11Degrees()
*/
- getPlagHamincha19Point8Degrees(): Temporal.ZonedDateTime | null;
+ protected static readonly ZENITH_11_DEGREES: number;
/**
- * This method should be used lechumra only and returns the time of plag hamincha based on the
- * opinion that the day starts at {@link #getAlos26Degrees() alos 26°} and ends at {@link
- * #getTzais26Degrees() tzais 26°}. This is calculated as 10.75 hours zmaniyos after {@link
- * #getAlos26Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis26Degrees()} after {@link
- * #getAlos26Degrees()}. Since the zman based on an extremely early alos and a very late
- * tzais, it should only be used lechumra.
- *
- * @deprecated This method should be used lechumra only since it returns a very late time, and if used
- * lekula can result in chillul Shabbos etc. There is no current plan to remove this
- * method from the API, and this deprecation is intended to alert developers of the danger of using it.
- *
- * @return the Date
of the time of plag hamincha. 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 the {@link AstronomicalCalendar} documentation.
+ * The zenith of 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating misheyakir according to some opinions. This calculation is based on the position of the sun
+ * 52 minutes before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux, which
+ * calculates to 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith}.
*
- * @see #getShaahZmanis26Degrees()
- * @see #getPlagHamincha120Minutes()
+ * @see #getMisheyakir11Point5Degrees()
*/
- getPlagHamincha26Degrees(): Temporal.ZonedDateTime | null;
+ protected static readonly ZENITH_11_POINT_5: number;
/**
- * This method should be used lechumra only and returns the time of plag hamincha based on the
- * opinion that the day starts at {@link #getAlos18Degrees() alos 18°} and ends at {@link
- * #getTzais18Degrees() tzais 18°}. This is calculated as 10.75 hours zmaniyos after {@link
- * #getAlos18Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis18Degrees()} after {@link
- * #getAlos18Degrees()}. Since plag by this calculation can occur after sunset, it should only be used
- * lechumra.
- *
- * @deprecated This method should be used lechumra only since it returns a very late time, and if used
- * lekula can result in chillul Shabbos etc. There is no current plan to remove this
- * method from the API, and this deprecation is intended to alert developers of the danger of using it.
+ * The zenith of 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating Rabbeinu Tam's bain hashmashos according to some opinions.
+ * NOTE: See comments on {@link #getBainHashmashosRT13Point24Degrees} for additional details about the degrees.
*
- * @return the Date
of the time of plag hamincha. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getBainHashmashosRT13Point24Degrees
*
- * @see #getShaahZmanis18Degrees()
*/
- getPlagHamincha18Degrees(): Temporal.ZonedDateTime | null;
+ protected static readonly ZENITH_13_POINT_24: number;
/**
- * This method should be used lechumra only and returns the time of plag hamincha based on the opinion
- * that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getSunset() sunset}.
- * 10.75 shaos zmaniyos are calculated based on this day and added to {@link #getAlos16Point1Degrees()
- * alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal hours) after {@link
- * #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link #getAlos16Point1Degrees()
- * dawn} of 16.1 degrees before sunrise to {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 10.75 *
- * the calculated shaah zmanis after {@link #getAlos16Point1Degrees() dawn}. Since plag by this
- * calculation can occur after sunset, it should only be used lechumra.
- *
- * @deprecated This method should be used lechumra only since it returns a very late time, and if used
- * lekula can result in chillul Shabbos etc. There is no current plan to remove this
- * method from the API, and this deprecation is intended to alert developers of the danger of using it.
- *
- * @return the Date
of the plag. 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 the {@link AstronomicalCalendar} documentation.
+ * The zenith of 19° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating alos according to some opinions.
*
- * @see #getAlos16Point1Degrees()
- * @see #getSeaLevelSunset()
+ * @see #getAlos19Degrees()
+ * @see #ZENITH_19_POINT_8
*/
- getPlagAlosToSunset(): Temporal.ZonedDateTime | null;
+ protected static readonly ZENITH_19_DEGREES: number;
/**
- * This method returns the time of plag hamincha based on the opinion that the day starts at
- * {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getTzaisGeonim7Point083Degrees()
- * tzais}. 10.75 shaos zmaniyos are calculated based on this day and added to {@link
- * #getAlos16Point1Degrees() alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal
- * hours) after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a
- * {@link #getAlos16Point1Degrees() dawn} of 16.1 degrees before sunrise to
- * {@link #getTzaisGeonim7Point083Degrees() tzais} . This returns the time of 10.75 * the calculated
- * shaah zmanis after {@link #getAlos16Point1Degrees() dawn}.
- *
- * @return the Date
of the plag. 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 the {@link AstronomicalCalendar} documentation.
+ * The zenith of 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating alos (dawn) and tzais (nightfall) according to some opinions. 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 {@link #GEOMETRIC_ZENITH geometric zenith}.
*
- * @see #getAlos16Point1Degrees()
- * @see #getTzaisGeonim7Point083Degrees()
+ * @see #getTzais19Point8Degrees()
+ * @see #getAlos19Point8Degrees()
+ * @see #getAlos90()
+ * @see #getTzais90()
+ * @see #ZENITH_19_DEGREES
*/
- getPlagAlos16Point1ToTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null;
+ protected static readonly ZENITH_19_POINT_8: number;
/**
- * This method returns the time of plag hamincha (the earliest time that Shabbos can be started) based on the
- * opinion of Rabbi Yaakov Moshe Hillel as published in
- * the luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that that plag hamincha is calculated
- * as 1.25 shaos zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos
- * zmaniyos calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and
- * ending at tzais 3.8°.
- *
- * @return the Date
of the plag. 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 the {@link AstronomicalCalendar} documentation.
+ * The zenith of 26° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating alos (dawn) and tzais (nightfall) according to some opinions. This calculation is
+ * based on the position of the sun {@link #getAlos120() 120 minutes} after sunset in Jerusalem oaround the equinox / equilux which
+ * calculates to 26° below {@link #GEOMETRIC_ZENITH geometric zenith}. Since the level of darkness when the sun is
+ * 26° and at a point when the level of darkness is long past the 18° point where the darkest point is reached,
+ * it should only be used lechumra such as delaying the start of nighttime mitzvos or avoiding eating
+ * this early on a fast day.
*
- * @see #getShaahZmanisAlos16Point1ToTzais3Point8()
- * @see #getMinchaGedolaAhavatShalom()
- * @see #getMinchaKetanaAhavatShalom()
+ * @see #getAlos26Degrees()
+ * @see #getTzais26Degrees()
+ * @see #getAlos120()
+ * @see #getTzais120()
*/
- getPlagAhavatShalom(): Temporal.ZonedDateTime | undefined;
+ protected static readonly ZENITH_26_DEGREES: number;
/**
- * Method to return the beginning of bain hashmashos of Rabbeinu Tam calculated when the sun is
- * {@link #ZENITH_13_POINT_24 13.24°} below the western {@link #GEOMETRIC_ZENITH geometric horizon} (90°)
- * after sunset. This calculation is based on the same calculation of {@link #getBainHashmashosRT58Point5Minutes()
- * bain hashmashos Rabbeinu Tam 58.5 minutes} but uses a degree-based calculation instead of 58.5 exact
- * minutes. This calculation is based on the position of the sun 58.5 minutes after sunset in Jerusalem tzais (nightfall) according to some opinions. This calculation is based on the position of
+ * the sun {@link #getTzaisGeonim4Point37Degrees() 16 7/8 minutes} after sunset (3/4 of a 22.5-minute Mil)
+ * in Jerusalem around the equinox / equilux,
- * which calculates to 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith}.
- * NOTE: As per Yisrael Vehazmanim Vol. III page 1028, No. 50, a dip of slightly less than 13° should be used.
- * Calculations show that the proper dip to be 13.2456° (truncated to 13.24 that provides about 1.5 second
- * earlier (lechumra) time) below the horizon at that time. This makes a difference of 1 minute and 10
- * seconds in Jerusalem during the Equinox, and 1 minute 29 seconds during the solstice as compared to the proper
- * 13.24° versus 13°. For NY during the solstice, the difference is 1 minute 56 seconds.
- * @todo recalculate the above based on equilux/equinox calculations.
- *
- * @return the Date
of the sun being 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith}
- * (90°). 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 the
- * {@link AstronomicalCalendar} documentation.
+ * which calculates to 4.37° below {@link #GEOMETRIC_ZENITH geometric zenith}.
*
- * @see #ZENITH_13_POINT_24
- * @see #getBainHashmashosRT58Point5Minutes()
+ * @see #getTzaisGeonim4Point37Degrees()
*/
- getBainHashmashosRT13Point24Degrees(): Temporal.ZonedDateTime | null;
+ protected static readonly ZENITH_4_POINT_37: number;
/**
- * This method returns the beginning of Bain hashmashos of Rabbeinu Tam calculated as a 58.5
- * minute offset after sunset. bain hashmashos is 3/4 of a Mil before tzais or 3 1/4
- * Mil after sunset. With a Mil calculated as 18 minutes, 3.25 * 18 = 58.5 minutes.
- *
- * @return the Date
of 58.5 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 the {@link AstronomicalCalendar}
- * documentation.
+ * The zenith of 4.61° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating tzais (nightfall) according to some opinions. This calculation is based on the position of
+ * the sun {@link #getTzaisGeonim4Point37Degrees() 18 minutes} after sunset (3/4 of a 24-minute Mil) in
+ * Jerusalem around the equinox
+ * / equilux, which calculates to 4.61° below {@link #GEOMETRIC_ZENITH geometric zenith}.
+ * @todo add documentation links
*
+ * @see #getTzaisGeonim4Point61Degrees()
*/
- getBainHashmashosRT58Point5Minutes(): Temporal.ZonedDateTime | undefined;
+ protected static readonly ZENITH_4_POINT_61: number;
/**
- * This method returns the beginning of bain hashmashos based on the calculation of 13.5 minutes (3/4 of an
- * 18-minute Mil) before shkiah calculated as {@link #getTzaisGeonim7Point083Degrees() 7.083°}.
+ * The zenith of 4.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
+ * @todo Add more documentation.
+ * @see #getTzaisGeonim4Point8Degrees()
+ */
+ protected static readonly ZENITH_4_POINT_8: number;
+ /**
+ * The zenith of 3.65° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating tzais (nightfall) according to some opinions. This calculation is based on the position of
+ * the sun {@link #getTzaisGeonim3Point65Degrees() 13.5 minutes} after sunset (3/4 of an 18-minute Mil)
+ * in Jerusalem around the equinox / equilux which
+ * calculates to 3.65° below {@link #GEOMETRIC_ZENITH geometric zenith}.
*
- * @return the Date
of the bain hashmashos of Rabbeinu Tam in this calculation. 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 the {@link AstronomicalCalendar}
- * documentation.
- * @see #getTzaisGeonim7Point083Degrees()
+ * @see #getTzaisGeonim3Point65Degrees()
*/
- getBainHashmashosRT13Point5MinutesBefore7Point083Degrees(): Temporal.ZonedDateTime | undefined;
+ protected static readonly ZENITH_3_POINT_65: number;
/**
- * This method returns the beginning of bain hashmashos of Rabbeinu Tam calculated according to the
- * opinion of the Divrei Yosef (see Yisrael Vehazmanim) calculated 5/18th (27.77%) of the time between
- * alos (calculated as 19.8° before sunrise) and sunrise. This is added to sunset to arrive at the time
- * for bain hashmashos of Rabbeinu Tam.
+ * The zenith of 3.676° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
+ * @todo Add more documentation.
+ */
+ protected static readonly ZENITH_3_POINT_676: number;
+ /**
+ * The zenith of 5.88° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
+ * @todo Add more documentation.
+ */
+ protected static readonly ZENITH_5_POINT_88: number;
+ /**
+ * The zenith of 1.583° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating netz amiti (sunrise) and shkiah amiti (sunset) based on the opinion of the
+ * Baal Hatanya.
*
- * @return the Date
of bain hashmashos of Rabbeinu Tam for this calculation. 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 the {@link AstronomicalCalendar}
- * documentation.
+ * @see #getSunriseBaalHatanya()
+ * @see #getSunsetBaalHatanya()
*/
- getBainHashmashosRT2Stars(): Temporal.ZonedDateTime | null | undefined;
+ protected static readonly ZENITH_1_POINT_583: number;
/**
- * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 18 minutes
- * or 3/4 of a 24-minute Mil before sunset. According to the Yereim, bain hashmashos starts 3/4
- * of a Mil before sunset and tzais or nightfall starts at sunset.
+ * The zenith of 16.9° below geometric zenith (90°). This calculation is used for determining alos
+ * (dawn) based on the opinion of the Baal Hatanya. It 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 {@link #getSunriseBaalHatanya netz amiti (sunrise)} in Jerusalem around the equinox / equilux is
+ * 16.9° below {@link #GEOMETRIC_ZENITH geometric zenith}.
*
- * @return the Date
of 18 minutes before 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 the {@link AstronomicalCalendar}
- * documentation.
- * @see #getBainHashmashosYereim3Point05Degrees()
+ * @see #getAlosBaalHatanya()
*/
- getBainHashmashosYereim18Minutes(): Temporal.ZonedDateTime | undefined;
+ protected static readonly ZENITH_16_POINT_9: number;
/**
- * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's
- * position 3.05° above the horizon around the equinox / equilux,
- * its position 18 minutes or 3/4 of an 24-minute mil before sunset. According to the Yereim, bain
- * hashmashos starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset.
- * Note that lechumra (of about 14 seconds) a refraction value of 0.5166° as opposed to the traditional
- * 0.566° is used. This is more inline with the actual refraction in Eretz Yisrael and is brought down
- * by Rabbi
- * Yedidya Manet in his Zmanei Halacha
- * Lema’aseh (p. 11). That is the first source that I am aware of that calculates degree-based Yereim
- * zmanim. The 0.5166° refraction is also used by the Luach Itim
- * Lebinah. Calculating the Yereim's bain hashmashos using 18-minute based degrees is also suggested
- * in the upcoming 8th edition of the zmanim Kehilchasam. For more details, see the article The Yereim’s Bein Hashmashos.
+ * The zenith of 16.9° below geometric zenith (90°). This calculation is used for determining alos
+ * (dawn) based on the opinion of the Baal Hatanya. It 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 {@link #getSunriseBaalHatanya netz amiti (sunrise)} in Jerusalem around the equinox / equilux is
+ * 16.9° below {@link #GEOMETRIC_ZENITH geometric zenith}.
*
- * @todo recalculate based on equinox/equilux
- * @return the Date
of the sun's position 3.05° minutes before 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 the
- * {@link AstronomicalCalendar} documentation.
+ * @see #getAlosBaalHatanya()
+ */
+ protected static readonly ZENITH_6_DEGREES: number;
+ /**
+ * The zenith of 6.45° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating tzais (nightfall) according to some opinions. This is based on the calculations of Rabbi Yechiel Michel Tucazinsky of the position of
+ * the sun no later than {@link #getTzaisGeonim6Point45Degrees() 31 minutes} after sunset in Jerusalem, and at the
+ * height of the summer solstice, this zman is 28 minutes after shkiah. This computes to 6.45°
+ * below {@link #GEOMETRIC_ZENITH geometric zenith}. This calculation is found in the Birur Halacha Yoreh Deah 262 it the commonly
+ * used zman in Israel. It should be noted that this differs from the 6.1°/6.2° calculation for
+ * Rabbi Tucazinsky's time as calculated by the Hazmanim Bahalacha Vol II chapter 50:7 (page 515).
*
- * @see #ZENITH_MINUS_3_POINT_05
- * @see #getBainHashmashosYereim18Minutes()
- * @see #getBainHashmashosYereim2Point8Degrees()
- * @see #getBainHashmashosYereim2Point1Degrees()
+ * @see #getTzaisGeonim6Point45Degrees()
*/
- getBainHashmashosYereim3Point05Degrees(): Temporal.ZonedDateTime | null;
+ protected static readonly ZENITH_6_POINT_45: number;
/**
- * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 16.875
- * minutes or 3/4 of a 22.5-minute Mil before sunset. According to the Yereim, bain hashmashos
- * starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset.
+ * The zenith of 7.65° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating misheyakir according to some opinions.
*
- * @return the Date
of 16.875 minutes before 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 the {@link AstronomicalCalendar}
- * documentation.
+ * @see #getMisheyakir7Point65Degrees()
+ */
+ protected static readonly ZENITH_7_POINT_65: number;
+ /**
+ * The zenith of 7.67° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating tzais according to some opinions.
*
- * @see #getBainHashmashosYereim2Point8Degrees()
+ * @see #getTzaisGeonim7Point67Degrees()
*/
- getBainHashmashosYereim16Point875Minutes(): Temporal.ZonedDateTime | undefined;
+ protected static readonly ZENITH_7_POINT_67: number;
/**
- * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's
- * position 2.8° above the horizon around the equinox / equilux,
- * its position 16.875 minutes or 3/4 of an 18-minute Mil before sunset. According to the Yereim, bain
- * hashmashos starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset.
- * Details, including how the degrees were calculated can be seen in the documentation of
- * {@link #getBainHashmashosYereim3Point05Degrees()}.
+ * The zenith of 9.3° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating tzais (nightfall) according to some opinions.
*
- * @return the Date
of the sun's position 2.8° minutes before 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 the
- * {@link AstronomicalCalendar} documentation.
+ * @see #getTzaisGeonim9Point3Degrees()
+ */
+ protected static readonly ZENITH_9_POINT_3: number;
+ /**
+ * The zenith of 9.5° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating misheyakir according to some opinions.
*
- * @see #ZENITH_MINUS_2_POINT_8
- * @see #getBainHashmashosYereim16Point875Minutes()
- * @see #getBainHashmashosYereim3Point05Degrees()
- * @see #getBainHashmashosYereim2Point1Degrees()
+ * @see #getMisheyakir9Point5Degrees()
*/
- getBainHashmashosYereim2Point8Degrees(): Temporal.ZonedDateTime | null;
+ protected static readonly ZENITH_9_POINT_5: number;
/**
- * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 13.5 minutes
- * or 3/4 of an 18-minute Mil before sunset. According to the Yereim, bain hashmashos starts 3/4 of
- * a Mil before sunset and tzais or nightfall starts at sunset.
+ * The zenith of 9.75° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating alos (dawn) and tzais (nightfall) according to some opinions.
*
- * @return the Date
of 13.5 minutes before 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 the {@link AstronomicalCalendar}
- * documentation.
+ * @see #getTzaisGeonim9Point75Degrees()
+ */
+ protected static readonly ZENITH_9_POINT_75: number;
+ /**
+ * The zenith of 2.1° above {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating the start of bain hashmashos (twilight) of 13.5 minutes before sunset converted to degrees
+ * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction
+ * and from the center of the sun. It would be 0.833° less without this.
*
* @see #getBainHashmashosYereim2Point1Degrees()
*/
- getBainHashmashosYereim13Point5Minutes(): Temporal.ZonedDateTime | undefined;
+ protected static readonly ZENITH_MINUS_2_POINT_1: number;
/**
- * This method returns the beginning of bain hashmashos according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's
- * position 2.1° above the horizon around the equinox / equilux in
- * Yerushalayim, its position 13.5 minutes or 3/4 of an 18-minute Mil before sunset. According to the Yereim,
- * bain hashmashos starts 3/4 of a mil before sunset and tzais or nightfall starts at sunset.
- * Details, including how the degrees were calculated can be seen in the documentation of
- * {@link #getBainHashmashosYereim3Point05Degrees()}.
- *
- * @return the Date
of the sun's position 2.1° minutes before 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 the
- * {@link AstronomicalCalendar} documentation.
+ * The zenith of 2.8° above {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating the start of bain hashmashos (twilight) of 16.875 minutes before sunset converted to degrees
+ * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction
+ * and from the center of the sun. It would be 0.833° less without this.
*
- * @see #ZENITH_MINUS_2_POINT_1
- * @see #getBainHashmashosYereim13Point5Minutes()
* @see #getBainHashmashosYereim2Point8Degrees()
- * @see #getBainHashmashosYereim3Point05Degrees()
*/
- getBainHashmashosYereim2Point1Degrees(): Temporal.ZonedDateTime | null;
+ protected static readonly ZENITH_MINUS_2_POINT_8: number;
/**
- * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the
- * sun's position at {@link #ZENITH_3_POINT_7 3.7°} below the western horizon.
+ * The zenith of 3.05° above {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
+ * calculating the start of bain hashmashos (twilight) of 18 minutes before sunset converted to degrees
+ * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction
+ * and from the center of the sun. It would be 0.833° less without this.
*
- * @return the Date
representing the time when the sun is 3.7° below sea level.
- * @see #ZENITH_3_POINT_7
+ * @see #getBainHashmashosYereim3Point05Degrees()
*/
- getTzaisGeonim3Point7Degrees(): Temporal.ZonedDateTime | null;
+ protected static readonly ZENITH_MINUS_3_POINT_05: number;
/**
- * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the
- * sun's position at {@link #ZENITH_3_POINT_8 3.8°} below the western horizon.
- *
- * @return the Date
representing the time when the sun is 3.8° below sea level.
- * @see #ZENITH_3_POINT_8
+ * The offset in minutes (defaults to 40) after sunset used for tzeit based on calculations of
+ * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah.
+ * @see #getTzaisAteretTorah()
+ * @see #getAteretTorahSunsetOffset()
+ * @see #setAteretTorahSunsetOffset(double)
*/
- getTzaisGeonim3Point8Degrees(): Temporal.ZonedDateTime | null;
+ private ateretTorahSunsetOffset;
/**
- * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the
- * sun's position at {@link #ZENITH_5_POINT_95 5.95°} below the western horizon.
+ * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default
+ * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.
*
- * @return the Date
representing the time when the sun is 5.95° below sea level. 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 the {@link AstronomicalCalendar} documentation.
- * @see #ZENITH_5_POINT_95
+ * @see AstronomicalCalendar#AstronomicalCalendar()
*/
- getTzaisGeonim5Point95Degrees(): Temporal.ZonedDateTime | null;
/**
- * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4
- * of a Mil based on an 18
- * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_65 3.65°} below the western
- * horizon. This is a very early zman and should not be relied on without Rabbinical guidance.
+ * Method to return a shaah zmanis (temporal hour) calculated using a 19.8° dip. This calculation
+ * divides the day based on the opinion of the Magen
+ * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is 19.8°
+ * below the eastern geometric horizon before sunrise. Dusk for this is when the sun is 19.8° below the western
+ * geometric horizon after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.
*
- * @return the Date
representing the time when the sun is 3.65° below sea level. 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 the {@link AstronomicalCalendar} documentation.
- * @see #ZENITH_3_POINT_65
+ * @return the long
millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE}
+ * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
*/
- getTzaisGeonim3Point65Degrees(): Temporal.ZonedDateTime | null;
+ getShaahZmanis19Point8Degrees(): Temporal.Duration | undefined;
/**
- * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4
- * of a Mil based on an 18
- * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_676 3.676°} below the western
- * horizon based on the calculations of Stanley Fishkind. This is a very early zman and should not be
- * relied on without Rabbinical guidance.
+ * Method to return a shaah zmanis (temporal hour) calculated using a 18° dip. This calculation divides
+ * the day based on the opinion of the Magen Avraham
+ * (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is 18° below the
+ * eastern geometric horizon before sunrise. Dusk for this is when the sun is 18° below the western geometric
+ * horizon after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.
*
- * @return the Date
representing the time when the sun is 3.676° below sea level. 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 the {@link AstronomicalCalendar}
- * documentation.
- * @see #ZENITH_3_POINT_676
+ * @return the long
millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE}
+ * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
*/
- getTzaisGeonim3Point676Degrees(): Temporal.ZonedDateTime | null;
+ getShaahZmanis18Degrees(): Temporal.Duration | undefined;
/**
- * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4
- * of a mil based
- * on a 24-minute Mil, or 18 minutes. It is the sun's position at {@link #ZENITH_4_POINT_61 4.61°} below the
- * western horizon. This is a very early zman and should not be relied on without Rabbinical guidance.
+ * Method to return a shaah zmanis (temporal hour) calculated using a dip of 26°. This calculation
+ * divides the day based on the opinion of the Magen
+ * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is
+ * {@link #getAlos26Degrees() 26°} below the eastern geometric horizon before sunrise. Dusk for this is when
+ * the sun is {@link #getTzais26Degrees() 26°} below the western geometric horizon after sunset. This day is
+ * split into 12 equal parts with each part being a shaah zmanis. Since zmanim that use this
+ * method are extremely late or early and at a point when the sky is a long time past the 18° point where the
+ * darkest point is reached, zmanim that use this should only be used lechumra, such as
+ * delaying the start of nighttime mitzvos.
*
- * @return the Date
representing the time when the sun is 4.61° below sea level. 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 the {@link AstronomicalCalendar} documentation.
- * @see #ZENITH_4_POINT_61
+ * @return the long
millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE}
+ * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis120Minutes()
*/
- getTzaisGeonim4Point61Degrees(): Temporal.ZonedDateTime | null;
+ getShaahZmanis26Degrees(): Temporal.Duration | undefined;
/**
- * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4
- * of a Mil, based on a 22.5
- * minute Mil, or 16 7/8 minutes. It is the sun's position at {@link #ZENITH_4_POINT_37 4.37°} below the western
- * horizon. This is a very early zman and should not be relied on without Rabbinical guidance.
+ * Method to return a shaah zmanis (temporal hour) calculated using a dip of 16.1°. This calculation
+ * divides the day based on the opinion that the day runs from dawn to dusk. Dawn for this calculation is when the
+ * sun is 16.1° below the eastern geometric horizon before sunrise and dusk is when the sun is 16.1° below
+ * the western geometric horizon after sunset. This day is split into 12 equal parts with each part being a
+ * shaah zmanis.
*
- * @return the Date
representing the time when the sun is 4.37° below sea level. 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 the {@link AstronomicalCalendar} documentation.
- * @see #ZENITH_4_POINT_37
+ * @return the long
millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE}
+ * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getAlos16Point1Degrees()
+ * @see #getTzais16Point1Degrees()
+ * @see #getSofZmanShmaMGA16Point1Degrees()
+ * @see #getSofZmanTfilaMGA16Point1Degrees()
+ * @see #getMinchaGedola16Point1Degrees()
+ * @see #getMinchaKetana16Point1Degrees()
+ * @see #getPlagHamincha16Point1Degrees()
*/
- getTzaisGeonim4Point37Degrees(): Temporal.ZonedDateTime | null;
+ getShaahZmanis16Point1Degrees(): Temporal.Duration | undefined;
/**
- * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4
- * of a 24-minute Mil,
- * based on a Mil being 24 minutes, and is calculated as 18 + 2 + 4 for a total of 24 minutes. It is the
- * sun's position at {@link #ZENITH_5_POINT_88 5.88°} below the western horizon. This is a very early
- * zman and should not be relied on without Rabbinical guidance.
+ * Method to return a shaah zmanis (solar hour) according to the opinion of the Magen Avraham (MGA). This calculation
+ * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is
+ * 60 minutes before sunrise and dusk is 60 minutes after sunset. This day is split into 12 equal parts with each
+ * part being a shaah zmanis. Alternate methods of calculating a shaah zmanis are available in the
+ * subclass {@link ComplexZmanimCalendar}.
*
- * @todo Additional detailed documentation needed.
- * @return the Date
representing the time when the sun is 5.88° below sea level. 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 the {@link AstronomicalCalendar} documentation.
- * @see #ZENITH_5_POINT_88
+ * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
+ * {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getAlos60()
+ * @see #getTzais60()
+ * @see #getPlagHamincha60Minutes()
*/
- getTzaisGeonim5Point88Degrees(): Temporal.ZonedDateTime | null;
+ getShaahZmanis60Minutes(): Temporal.Duration | undefined;
/**
- * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4
- * of a Mil based on the
- * sun's position at {@link #ZENITH_4_POINT_8 4.8°} below the western horizon. This is based on Rabbi Leo Levi's
- * calculations. This is the This is a very early zman and should not be relied on without Rabbinical guidance.
- * @todo Additional documentation needed.
+ * Method to return a shaah zmanis (solar hour) according to the opinion of the Magen Avraham (MGA). This calculation divides the day
+ * based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 72 minutes
+ * before sunrise and dusk is 72 minutes after sunset. This day is split into 12 equal parts with each part
+ * being a shaah zmanis. Alternate methods of calculating a shaah zmanis are available in the
+ * subclass {@link ComplexZmanimCalendar}.
*
- * @return the Date
representing the time when the sun is 4.8° below sea level. 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 the {@link AstronomicalCalendar} documentation.
- * @see #ZENITH_4_POINT_8
+ * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
+ * {@link AstronomicalCalendar} documentation.
*/
- getTzaisGeonim4Point8Degrees(): Temporal.ZonedDateTime | null;
+ getShaahZmanis72Minutes(): Temporal.Duration | undefined;
/**
- * This method returns the tzais (nightfall) based on the opinion of the Geonim as calculated by
- * Rabbi Yechiel Michel Tucazinsky. It is
- * based on of the position of the sun no later than {@link #getTzaisGeonim6Point45Degrees() 31 minutes} after sunset
- * in Jerusalem the height of the summer solstice and is 28 minutes after shkiah around the equinox / equilux. This
- * computes to 6.45° below the western horizon.
- * @todo Additional documentation details needed.
+ * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being
+ * {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation
+ * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation
+ * is 72 minutes zmaniyos before sunrise and dusk is 72 minutes zmaniyos after sunset. This day
+ * is split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/10th of the day
+ * from {@link #getSunrise() sunrise} to {@link #getSunset() sunset}.
*
- * @return the Date
representing the time when the sun is 6.45° below sea level. 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 the {@link AstronomicalCalendar}
- * documentation.
- * @see #ZENITH_6_POINT_45
+ * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getAlos72Zmanis()
+ * @see #getTzais72Zmanis()
*/
- getTzaisGeonim6Point45Degrees(): Temporal.ZonedDateTime | null;
+ getShaahZmanis72MinutesZmanis(): Temporal.Duration | undefined;
/**
- * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated when the
- * sun's position {@link #ZENITH_7_POINT_083 7.083° (or 7° 5\u2032}) below the western horizon. This is often
- * referred to as 7°5' or 7° and 5 minutes. This calculation is based on the observation of 3 medium sized
- * stars by Dr. Baruch (Berthold) Cohn in his luach Tabellen enthaltend die Zeitangaben für
- * den Beginn der Nacht und des Tages für die Breitengrade + 66 bis -38 published in Strasbourg, France in 1899.
- * This calendar was very popular in Europe, and many other calendars based their time on it. Rav Dovid Tzvi Hoffman in his
- * Sh"Ut Melamed Leho'il in an exchange of letters with Baruch Cohn in Orach Chaim 30 agreed to this zman (page 36),
- * as did the Sh"Ut Bnei Tziyon and the Tenuvas Sadeh. It is very close to the time of the Mekor Chesed of the Sefer chasidim. It is close to the position of the sun 30 minutes
- * after sunset in Jerusalem around the equinox / equilux, but not
- * Exactly. The actual position of the sun 30 minutes after sunset in Jerusalem at the equilux is 7.205° and 7.199°
- * at the equinox. See Hazmanim Bahalacha vol 2, pages 520-521 for more details.
+ * Method to return a shaah zmanis (temporal hour) calculated using a dip of 90 minutes. This calculation
+ * divides the day based on the opinion of the Magen
+ * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes before sunrise
+ * and dusk is 90 minutes after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.
*
- * @return the Date
representing the time when the sun is 7.083° below sea level. 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 the {@link AstronomicalCalendar}
- * documentation.
- * @see #ZENITH_7_POINT_083
+ * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
+ * {@link AstronomicalCalendar} documentation.
*/
- getTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null;
+ getShaahZmanis90Minutes(): Temporal.Duration | undefined;
/**
- * This method returns tzais (nightfall) based on the opinion of the Geonim calculated as 45 minutes
- * after sunset during the summer solstice in New York, when the neshef (twilight) is the longest. The sun's
- * position at this time computes to {@link #ZENITH_7_POINT_67 7.75°} below the western horizon. See Igros Moshe Even Haezer 4, Ch. 4 (regarding
- * tzais for krias Shema). It is also mentioned in Rabbi Heber's Shaarei Zmanim on in
- * chapter 10 (page 87) and
- * chapter 12 (page 108). Also see the
- * time of 45 minutes in Rabbi Simcha Bunim Cohen's The radiance of Shabbos as the earliest zman for New York.
- * This zman is also listed in the Divrei
- * Shalom Vol. III, chapter 75, and Bais Av"i
- * Vol. III, chapter 117. This zman is also listed in the Divrei Shalom etc. chapter 177 (FIXME - could not
- * be located). Since this zman depends on the level of light, Rabbi Yaakov Shakow presented this degree-based
- * calculation to Rabbi Rabbi Shmuel Kamenetsky who agreed
- * to it.
- * @todo add hyperlinks to source of Divrei Shalom.
- * @return the Date
representing the time when the sun is 7.67° below sea level. 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 the {@link AstronomicalCalendar}
- * documentation.
- * @see #ZENITH_7_POINT_67
+ * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being
+ * {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides
+ * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes
+ * zmaniyos before sunrise and dusk is 90 minutes zmaniyos after sunset. This day is split into 12 equal
+ * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link #getSunrise() sunrise} to
+ * {@link #getSunset() sunset}.
+ *
+ * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getAlos90Zmanis()
+ * @see #getTzais90Zmanis()
*/
- getTzaisGeonim7Point67Degrees(): Temporal.ZonedDateTime | null;
+ getShaahZmanis90MinutesZmanis(): Temporal.Duration | undefined;
/**
- * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the
- * sun's position at {@link #ZENITH_8_POINT_5 8.5°} below the western horizon.
+ * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link
+ * #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides the
+ * day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes
+ * zmaniyos before sunrise and dusk is 96 minutes zmaniyos after sunset. This day is split into 12
+ * equal parts with each part being a shaah zmanis. This is identical to 1/7.5th of the day from
+ * {@link #getSunrise() sunrise} to {@link #getSunset() sunset}.
*
- * @return the Date
representing the time when the sun is 8.5° below sea level. 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 the {@link AstronomicalCalendar} documentation.
- * @see #ZENITH_8_POINT_5
+ * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getAlos96Zmanis()
+ * @see #getTzais96Zmanis()
*/
- getTzaisGeonim8Point5Degrees(): Temporal.ZonedDateTime | null;
+ getShaahZmanis96MinutesZmanis(): Temporal.Duration | undefined;
/**
- * This method returns the tzais (nightfall) based on the calculations used in the Luach Itim Lebinah as the stringent time for tzais. It is
- * calculated at the sun's position at {@link #ZENITH_9_POINT_3 9.3°} below the western horizon.
+ * Method to return a shaah zmanis (temporal hour) according to the opinion of the
+ * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculated with alos being 1/10th
+ * of sunrise to sunset day, or {@link #getAlos72Zmanis() 72} minutes zmaniyos of such a day before
+ * {@link #getSunrise() sunrise}, and tzais is usually calculated as {@link #getTzaisAteretTorah() 40
+ * minutes} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}) after {@link #getSunset()
+ * sunset}. This day is split into 12 equal parts with each part being a shaah zmanis. Note that with this
+ * system, chatzos (mid-day) will not be the point that the sun is {@link #getSunTransit() halfway across
+ * the sky}.
*
- * @return the Date
representing the time when the sun is 9.3° below sea level. 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 the {@link AstronomicalCalendar} documentation.
+ * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getAlos72Zmanis()
+ * @see #getTzaisAteretTorah()
+ * @see #getAteretTorahSunsetOffset()
+ * @see #setAteretTorahSunsetOffset(double)
*/
- getTzaisGeonim9Point3Degrees(): Temporal.ZonedDateTime | null;
+ getShaahZmanisAteretTorah(): Temporal.Duration | undefined;
/**
- * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 60
- * minutes after sunset around the equinox / equilux, the
- * day that a solar hour is 60 minutes in New York. The sun's position at this time computes to
- * {@link #ZENITH_9_POINT_75 9.75°} below the western horizon. This is the opinion of Rabbi Eliyahu Henkin. This also follows the opinion of
- * Rabbi Shmuel Kamenetsky. Rabbi Yaakov Shakow presented
- * these degree-based times to Rabbi Shmuel Kamenetsky who agreed to them.
+ * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of
+ * Rabbi Yaakov Moshe Hillel as published in the
+ * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before
+ * sunrise in degrees {@link #getAlos16Point1Degrees() alos 16.1°} and ending 14 minutes after sunset in
+ * degrees {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°}. This day is split into 12 equal parts with
+ * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point
+ * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha
+ * Ketana and Plag Hamincha. The 14 minutes are based on 3/4 of an 18 minute mil, with half a minute
+ * added for Rav Yosi.
*
- * @todo recalculate based on equinox / equilux.
- * @return the Date
representing the time when the sun is 9.75° below sea level. 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 the {@link AstronomicalCalendar} documentation.
+ * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
+ * {@link AstronomicalCalendar} documentation.
*
- * @see #getTzais60()
+ * @see #getMinchaKetanaAhavatShalom()
+ * @see #getPlagAhavatShalom()
*/
- getTzaisGeonim9Point75Degrees(): Temporal.ZonedDateTime | null;
+ getShaahZmanisAlos16Point1ToTzais3Point8(): Temporal.Duration | undefined;
/**
- * This method returns the tzais (nightfall) based on the opinion of the Chavas Yair and Divrei Malkiel that the time to walk the distance of a Mil is 15 minutes for a total of 60 minutes
- * for 4 Mil after {@link #getSeaLevelSunset() sea level sunset}. See detailed documentation explaining the
- * 60 minute concept at {@link #getAlos60()}.
+ * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of
+ * Rabbi Yaakov Moshe Hillel as published in the
+ * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before
+ * sunrise in degrees {@link #getAlos16Point1Degrees() alos 16.1°} and ending 13.5 minutes after sunset in
+ * degrees {@link #getTzaisGeonim3Point7Degrees() tzais 3.7°}. This day is split into 12 equal parts with
+ * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point
+ * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha
+ * Gedola calculation.
*
- * @return the Date
representing 60 minutes after sea level 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 the
+ * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
* {@link AstronomicalCalendar} documentation.
*
- * @see #getAlos60()
- * @see #getPlagHamincha60Minutes()
- * @see #getShaahZmanis60Minutes()
+ * @see #getMinchaGedolaAhavatShalom()
*/
- getTzais60(): Temporal.ZonedDateTime | undefined;
+ getShaahZmanisAlos16Point1ToTzais3Point7(): Temporal.Duration | undefined;
/**
- * This method returns tzais usually calculated as 40 minutes (configurable to any offset via
- * {@link #setAteretTorahSunsetOffset(double)}) after sunset. Please note that Chacham Yosef Harari-Raful
- * of Yeshivat Ateret Torah who uses this time, does so only for calculating various other zmanai hayom
- * such as Sof Zman Krias Shema and Plag Hamincha. His calendars do not publish a zman
- * for Tzais. It should also be noted that Chacham Harari-Raful provided a 25 minute zman
- * for Israel. This API uses 40 minutes year round in any place on the globe by default. This offset can be change
- * by calling {@link #setAteretTorahSunsetOffset(double)}.
+ * Method to return a shaah zmanis (temporal hour) calculated using a dip of 96 minutes. This calculation
+ * divides the day based on the opinion of the Magen
+ * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes before sunrise
+ * and dusk is 96 minutes after sunset. This day is split into 12 equal parts with each part being a shaah
+ * zmanis.
*
- * @return the Date
representing 40 minutes (configurable via {@link #setAteretTorahSunsetOffset})
- * after sea level 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 the {@link AstronomicalCalendar} documentation.
- * @see #getAteretTorahSunsetOffset()
- * @see #setAteretTorahSunsetOffset(double)
+ * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
+ * {@link AstronomicalCalendar} documentation.
*/
- getTzaisAteretTorah(): Temporal.ZonedDateTime | undefined;
+ getShaahZmanis96Minutes(): Temporal.Duration | undefined;
/**
- * Returns the offset in minutes after sunset used to calculate tzais based on the calculations of
- * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculations. The default value is 40 minutes.
- * This affects most zmanim, since almost all zmanim use subset as part of their calculation.
+ * Method to return a shaah zmanis (temporal hour) calculated using a dip of 120 minutes. This calculation
+ * divides the day based on the opinion of the Magen
+ * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 120 minutes before sunrise and
+ * dusk is 120 minutes after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.
+ * Since zmanim that use this method are extremely late or early and at a point when the sky is a long time
+ * past the 18° point where the darkest point is reached, zmanim that use this should only be used
+ * lechumra only, such as delaying the start of nighttime mitzvos.
*
- * @return the number of minutes after sunset for Tzait.
- * @see #setAteretTorahSunsetOffset(double)
+ * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis26Degrees()
*/
- getAteretTorahSunsetOffset(): number;
+ getShaahZmanis120Minutes(): Temporal.Duration | undefined;
/**
- * Allows setting the offset in minutes after sunset for the Ateret Torah zmanim. The default if unset is
- * 40 minutes. Chacham Yosef Harari-Raful of Yeshivat Ateret Torah uses 40 minutes globally with the exception
- * of Israel where a 25 minute offset is used. This 40 minute (or any other) offset can be overridden by this method.
- * This offset impacts all Ateret Torah zmanim.
+ * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link
+ * #getAlos120Zmanis() 120} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides
+ * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is
+ * 120 minutes zmaniyos before sunrise and dusk is 120 minutes zmaniyos after sunset. This day is
+ * split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/6th of the day from
+ * {@link #getSunrise() sunrise} to {@link #getSunset() sunset}. Since zmanim that use this method are
+ * extremely late or early and at a point when the sky is a long time past the 18° point where the darkest point
+ * is reached, zmanim that use this should only be used lechumra such as delaying the start of
+ * nighttime mitzvos.
+ *
+ * @return 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, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getAlos120Zmanis()
+ * @see #getTzais120Zmanis()
+ */
+ getShaahZmanis120MinutesZmanis(): Temporal.Duration | undefined;
+ /**
+ * This method should be used lechumra only and returns the time of plag hamincha based on sunrise
+ * being 120 minutes zmaniyos or 1/6th of the day before sunrise. This is calculated as 10.75 hours after
+ * {@link #getAlos120Zmanis() dawn}. The formula used is 10.75 * {@link #getShaahZmanis120MinutesZmanis()} after
+ * {@link #getAlos120Zmanis() dawn}. Since the zman based on an extremely early alos and a very
+ * late tzais, it should only be used lechumra.
+ *
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
*
- * @param ateretTorahSunsetOffset
- * the number of minutes after sunset to use as an offset for the Ateret Torah tzais
- * @see #getAteretTorahSunsetOffset()
+ * @return 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 the
+ * {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getShaahZmanis120MinutesZmanis()
+ * @see #getAlos120()
+ * @see #getTzais120()
+ * @see #getPlagHamincha26Degrees()
+ * @see #getPlagHamincha120Minutes()
*/
- setAteretTorahSunsetOffset(ateretTorahSunsetOffset: number): void;
+ getPlagHamincha120MinutesZmanis(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the
- * calculation of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts
- * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending
- * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via
- * {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and added
- * to {@link #getAlos72Zmanis() alos} to reach this time. This time is 3
- * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after
- * {@link #getAlos72Zmanis() alos 72 zmaniyos}. Note: Based on this calculation chatzos
- * will not be at midday.
+ * This method should be used lechumra only and returns the time of plag hamincha according to the
+ * Magen Avraham with the day starting 120 minutes before sunrise and ending 120 minutes after sunset. This is
+ * calculated as 10.75 hours after {@link #getAlos120() dawn 120 minutes}. The formula used is 10.75 {@link
+ * #getShaahZmanis120Minutes()} after {@link #getAlos120()}. Since the zman based on an extremely early
+ * alos and a very late tzais, it should only be used lechumra.
*
- * @return the Date
of the latest zman krias shema based on this calculation. 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 {@link AstronomicalCalendar} documentation.
- * @see #getAlos72Zmanis()
- * @see #getTzaisAteretTorah()
- * @see #getAteretTorahSunsetOffset()
- * @see #setAteretTorahSunsetOffset(double)
- * @see #getShaahZmanisAteretTorah()
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
+ *
+ * @return 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 the
+ * {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getShaahZmanis120Minutes()
+ * @see #getPlagHamincha26Degrees()
*/
- getSofZmanShmaAteretTorah(): Temporal.ZonedDateTime | null;
+ getPlagHamincha120Minutes(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman tfila (time to recite the morning prayers) based on the calculation
- * of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis()
- * 1/10th of the day} before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes
- * after sunset} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos
- * are calculated based on this day and added to {@link #getAlos72Zmanis() alos} to reach this time. This time
- * is 4 * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after
- * {@link #getAlos72Zmanis() alos 72 zmaniyos}.
- * Note: Based on this calculation chatzos will not be at midday.
+ * Method to return alos (dawn) calculated as 60 minutes before sunrise. This is the time to walk the
+ * distance of 4 Mil at 15 minutes a Mil. This seems to be the opinion of the Chavas Yair in the Mekor Chaim, Orach Chaim Ch.
+ * 90, though the Mekor Chaim in Ch. 58 and in the Chut Hashani Cha 97 states that
+ * a a person walks 3 and a 1/3 mil in an hour, or an 18-minute mil. Also see the Divrei Malkiel Vol. 4, Ch. 20, page 34) who
+ * mentions the 15 minute mil lechumra by baking matzos. Also see the Maharik Ch. 173 where the questioner quoting the
+ * Ra'avan is of the opinion that the time to walk a
+ * mil is 15 minutes (5 mil in a little over an hour). There are many who believe that there is a
+ * ta'us sofer (scribe's error) in the Ra'avan, and it should 4 mil in a little over an hour, or an
+ * 18-minute mil. Time based offset calculations are based on the opinion of the
+ * Rishonim who stated that the time of the neshef
+ * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it takes to
+ * walk the distance of 4* mil. {@link #getTzaisGeonim9Point75Degrees()} is a related zman that is a
+ * degree-based calculation based on 60 minutes.
*
- * @return the Date
of the latest zman krias shema based on this calculation. 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 {@link AstronomicalCalendar} documentation.
- * @see #getAlos72Zmanis()
- * @see #getTzaisAteretTorah()
- * @see #getShaahZmanisAteretTorah()
- * @see #setAteretTorahSunsetOffset(double)
+ * @return 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 the {@link AstronomicalCalendar}.
+ * documentation.
+ *
+ * @see #getTzais60()
+ * @see #getPlagHamincha60Minutes()
+ * @see #getShaahZmanis60Minutes()
*/
- getSofZmanTfilahAteretTorah(): Temporal.ZonedDateTime | null;
+ getAlos60(): Temporal.ZonedDateTime | undefined;
/**
- * This method returns the time of mincha gedola based on the calculation of Chacham Yosef
- * Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day}
- * before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset}
- * (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest
- * time to pray mincha according to the opinion of the Rambam and others. For more information on this see the documentation on {@link #getMinchaGedola() mincha
- * gedola}. This is calculated as 6.5 {@link #getShaahZmanisAteretTorah() solar hours} after alos. The
- * calculation used is 6.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}.
- *
- * @see #getAlos72Zmanis()
- * @see #getTzaisAteretTorah()
- * @see #getShaahZmanisAteretTorah()
- * @see #getMinchaGedola()
- * @see #getMinchaKetanaAteretTorah()
- * @see ZmanimCalendar#getMinchaGedola()
- * @see #getAteretTorahSunsetOffset()
- * @see #setAteretTorahSunsetOffset(double)
+ * Method to return alos (dawn) calculated using 72 minutes zmaniyos or 1/10th of the day before
+ * sunrise. This is based on an 18-minute Mil so the time for 4 Mil is 72 minutes which is 1/10th
+ * of a day (12 * 60 = 720) based on the a day being from {@link #getSeaLevelSunrise() sea level sunrise} to
+ * {@link #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset}
+ * (depending on the {@link #isUseElevation()} setting).
+ * The actual calculation is {@link #getSeaLevelSunrise()} - ({@link #getShaahZmanisGra()} * 1.2). This calculation
+ * is used in the calendars published by the Hisachdus Harabanim D'Artzos Habris Ve'Canada.
*
- * @return 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 the {@link AstronomicalCalendar}
+ * @return 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 the {@link AstronomicalCalendar}
* documentation.
+ * @see #getShaahZmanisGra()
*/
- getMinchaGedolaAteretTorah(): Temporal.ZonedDateTime | null;
+ getAlos72Zmanis(): Temporal.ZonedDateTime | null;
/**
- * This method returns the time of mincha ketana based on the calculation of
- * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts
- * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending
- * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via
- * {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest time to pray mincha
- * according to the opinion of the Rambam and others.
- * For more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is
- * calculated as 9.5 {@link #getShaahZmanisAteretTorah() solar hours} after {@link #getAlos72Zmanis() alos}.
- * The calculation used is 9.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}.
+ * Method to return alos (dawn) calculated using 96 minutes before before {@link #getSunrise() sunrise} or
+ * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting) that is based
+ * on the time to walk the distance of 4 Mil at 24 minutes a Mil. Time based offset
+ * calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef (time between dawn and sunrise) does not vary
+ * by the time of year or location but purely depends on the time it takes to walk the distance of 4 Mil.
*
- * @see #getAlos72Zmanis()
- * @see #getTzaisAteretTorah()
- * @see #getShaahZmanisAteretTorah()
- * @see #getAteretTorahSunsetOffset()
- * @see #setAteretTorahSunsetOffset(double)
- * @see #getMinchaGedola()
- * @see #getMinchaKetana()
- * @return 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 the {@link AstronomicalCalendar}
+ * @return 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 the {@link AstronomicalCalendar}
* documentation.
*/
- getMinchaKetanaAteretTorah(): Temporal.ZonedDateTime | null;
- /**
- * This method returns the time of plag hamincha based on the calculation of Chacham Yosef Harari-Raful
- * of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is
- * usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset
- * via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and
- * added to {@link #getAlos72Zmanis() alos} to reach this time. This time is 10.75
- * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after {@link #getAlos72Zmanis()
- * dawn}.
- *
- * @return the Date
of the plag. 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 {@link AstronomicalCalendar} documentation.
- * @see #getAlos72Zmanis()
- * @see #getTzaisAteretTorah()
- * @see #getShaahZmanisAteretTorah()
- * @see #setAteretTorahSunsetOffset(double)
- * @see #getAteretTorahSunsetOffset()
- */
- getPlagHaminchaAteretTorah(): Temporal.ZonedDateTime | null;
+ getAlos96(): Temporal.ZonedDateTime | undefined;
/**
- * This method returns the time of misheyakir based on the common calculation of the Syrian community in NY
- * that the alos is a fixed minute offset from day starting {@link #getAlos72Zmanis() 1/10th of the day}
- * before sunrise. The common offsets are 6 minutes (based on the Pri Megadim, but not linked to the
- * calculation of Alos as 1/10th of the day), 8 and 18 minutes (possibly attributed to
- * Chacham Baruch Ben Haim). Since there is no universal accepted offset, the user of this API will have to
- * Chacham Baruch Ben Haim). Since there is no
- * universal accepted offset, the user of this API will have to specify one. Chacham Yosef Harari-Raful of
- * Yeshivat Ateret Torah does not supply any zman for misheyakir and does not endorse any
- * specific calculation for misheyakir. For that reason, this method is not a public method.
+ * Method to return alos (dawn) calculated using 90 minutes zmaniyos or 1/8th of the day before
+ * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link
+ * #isUseElevation()} setting). This is based on a 22.5-minute Mil so the time for 4 Mil is 90
+ * minutes which is 1/8th of a day (12 * 60) / 8 = 90
+ * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level
+ * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}.
+ * The actual calculation used is {@link #getSunrise()} - ({@link #getShaahZmanisGra()} * 1.5).
*
- * @param minutes
- * the number of minutes after alos calculated as {@link #getAlos72Zmanis() 1/10th of the day}
- * @return the Date
of misheyakir. If the calculation can't be computed such as in the Arctic
+ * @return 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 the {@link AstronomicalCalendar}
* documentation.
- * @see #getAlos72Zmanis()
+ * @see #getShaahZmanisGra()
*/
- private getMesheyakirAteretTorah;
+ getAlos90Zmanis(): Temporal.ZonedDateTime | null;
/**
- * Method to return tzais (dusk) calculated as 72 minutes zmaniyos, or 1/10th of the day after
- * {@link #getSeaLevelSunset() sea level sunset}. This is the way that the Minchas Cohen in Ma'amar 2:4 calculates Rebbeinu Tam's
- * time of tzeis. It should be noted that this calculation results in the shortest time from sunset to
- * tzais being during the winter solstice, the longest at the summer solstice and 72 clock minutes at the
- * equinox. This does not match reality, since there is no direct relationship between the length of the day and
- * twilight. The shortest twilight is during the equinox, the longest is during the the summer solstice, and in the
- * winter with the shortest daylight, the twilight period is longer than during the equinoxes.
+ * This method returns alos (dawn) calculated using 96 minutes zmaniyos or 1/7.5th of the day before
+ * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link
+ * #isUseElevation()} setting). This is based on a 24-minute Mil so the time for 4 Mil is 96
+ * minutes which is 1/7.5th of a day (12 * 60 / 7.5 = 96).
+ * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level
+ * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}.
+ * The actual calculation used is {@link #getSunrise()} - ({@link #getShaahZmanisGra()} * 1.6).
*
* @return 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 the {@link AstronomicalCalendar}
* documentation.
- * @see #getAlos72Zmanis()
+ * @see #getShaahZmanisGra()
*/
- getTzais72Zmanis(): Temporal.ZonedDateTime | null;
+ getAlos96Zmanis(): Temporal.ZonedDateTime | null;
/**
- * A utility method to return alos (dawn) or tzais (dusk) based on a fractional day offset.
- * @param hours the number of shaaos zmaniyos (temporal hours) before sunrise or after sunset that defines dawn
- * or dusk. If a negative number is passed in, it will return the time of alos (dawn) (subtracting the
- * time from sunrise) and if a positive number is passed in, it will return the time of tzais (dusk)
- * (adding the time to sunset). If 0 is passed in, a null will be returned (since we can't tell if it is sunrise
- * or sunset based).
+ * Method to return alos (dawn) calculated using 90 minutes before {@link #getSeaLevelSunrise() sea level
+ * sunrise} based on the time to walk the distance of 4 Mil at 22.5 minutes a Mil. Time based
+ * offset calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef
+ * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it
+ * takes to walk the distance of 4 Mil.
+ *
* @return 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. A null will also be returned if 0 is passed in, since we can't tell if it is sunrise
- * or sunset based. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
+ * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
+ * documentation.
*/
- private getZmanisBasedOffset;
+ getAlos90(): Temporal.ZonedDateTime | undefined;
/**
- * Method to return tzais (dusk) calculated using 90 minutes zmaniyos or 1/8th of the day after {@link
- * #getSeaLevelSunset() sea level sunset}. This time is known in Yiddish as the achtel (an eighth)
- * zman.
+ * This method should be used lechumra only and returns alos (dawn) calculated using 120 minutes
+ * before {@link #getSeaLevelSunrise() sea level sunrise} (no adjustment for elevation is made) based on the time
+ * to walk the distance of 5 Mil(Ula) at 24 minutes a Mil. Time based offset calculations
+ * for alos are based on the* opinion of the Rishonim
+ * who stated that the time of the neshef (time between dawn and sunrise) does not vary by the time of
+ * year or location but purely depends on the time it takes to walk the distance of 5 Mil(Ula). Since
+ * this time is extremely early, it should only be used lechumra, such as not eating after this time on a fast
+ * day, and not as the start time for mitzvos that can only be performed during the day.
+ *
+ * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),
+ * since it returns a very early time, and if used lekula can result in doing mitzvos hayom
+ * too early according to most opinions. There is no current plan to remove this method from the API, and this
+ * deprecation is intended to alert developers of the danger of using it.
*
* @return 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 the {@link AstronomicalCalendar}
* documentation.
- * @see #getAlos90Zmanis()
+ *
+ * @see #getTzais120()
+ * @see #getAlos26Degrees()
*/
- getTzais90Zmanis(): Temporal.ZonedDateTime | null;
+ getAlos120(): Temporal.ZonedDateTime | undefined;
/**
- * Method to return tzais (dusk) calculated using 96 minutes zmaniyos or 1/7.5 of the day after
- * {@link #getSeaLevelSunset() sea level sunset}.
+ * This method should be used lechumra only and method returns alos (dawn) calculated using
+ * 120 minutes zmaniyos or 1/6th of the day before {@link #getSunrise() sunrise} or {@link
+ * #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This is based
+ * on a 24-minute Mil so the time for 5 Mil is 120 minutes which is 1/6th of a day (12 * 60 /
+ * 6 = 120). The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link
+ * #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending
+ * on the {@link #isUseElevation()}. The actual calculation used is {@link #getSunrise()} - ({@link
+ * #getShaahZmanisGra()} * 2). Since this time is extremely early, it should only be used lechumra, such
+ * as not eating after this time on a fast day, and not as the start time for mitzvos that can only be
+ * performed during the day.
+ *
+ * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),
+ * since it returns a very early time, and if used lekula can result in doing mitzvos hayom
+ * too early according to most opinions. There is no current plan to remove this method from the API, and this
+ * deprecation is intended to alert developers of the danger of using it.
*
* @return 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 the {@link AstronomicalCalendar}
* documentation.
- * @see #getAlos96Zmanis()
+ * @see #getAlos120()
+ * @see #getAlos26Degrees()
*/
- getTzais96Zmanis(): Temporal.ZonedDateTime | null;
+ getAlos120Zmanis(): Temporal.ZonedDateTime | null;
/**
- * Method to return tzais (dusk) calculated as 90 minutes after sea level sunset. This method returns
- * tzais (nightfall) based on the opinion of the Magen Avraham that the time to walk the distance of a
- * Mil according to the Rambam's opinion
- * is 18 minutes for a total of 90 minutes based on the opinion of Ula who calculated tzais as 5
- * Mil after sea level shkiah (sunset). A similar calculation {@link #getTzais19Point8Degrees()}
- * uses solar position calculations based on this time.
+ * This method should be used lechumra only and returns alos (dawn) calculated when the sun is {@link
+ * #ZENITH_26_DEGREES 26°} below the eastern geometric horizon before sunrise. This calculation is based on the same
+ * calculation of {@link #getAlos120() 120 minutes} but uses a degree-based calculation instead of 120 exact minutes. This
+ * calculation is based on the position of the sun 120 minutes before sunrise in Jerusalem around the equinox / equilux, which
+ * calculates to 26° below {@link #GEOMETRIC_ZENITH geometric zenith}. Since this time is extremely early, it should
+ * only be used lechumra only, such as not eating after this time on a fast day, and not as the start time for
+ * mitzvos that can only be performed during the day.
*
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
- * @see #getTzais19Point8Degrees()
- * @see #getAlos90()
+ * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),
+ * since it returns a very early time, and if used lekula can result in doing mitzvos hayom
+ * too early according to most opinions. There is no current plan to remove this method from the API, and this
+ * deprecation is intended to alert developers of the danger of using it.
+ *
+ * @return the Date
representing alos. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #ZENITH_26_DEGREES
+ * @see #getAlos120()
+ * @see #getTzais120()
+ * @see #getTzais26Degrees()
*/
- getTzais90(): Temporal.ZonedDateTime | undefined;
+ getAlos26Degrees(): Temporal.ZonedDateTime | null;
/**
- * This method should be used lechumra only and returns tzais (nightfall) based on the calculations
- * of Rav Chaim Naeh that the time to walk the
- * distance of a Mil according to the Rambam's opinion
- * is 2/5 of an hour (24 minutes) for a total of 120 minutes based on the opinion of Ula who calculated
- * tzais as 5 Mil after sea level shkiah (sunset). A similar calculation {@link
- * #getTzais26Degrees()} uses degree-based calculations based on this 120 minute calculation. Since the zman
- * is extremely late and at a point that is long past the 18° point where the darkest point is
- * reached, it should only be used lechumra, such as delaying the start of nighttime mitzvos.
- *
- * @deprecated This method should be used lechumra only since it returns a very late time, and if used
- * lekula can result in chillul Shabbos etc. There is no current plan to remove this
- * method from the API, and this deprecation is intended to alert developers of the danger of using it.
- *
- * @return 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 the {@link AstronomicalCalendar}.
- * documentation.
- * @see #getTzais26Degrees()
- * @see #getAlos120()
- */
- getTzais120(): Temporal.ZonedDateTime;
+ * A method to return alos (dawn) calculated when the sun is {@link #ASTRONOMICAL_ZENITH 18°} below the
+ * eastern geometric horizon before sunrise.
+ *
+ * @return the Date
representing alos. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #ASTRONOMICAL_ZENITH
+ */
+ getAlos18Degrees(): Temporal.ZonedDateTime | null;
/**
- * This method should be used lechumra only and returns tzais (dusk) calculated using 120 minutes
- * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. Since the zman
- * is extremely late and at a point when the it is long past the 18° point where the darkest point is
- * reached, it should only be used lechumra, such as delaying the start of nighttime mitzvos.
+ * A method to return alos (dawn) calculated when the sun is {@link #ZENITH_19_DEGREES 19°} below the
+ * eastern geometric horizon before sunrise. This is the Rambam's alos according to Rabbi Moshe Kosower's Maaglei Tzedek, page 88, Ayeles Hashachar Vol. I, page 12, Yom Valayla Shel Torah, Ch. 34, p. 222 and
+ * Rabbi Yaakov Shakow's Luach Ikvei Hayom.
*
- * @deprecated This method should be used lechumra only since it returns a very late time, and if used
- * lekula can result in chillul Shabbos etc. There is no current plan to remove this
- * method from the API, and this deprecation is intended to alert developers of the danger of using it.
+ * @return the Date
representing alos. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #ASTRONOMICAL_ZENITH
+ */
+ getAlos19Degrees(): Temporal.ZonedDateTime | null;
+ /**
+ * Method to return alos (dawn) calculated when the sun is {@link #ZENITH_19_POINT_8 19.8°} below the
+ * eastern geometric horizon before sunrise. This calculation is based on the same calculation of
+ * {@link #getAlos90() 90 minutes} but uses a degree-based calculation instead of 90 exact minutes. This calculation
+ * is based on the position of the sun 90 minutes before sunrise in Jerusalem around the equinox / equilux, which
+ * calculates to 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith}.
*
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
- * @see #getAlos120Zmanis()
- * @see #getTzais120()
- * @see #getTzais26Degrees()
+ * @return the Date
representing alos. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #ZENITH_19_POINT_8
+ * @see #getAlos90()
*/
- getTzais120Zmanis(): Temporal.ZonedDateTime | null;
+ getAlos19Point8Degrees(): Temporal.ZonedDateTime | null;
/**
- * This calculates the time of tzais at the point when the sun is 16.1° below the horizon. This is
- * the sun's dip below the horizon 72 minutes after sunset according Rabbeinu Tam's calculation of tzais
- * around the equinox / equilux in
- * Jerusalem. The question of equinox VS equilux is complex, with Rabbi Meir Posen in the Ohr Meir of the opinion that the equilux should be used. See
- * Yisrael Vehazmanim vol I, 34:1:4. Rabbi Yedidya Manet in his Zmanei Halacha Lema'aseh (4th edition part 2, pages
- * and 22 and 24) and Rabbi Yonah Metzbuch (in a letter published by Rabbi Manet) are of the opinion that the
- * astronomical equinox should be used. The difference adds up to about 9 seconds, too trivial to make much of a
- * difference. For information on how this is calculated see the comments on {@link #getAlos16Point1Degrees()}.
+ * Method to return alos (dawn) calculated when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the
+ * eastern geometric horizon before sunrise. This calculation is based on the same calculation of
+ * {@link #getAlos72() 72 minutes} but uses a degree-based calculation instead of 72 exact minutes. This calculation
+ * is based on the position of the sun 72 minutes before sunrise in Jerusalem around the equinox / equilux, which
+ * calculates to 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}.
*
- * @return the Date
representing the time. If the calculation can't be computed such as northern and
+ * @return the Date
representing alos. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #ZENITH_16_POINT_1
+ * @see #getAlos72()
+ */
+ getAlos16Point1Degrees(): Temporal.ZonedDateTime | null;
+ /**
+ * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES
+ * 11.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating
+ * misheyakir according to some opinions. This calculation is based on the position of the sun 52 minutes
+ * before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux,
+ * which calculates to 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith}.
+ * @todo recalculate.
+ *
+ * @return the Date
of misheyakir. 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 the {@link AstronomicalCalendar} documentation.
- * @see #getTzais72()
- * @see #getAlos16Point1Degrees() for more information on this calculation.
+ * @see #ZENITH_11_POINT_5
+ */
+ getMisheyakir11Point5Degrees(): Temporal.ZonedDateTime | null;
+ /**
+ * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES
+ * 11°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating
+ * misheyakir according to some opinions. This calculation is based on the position of the sun 48 minutes
+ * before {@link #getSunrise sunrise} in Jerusalem daround the equinox / equilux,
+ * which calculates to 11° below {@link #GEOMETRIC_ZENITH geometric zenith}.
+ *
+ * @return 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 the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #ZENITH_11_DEGREES
+ */
+ getMisheyakir11Degrees(): Temporal.ZonedDateTime | null;
+ /**
+ * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_10_POINT_2
+ * 10.2°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating
+ * misheyakir according to some opinions. This calculation is based on the position of the sun 45 minutes
+ * before {@link #getSunrise sunrise} in Jerusalem around the equinox which calculates
+ * to 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith}.
+ *
+ * @return the Date
of misheyakir. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #ZENITH_10_POINT_2
+ */
+ getMisheyakir10Point2Degrees(): Temporal.ZonedDateTime | null;
+ /**
+ * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_7_POINT_65
+ * 7.65°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). The degrees are based on a 35/36 minute
+ * zman around the
+ * equinox / equilux, when the neshef (twilight) is the shortest. This time is based on Rabbi Moshe Feinstein who writes in Ohr Hachaim Vol. 4, Ch. 6)
+ * that misheyakir in New York is 35-40 minutes before sunset, something that is a drop less than 8°.
+ * Rabbi Yisroel Taplin in Zmanei Yisrael (page 117) notes that Rabbi Yaakov Kamenetsky stated that it is not less than 36
+ * minutes before sunrise (maybe it is 40 minutes). Sefer Yisrael Vehazmanim (p. 7) quotes the Tamar Yifrach
+ * in the name of the Satmar Rov that one should be stringent
+ * not consider misheyakir before 36 minutes. This is also the accepted minhag in Lakewood that is used in the Yeshiva. This follows the opinion of Rabbi Shmuel Kamenetsky who provided the time of 35/36 minutes,
+ * but did not provide a degree-based time. Since this zman depends on the level of light, Rabbi Yaakov Shakow
+ * presented this degree-based calculations to Rabbi Kamenetsky who agreed to them.
+ *
+ * @return the Date
of misheyakir. 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 the {@link AstronomicalCalendar} documentation.
+ *
+ * @see #ZENITH_7_POINT_65
+ * @see #getMisheyakir9Point5Degrees()
+ */
+ getMisheyakir7Point65Degrees(): Temporal.ZonedDateTime | null;
+ /**
+ * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_9_POINT_5
+ * 9.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is based on Rabbi Dovid Kronglass's
+ * Calculation of 45 minutes in Baltimore as mentioned in Divrei Chachamim No. 24 brought down by the Birur Halacha, Tinyana, Ch. 18. This calculates to
+ * 9.5°. Also see Rabbi Yaakov Yitzchok Neiman in Kovetz
+ * Eitz Chaim Vol. 9, p. 202 that the Vya'an Yosef did not want to rely on times earlier than 45 minutes in New York. This
+ * zman is also used in the calendars published by Rabbi Hershel Edelstein. As mentioned in Yisroel Vehazmanim,
+ * Rabbi Edelstein who was given the 45 minute zman by Rabbi Bick. The calendars published by the Edot Hamizrach communities also use this zman. This also
+ * follows the opinion of Rabbi Shmuel Kamenetsky who provided
+ * the time of 36 and 45 minutes, but did not provide a degree-based time. Since this zman depends on the level of
+ * light, Rabbi Yaakov Shakow presented these degree-based times to Rabbi Shmuel Kamenetsky who agreed to them.
+ *
+ * @return the Date
of misheyakir. 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 the {@link AstronomicalCalendar} documentation.
+ *
+ * @see #ZENITH_9_POINT_5
+ * @see #getMisheyakir7Point65Degrees()
*/
- getTzais16Point1Degrees(): Temporal.ZonedDateTime | null;
+ getMisheyakir9Point5Degrees(): Temporal.ZonedDateTime | null;
/**
- * This method should be used lechumra only and returns tzais based on when the sun is 26°
- * below the horizon.For information on how this is calculated see the comments on {@link #getAlos26Degrees()}.
- * Since the zman is extremely late and at a point when it is long past the 18° point where the
- * darkest point is reached, it should only be used lechumra such as delaying the start of nighttime
- * mitzvos.
+ * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
+ * opinion of the Magen Avraham (MGA) based on
+ * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise() sunrise}. This
+ * time is 3 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link
+ * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall
+ * with both being 19.8° below sunrise or sunset. This returns the time of 3 *
+ * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.
*
- * @deprecated This method should be used lechumra only since it returns a very late time, and if used
- * lekula can result in chillul Shabbos etc. There is no current plan to remove this
- * method from the API, and this deprecation is intended to alert developers of the danger of using it.
+ * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis19Point8Degrees()
+ * @see #getAlos19Point8Degrees()
+ */
+ getSofZmanShmaMGA19Point8Degrees(): Temporal.ZonedDateTime | null;
+ /**
+ * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
+ * opinion of the Magen Avraham (MGA) based
+ * on alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time
+ * is 3 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after
+ * {@link #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from
+ * dawn to nightfall with both being 16.1° below sunrise or sunset. This returns the time of
+ * 3 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.
*
- * @return the Date
representing the time. 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 the {@link AstronomicalCalendar} documentation.
- * @see #getTzais120()
- * @see #getAlos26Degrees()
+ * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis16Point1Degrees()
+ * @see #getAlos16Point1Degrees()
*/
- getTzais26Degrees(): Temporal.ZonedDateTime | null;
+ getSofZmanShmaMGA16Point1Degrees(): Temporal.ZonedDateTime | null;
/**
- * For information on how this is calculated see the comments on {@link #getAlos18Degrees()}
+ * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
+ * opinion of the Magen Avraham (MGA) based
+ * on alos being {@link #getAlos18Degrees() 18°} before {@link #getSunrise() sunrise}. This time is 3
+ * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn}
+ * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°
+ * below sunrise or sunset. This returns the time of 3 * {@link #getShaahZmanis18Degrees()} after
+ * {@link #getAlos18Degrees() dawn}.
*
- * @return the Date
representing the time. 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 the {@link AstronomicalCalendar} documentation.
+ * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis18Degrees()
* @see #getAlos18Degrees()
*/
- getTzais18Degrees(): Temporal.ZonedDateTime | null;
+ getSofZmanShmaMGA18Degrees(): Temporal.ZonedDateTime | null;
/**
- * For information on how this is calculated see the comments on {@link #getAlos19Point8Degrees()}
+ * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
+ * opinion of the Magen Avraham (MGA) based on
+ * alos being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 3 {@link
+ * #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on the opinion
+ * of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to
+ * {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link
+ * #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to {@link
+ * #getSofZmanShmaMGA()} and is repeated here for clarity.
*
- * @return the Date
representing the time. 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 the {@link AstronomicalCalendar} documentation.
- * @see #getTzais90()
- * @see #getAlos19Point8Degrees()
+ * @return the Date
of the latest zman krias 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 the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis72Minutes()
+ * @see #getAlos72()
+ * @see #getSofZmanShmaMGA()
*/
- getTzais19Point8Degrees(): Temporal.ZonedDateTime | null;
+ getSofZmanShmaMGA72Minutes(): Temporal.ZonedDateTime | null;
/**
- * A method to return tzais (dusk) calculated as 96 minutes after sea level sunset. For information on how
- * this is calculated see the comments on {@link #getAlos96()}.
+ * This method returns the latest zman krias shema (time to recite Shema in the morning) according
+ * to the opinion of the Magen Avraham (MGA) based
+ * on alos being {@link #getAlos72Zmanis() 72} minutes zmaniyos, or 1/10th of the day before
+ * {@link #getSunrise() sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos}
+ * (solar hours) after {@link #getAlos72Zmanis() dawn} based on the opinion of the MGA that the day is calculated
+ * from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmaniyos, or 1/10th of the day before
+ * {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getTzais72Zmanis() nightfall} of 72 minutes
+ * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 3 *
+ * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.
*
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
- * @see #getAlos96()
+ * @return the Date
of the latest zman krias 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 the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis72MinutesZmanis()
+ * @see #getAlos72Zmanis()
*/
- getTzais96(): Temporal.ZonedDateTime | undefined;
+ getSofZmanShmaMGA72MinutesZmanis(): Temporal.ZonedDateTime | null;
/**
- * A method that returns the local time for fixed chatzos. This time is noon and midnight adjusted from
- * standard time to account for the local latitude. The 360° of the globe divided by 24 calculates to 15°
- * per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... Chatzos is at exactly 12:00
- * noon. This is the time of chatzos according to the Aruch Hashulchan in Orach Chaim 233:14 and Rabbi Moshe Feinstein in Igros Moshe Orach Chaim 1:24 and 2:20.
- * Lakewood, N.J., with a longitude of -74.2094, is 0.7906 away from the closest multiple of 15 at -75°. This
- * is multiplied by 4 to yield 3 minutes and 10 seconds for a chatzos of 11:56:50. This method is not tied
- * to the theoretical 15° timezones, but will adjust to the actual timezone and Daylight saving time.
+ * This method returns the latest zman krias shema (time to recite Shema in the morning) according
+ * to the opinion of the Magen Avraham (MGA) based on
+ * alos being {@link #getAlos90() 90} minutes before {@link #getSunrise() sunrise}. This time is 3
+ * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on
+ * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to
+ * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 3 *
+ * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}.
*
- * @return the Date representing the local chatzos
- * @see GeoLocation#getLocalMeanTimeOffset()
+ * @return the Date
of the latest zman krias 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 the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis90Minutes()
+ * @see #getAlos90()
*/
- getFixedLocalChatzos(): Temporal.ZonedDateTime | undefined;
- /**
- * A method that returns the latest zman krias shema (time to recite Shema in the morning) calculated as 3
- * clock hours before {@link #getFixedLocalChatzos()}. Note that there are opinions brought down in Yisrael Vehazmanim
- * page 57 and Rav Yitzchak Silber's Sha'aos Shavos Balalacha that this calculation is a mistake and regular
- * chatzos shoud be used for clock-hour calculations as opposed to fixed local chatzos. According to
- * these opinions it should be 3 clock hours before regular chatzos as calculated in {@link
- * #getSofZmanShma3HoursBeforeChatzos()}.
- *
- * @return the Date
of the latest zman krias shema calculated as 3 clock hours before
- * {@link #getFixedLocalChatzos()}.
- * @see #getFixedLocalChatzos()
- * @see #getSofZmanShma3HoursBeforeChatzos()
- * @see #getSofZmanTfilaFixedLocal()
- *
- * @deprecated This method of calculating sof zman Shma is considered a mistaken understanding of the proper
- * calculation of this zman in the opinion of Rav Yitzchak Silber's Sha'aos Shavos Balalacha. On pages 316-318 he discusses Rav Yisrael
- * Harfenes's calculations and points to his seeming agreement that using fixed local chatzos as the focal
- * point is problematic. See Yisrael Vehazmanim page 57. While the Yisrael Vehazmanim mentions
- * this issue in vol. 1, it was not corrected in the calculations in vol. 3 and other parts of the sefer.
- * A competent rabbinical authority should be consulted before using this zman. Instead, the use of {@link
- * #getSofZmanShma3HoursBeforeChatzos()} should be used to calculate sof zman Tfila using 3 fixed clock hours.
- * This will likely be removed in v3.0.
- */
- getSofZmanShmaFixedLocal(): Temporal.ZonedDateTime | undefined;
+ getSofZmanShmaMGA90Minutes(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman tfila (time to recite the morning prayers) calculated as 2 hours
- * before {@link #getFixedLocalChatzos()}. See the documentation on {@link #getSofZmanShmaFixedLocal()} showing
- * differing opinions on how the zman is calculated. According to many opinions {@link
- * #getSofZmanTfila2HoursBeforeChatzos()} should be used as opposed to this zman.
- *
- * @return the Date
of the latest zman tfila.
- * @see #getFixedLocalChatzos()
- * @see #getSofZmanShmaFixedLocal()
- * @see #getSofZmanTfila2HoursBeforeChatzos()
- *
- * @deprecated This method of calculating sof zman Tfila is considered a mistaken understanding of the proper
- * calculation of this zman in the opinion of Rav Yitzchak Silber's Sha'aos Shavos Balalacha. On pages 316-318 he discusses Rav Yisrael
- * Harfenes's calculations and points to his seeming agreement that using fixed local chatzos as the focal
- * point is problematic. See Yisrael Vehazmanim page 57. While the Yisrael Vehazmanim mentions
- * this issue in vol. 1, it was not corrected in the calculations in vol. 3 and other parts of the sefer.
- * A competent rabbinical authority should be consulted before using this zman. Instead, the use of {@link
- * #getSofZmanTfila2HoursBeforeChatzos()} should be used to calculate sof zman Tfila using 2 fixed
- * clock hours. This will likely be removed in v3.0.
- */
- getSofZmanTfilaFixedLocal(): Temporal.ZonedDateTime | undefined;
+ * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
+ * opinion of the Magen Avraham (MGA) based
+ * on alos being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise()
+ * sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after
+ * {@link #getAlos90Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link
+ * #getAlos90Zmanis() dawn} of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall}
+ * of 90 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis90MinutesZmanis()}
+ * after {@link #getAlos90Zmanis() dawn}.
+ *
+ * @return the Date
of the latest zman krias 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 the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis90MinutesZmanis()
+ * @see #getAlos90Zmanis()
+ */
+ getSofZmanShmaMGA90MinutesZmanis(): Temporal.ZonedDateTime | null;
/**
- * Returns the latest time of Kidush 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.
- * If the time of sof zman Kiddush Levana occurs during the day (between the alos and tzais passed in
- * as parameters), it returns the alos passed in. If a null alos or tzais are passed to this method,
- * the non-daytime adjusted time will be returned.
+ * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
+ * opinion of the Magen Avraham (MGA) based
+ * on alos being {@link #getAlos96() 96} minutes before {@link #getSunrise() sunrise}. This time is 3
+ * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on
+ * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before
+ * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link
+ * #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}.
*
- * @param alos
- * 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.
- * @param tzais
- * 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 parameter
- * are null, no daytime adjustment will be made.
- * @return the Date representing the moment halfway between molad and molad. If the time occurs between
- * alos and tzais, alos will be returned
- * @see #getSofZmanKidushLevanaBetweenMoldos()
- * @see #getSofZmanKidushLevana15Days(Date, Date)
- * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos()
+ * @return the Date
of the latest zman krias 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 the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis96Minutes()
+ * @see #getAlos96()
+ */
+ getSofZmanShmaMGA96Minutes(): Temporal.ZonedDateTime | null;
+ /**
+ * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
+ * opinion of the Magen Avraham (MGA) based
+ * on alos being {@link #getAlos90Zmanis() 96} minutes zmaniyos before {@link #getSunrise()
+ * sunrise}. This time is 3 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after
+ * {@link #getAlos96Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link
+ * #getAlos96Zmanis() dawn} of 96 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall}
+ * of 96 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis96MinutesZmanis()}
+ * after {@link #getAlos96Zmanis() dawn}.
+ *
+ * @return the Date
of the latest zman krias 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 the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis96MinutesZmanis()
+ * @see #getAlos96Zmanis()
*/
- getSofZmanKidushLevanaBetweenMoldos(alos: Temporal.ZonedDateTime, tzais: Temporal.ZonedDateTime): Temporal.ZonedDateTime | null;
+ getSofZmanShmaMGA96MinutesZmanis(): Temporal.ZonedDateTime | null;
/**
- * Returns the Date of the molad based time if it occurs on the current date. Since Kiddush Levana
- * can only be said during the day, there are parameters to limit it to between alos and tzais. If
- * the time occurs between alos and tzais, tzais will be returned.
+ * This method returns the latest zman krias shema (time to recite Shema in the morning) calculated
+ * as 3 hours (regular clock hours and not sha'os zmaniyos) before {@link ZmanimCalendar#getChatzos()}.
+ * Generally known as part of the "Komarno" zmanim after Rav Yitzchak Eizik of
+ * Komarno, a proponent of this calculation, it actually predates him a lot. It is the opinion of the
+ * Shach in the Nekudas Hakesef (Yoreh Deah 184), Rav Moshe Lifshitz in his commentary
+ * Lechem Mishneh on Brachos 1:2. It is
+ * next brought down about 100 years later by the Yaavetz
+ * (in his siddur, Mor Uktziah Orach
+ * Chaim 1, Lechem Shamayim, Brachos 1:2
+ * and She'elos Yaavetz vol. 1 no. 40),
+ * Rav Yitzchak Eizik of Komarno in the Ma'aseh Oreg on Mishnayos Brachos 11:2, Shevus Yaakov, Chasan Sofer and others.
+ * See Yisrael Vehazmanim vol. 1 7:3, page 55 -
+ * 62. A variant of this calculation {@link #getSofZmanShmaFixedLocal()} uses {@link #getFixedLocalChatzos() fixed
+ * local chatzos} for calculating this type of zman.
*
- * @param moladBasedTime
- * the molad based time such as molad, tchilas and sof zman Kiddush Levana
- * @param alos
- * optional start of day to limit molad times to the end of the night before or beginning of the next night.
- * Ignored if either alos or tzais are null.
- * @param tzais
- * optional end of day to limit molad times to the end of the night before or beginning of the next night.
- * Ignored if either tzais or alos are null
- * @param techila
- * is it the start of Kiddush Levana time or the end? If it is start roll it to the next tzais, and
- * and if it is the end, return the end of the previous night (alos passed in). Ignored if either
- * alos or tzais are null.
- * @return the molad based time. If the zman does not occur during the current date, null will be returned.
+ * @return the Date
of the latest zman krias 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 the
+ * {@link AstronomicalCalendar} documentation.
+ * @see ZmanimCalendar#getChatzos()
+ * @see #getSofZmanShmaFixedLocal()
+ * @see #getSofZmanTfila2HoursBeforeChatzos()
*/
- private getMoladBasedTime;
+ getSofZmanShma3HoursBeforeChatzos(): Temporal.ZonedDateTime | undefined;
/**
- * Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the
- * opinion brought down in 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
- * {@link #getSofZmanKidushLevanaBetweenMoldos(Date, Date) 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. If the time of sof zman Kiddush Levana occurs during
- * the day (between the alos and tzais passed in as parameters), it returns the alos passed in. If a
- * null alos or tzais are passed to this method, the non-daytime adjusted time will be returned.
+ * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
+ * opinion of the Magen Avraham (MGA) based
+ * on alos being {@link #getAlos120() 120} minutes or 1/6th of the day before {@link #getSunrise() sunrise}.
+ * This time is 3 {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120()
+ * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120 minutes
+ * before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of 3
+ * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman that
+ * is very much a chumra.
*
- * @param alos
- * 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.
- * @param tzais
- * 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.
+ * @return the Date
of the latest zman krias 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 the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis120Minutes()
+ * @see #getAlos120()
+ */
+ getSofZmanShmaMGA120Minutes(): Temporal.ZonedDateTime | null;
+ /**
+ * This method returns the latest zman krias shema (time to recite Shema in the morning) based
+ * on the opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at
+ * {@link #getSeaLevelSunset() sea level sunset}. This is the opinion of the \u05D7\u05D9\u05D3\u05D5\u05E9\u05D9
+ * \u05D5\u05DB\u05DC\u05DC\u05D5\u05EA \u05D4\u05E8\u05D6\u05F4\u05D4 and the \u05DE\u05E0\u05D5\u05E8\u05D4 \u05D4\u05D8\u05D4\u05D5\u05E8\u05D4 as
+ * mentioned by Yisrael Vehazmanim vol 1, sec. 7,
+ * ch. 3 no. 16. Three shaos zmaniyos are calculated based on this day and added to {@link
+ * #getAlos16Point1Degrees() alos} to reach this time. This time is 3 shaos zmaniyos (solar hours)
+ * after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link
+ * #getAlos16Point1Degrees() alos 16.1°} to {@link #getSeaLevelSunset() sea level sunset}.
+ * Note: Based on this calculation chatzos will not be at midday.
*
- * @return the Date representing the moment 15 days after the molad. If the time occurs between alos and
- * tzais, alos will be returned
+ * @return the Date
of the latest zman krias shema based on this day. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getAlos16Point1Degrees()
+ * @see #getSeaLevelSunset()
+ */
+ getSofZmanShmaAlos16Point1ToSunset(): Temporal.ZonedDateTime | null;
+ /**
+ * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the
+ * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at
+ * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}. 3 shaos zmaniyos are calculated
+ * based on this day and added to {@link #getAlos16Point1Degrees() alos} to reach this time. This time is 3
+ * shaos zmaniyos (temporal hours) after {@link #getAlos16Point1Degrees() alos 16.1°} based on
+ * the opinion that the day is calculated from a {@link #getAlos16Point1Degrees() alos 16.1°} to
+ * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}.
+ * Note: Based on this calculation chatzos will not be at midday.
*
- * @see #getSofZmanKidushLevanaBetweenMoldos(Date, Date)
- * @see JewishCalendar#getSofZmanKidushLevana15Days()
+ * @return the Date
of the latest zman krias shema based on this calculation. 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 the {@link AstronomicalCalendar}
+ * documentation.
+ * @see #getAlos16Point1Degrees()
+ * @see #getTzaisGeonim7Point083Degrees()
*/
- getSofZmanKidushLevana15Days(alos?: Temporal.ZonedDateTime | null, tzais?: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
+ getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null;
/**
- * Returns the earliest time of Kiddush Levana according to 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.
+ * From the GRA in Kol Eliyahu on Berachos #173 that states that zman krias shema is calculated as half the
+ * time from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getFixedLocalChatzos() fixed local chatzos}.
+ * The GRA himself seems to contradict this when he stated that zman krias shema is 1/4 of the day from
+ * sunrise to sunset. See Sarah Lamoed #25 in Yisroel Vehazmanim Vol. III page 1016.
*
- * @param alos
- * 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.
- * @param tzais
- * 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.
+ * @return the Date
of the latest zman krias shema based on this calculation. 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 {@link AstronomicalCalendar} documentation.
+ * @see #getFixedLocalChatzos()
*
- * @return the Date representing the moment 3 days after the molad. If the time occurs between alos and
- * tzais, tzais will be returned
- * @see #getTchilasZmanKidushLevana3Days()
- * @see #getTchilasZmanKidushLevana7Days(Date, Date)
- * @see JewishCalendar#getTchilasZmanKidushLevana3Days()
+ * @deprecated As per a conversation Rabbi Yisroel Twerski had with Rabbi Harfenes, this zman published in
+ * the Yisrael Vehazmanim was based on a misunderstanding and should not be used. This deprecated method
+ * will be removed (likely in KosherJava v3.0) pending confirmation from Rabbi Harfenes.
*/
- getTchilasZmanKidushLevana3Days(alos?: Temporal.ZonedDateTime | null, tzais?: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
+ getSofZmanShmaKolEliyahu(): Temporal.ZonedDateTime | null;
/**
- * Returns the point in time of Molad as a Date
Object. For the traditional day of week, hour,
- * minute and chalakim, {@link JewishCalendar#getMoladAsDate()} and the not yet completed
- * {@link HebrewDateFormatter} that will have formatting for this.
+ * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
+ * of the Magen Avraham (MGA) based on
+ * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise() sunrise}. This time
+ * is 4 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link
+ * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to
+ * nightfall with both being 19.8° below sunrise or sunset. This returns the time of 4 * {@link
+ * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.
*
- * @return the Date representing the moment of the molad. If the molad does not occur on this day, a null will be returned.
+ * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
*
- * @see #getTchilasZmanKidushLevana3Days()
- * @see #getTchilasZmanKidushLevana7Days(Date, Date)
- * @see JewishCalendar#getMoladAsDate()
+ * @see #getShaahZmanis19Point8Degrees()
+ * @see #getAlos19Point8Degrees()
*/
- getZmanMolad(): Temporal.ZonedDateTime | null;
+ getSofZmanTfilaMGA19Point8Degrees(): Temporal.ZonedDateTime | null;
/**
- * Used by Molad based zmanim to determine if zmanim occur during the current day.
- * @see #getMoladBasedTime(Date, Date, Date, boolean)
- * @return previous midnight
+ * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
+ * of the Magen Avraham (MGA) based on
+ * alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time
+ * is 4 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link
+ * #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to
+ * nightfall with both being 16.1° below sunrise or sunset. This returns the time of 4 * {@link
+ * #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.
+ *
+ * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getShaahZmanis16Point1Degrees()
+ * @see #getAlos16Point1Degrees()
*/
- private getMidnightLastNight;
+ getSofZmanTfilaMGA16Point1Degrees(): Temporal.ZonedDateTime | null;
/**
- * Used by Molad based zmanim to determine if zmanim occur during the current day.
- * @see #getMoladBasedTime(Date, Date, Date, boolean)
- * @return following midnight
+ * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
+ * of the Magen Avraham (MGA) based on
+ * alos being {@link #getAlos18Degrees() 18°} before {@link #getSunrise() sunrise}. This time is 4
+ * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn}
+ * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°
+ * below sunrise or sunset. This returns the time of 4 * {@link #getShaahZmanis18Degrees()} after
+ * {@link #getAlos18Degrees() dawn}.
+ *
+ * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getShaahZmanis18Degrees()
+ * @see #getAlos18Degrees()
*/
- private getMidnightTonight;
+ getSofZmanTfilaMGA18Degrees(): Temporal.ZonedDateTime | null;
/**
- * Returns the earliest time of Kiddush Levana according to the opinions that it should not be said until 7
- * days after the molad. If the time of tchilas zman Kiddush Levana occurs during the day (between
- * {@link ZmanimCalendar#getAlos72() alos} and {@link ZmanimCalendar#getTzais72() tzais}) it
- * return the next tzais.
- *
- * @param alos
- * 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.
- * @param tzais
- * 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.
+ * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
+ * of the Magen Avraham (MGA) based on
+ * alos being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 4
+ * {@link #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on
+ * the opinion of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before
+ * sunrise to {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 4 *
+ * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to
+ * {@link #getSofZmanTfilaMGA()} and is repeated here for clarity.
*
- * @return the Date representing the moment 7 days after the molad. If the time occurs between alos and
- * tzais, tzais will be returned
- * @see #getTchilasZmanKidushLevana3Days(Date, Date)
- * @see #getTchilasZmanKidushLevana7Days()
- * @see JewishCalendar#getTchilasZmanKidushLevana7Days()
+ * @return 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 the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis72Minutes()
+ * @see #getAlos72()
+ * @see #getSofZmanShmaMGA()
*/
- getTchilasZmanKidushLevana7Days(alos?: Temporal.ZonedDateTime | null, tzais?: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
+ getSofZmanTfilaMGA72Minutes(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest time one is allowed eating chametz on Erev Pesach according to
- * the opinion of theGRA. This time is identical to the {@link
- * #getSofZmanTfilaGRA() Sof zman tfilah GRA} and is provided as a convenience method for those who are
- * unaware how this zman is calculated. This time is 4 hours into the day based on the opinion of the
- * GRA that the day is calculated from sunrise to sunset.
- * This returns the time 4 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea level sunrise}.
+ * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the
+ * Magen Avraham (MGA) based on alos
+ * being {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is 4
+ * {@link #getShaahZmanis72MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos72Zmanis() dawn}
+ * based on the opinion of the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72
+ * minutes zmaniyos before sunrise to {@link #getTzais72Zmanis() nightfall} of 72 minutes zmaniyos
+ * after sunset. This returns the time of 4 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.
*
- * @see ZmanimCalendar#getShaahZmanisGra()
- * @see ZmanimCalendar#getSofZmanTfilaGRA()
- * @return the Date
one is allowed eating chametz on Erev Pesach. 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
+ * @return the Date
of the latest zman krias 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 the
* {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis72MinutesZmanis()
+ * @see #getAlos72Zmanis()
*/
- getSofZmanAchilasChametzGRA(): Temporal.ZonedDateTime | null;
+ getSofZmanTfilaMGA72MinutesZmanis(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the
- * opinion of the Magen Avraham (MGA) based on alos
- * being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is identical to the
- * {@link #getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link #getShaahZmanisMGA()
- * shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of the MGA that the day is
- * calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link #getTzais72() nightfall} of 72 minutes
- * after sunset. This returns the time of 4 * {@link #getShaahZmanisMGA()} after {@link #getAlos72() dawn}.
+ * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
+ * of the Magen Avraham (MGA) based on
+ * alos being {@link #getAlos90() 90} minutes before {@link #getSunrise() sunrise}. This time is 4
+ * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on
+ * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to
+ * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 4 *
+ * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}.
*
- * @return the Date
of the latest time of eating chametz. 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
+ * @return 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 the
* {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanisMGA()
- * @see #getAlos72()
- * @see #getSofZmanTfilaMGA72Minutes()
+ * @see #getShaahZmanis90Minutes()
+ * @see #getAlos90()
*/
- getSofZmanAchilasChametzMGA72Minutes(): Temporal.ZonedDateTime | null;
+ getSofZmanTfilaMGA90Minutes(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the
- * opinion of theMagen Avraham (MGA) based on alos
- * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time is 4 {@link
- * #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees() dawn}
- * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1°
- * below sunrise or sunset. This returns the time of 4 {@link #getShaahZmanis16Point1Degrees()} after
- * {@link #getAlos16Point1Degrees() dawn}.
- *
- * @return the Date
of the latest time of eating chametz. 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 the {@link AstronomicalCalendar} documentation.
+ * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the
+ * Magen Avraham (MGA) based on alos
+ * being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is
+ * 4 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos90Zmanis()
+ * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos90Zmanis() dawn}
+ * of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall} of 90 minutes
+ * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis90MinutesZmanis()} after
+ * {@link #getAlos90Zmanis() dawn}.
*
- * @see #getShaahZmanis16Point1Degrees()
- * @see #getAlos16Point1Degrees()
- * @see #getSofZmanTfilaMGA16Point1Degrees()
+ * @return the Date
of the latest zman krias 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 the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis90MinutesZmanis()
+ * @see #getAlos90Zmanis()
*/
- getSofZmanAchilasChametzMGA16Point1Degrees(): Temporal.ZonedDateTime | null;
+ getSofZmanTfilaMGA90MinutesZmanis(): Temporal.ZonedDateTime | null;
/**
- * 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 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea
- * level sunrise}.
+ * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
+ * of the Magen Avraham (MGA) based on
+ * alos being {@link #getAlos96() 96} minutes before {@link #getSunrise() sunrise}. This time is 4
+ * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on
+ * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before
+ * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 4 *
+ * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}.
*
- * @see ZmanimCalendar#getShaahZmanisGra()
- * @return the Date
of the latest time for burning chametz on Erev Pesach. 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 {@link AstronomicalCalendar} documentation.
+ * @return 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 the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis96Minutes()
+ * @see #getAlos96()
*/
- getSofZmanBiurChametzGRA(): Temporal.ZonedDateTime | null;
+ getSofZmanTfilaMGA96Minutes(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of
- * the Magen Avraham (MGA) based on alos
- * being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 5 {@link
- * #getShaahZmanisMGA() shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of
- * the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link
- * #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link #getShaahZmanisMGA()} after
- * {@link #getAlos72() dawn}.
+ * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the
+ * Magen Avraham (MGA) based on alos
+ * being {@link #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is
+ * 4 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos96Zmanis()
+ * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos96Zmanis() dawn}
+ * of 96 minutes zmaniyos before sunrise to {@link #getTzais96Zmanis() nightfall} of 96 minutes
+ * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis96MinutesZmanis()} after
+ * {@link #getAlos96Zmanis() dawn}.
+ *
+ * @return the Date
of the latest zman krias 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 the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis90MinutesZmanis()
+ * @see #getAlos90Zmanis()
+ */
+ getSofZmanTfilaMGA96MinutesZmanis(): Temporal.ZonedDateTime | null;
+ /**
+ * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
+ * of the Magen Avraham (MGA) based on
+ * alos being {@link #getAlos120() 120} minutes before {@link #getSunrise() sunrise} . This time is 4
+ * {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120() dawn}
+ * based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120
+ * minutes before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of
+ * 4 * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman
+ * that is very much a chumra.
*
- * @return the Date
of the latest time for burning chametz on Erev Pesach. 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
+ * @return the Date
of the latest zman krias 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 the
* {@link AstronomicalCalendar} documentation.
- * @see #getShaahZmanisMGA()
- * @see #getAlos72()
+ * @see #getShaahZmanis120Minutes()
+ * @see #getAlos120()
*/
- getSofZmanBiurChametzMGA72Minutes(): Temporal.ZonedDateTime | null;
+ getSofZmanTfilaMGA120Minutes(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest time for burning chametz on Erev Pesach according to the opinion
- * of the Magen Avraham (MGA) based on alos
- * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time is 5
- * {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees()
- * dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1°
- * below sunrise or sunset. This returns the time of 5 {@link #getShaahZmanis16Point1Degrees()} after
- * {@link #getAlos16Point1Degrees() dawn}.
- *
- * @return the Date
of the latest time for burning chametz on Erev Pesach. 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 the {@link AstronomicalCalendar} documentation.
+ * This method returns the latest zman tfila (time to recite the morning prayers) calculated as 2 hours
+ * before {@link ZmanimCalendar#getChatzos()}. This is based on the opinions that calculate
+ * sof zman krias shema as {@link #getSofZmanShma3HoursBeforeChatzos()}. This returns the time of 2 hours
+ * before {@link ZmanimCalendar#getChatzos()}.
*
- * @see #getShaahZmanis16Point1Degrees()
- * @see #getAlos16Point1Degrees()
+ * @return the Date
of the latest zman krias 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 the
+ * {@link AstronomicalCalendar} documentation.
+ * @see ZmanimCalendar#getChatzos()
+ * @see #getSofZmanShma3HoursBeforeChatzos()
*/
- getSofZmanBiurChametzMGA16Point1Degrees(): Temporal.ZonedDateTime | null;
+ getSofZmanTfila2HoursBeforeChatzos(): Temporal.ZonedDateTime | undefined;
/**
- * A method that returns the Baal Hatanya's
- * netz amiti (sunrise) without {@link AstronomicalCalculator#getElevationAdjustment(double)
- * elevation adjustment}. This forms the base for the Baal Hatanya's dawn-based calculations that are
- * calculated as a dip below the horizon before sunrise.
- *
- * According to the Baal Hatanya, netz amiti, or true (halachic) sunrise, is when the top of the sun's
- * disk is visible at an elevation similar to the mountains of Eretz Yisrael. The time is calculated as the point at which
- * the center of the sun's disk is 1.583° below the horizon. This degree-based calculation can be found in Rabbi Shalom
- * DovBer Levine's commentary on The Baal
- * Hatanya's Seder Hachnasas Shabbos. From an elevation of 546 meters, the top of Har Hacarmel, the sun disappears when it is 1° 35' or 1.583°
- * below the sea level horizon. This in turn is based on the Gemara Shabbos 35a. There are other opinions brought down by
- * Rabbi Levine, including Rabbi Yosef Yitzchok Feigelstock who calculates it as the degrees below the horizon 4 minutes after
- * sunset in Yerushalayim (on the equinox). That is brought down as 1.583°. This is identical to the 1° 35' zman
- * and is probably a typo and should be 1.683°. These calculations are used by most Chabad calendars that use the Baal Hatanya's zmanim. See
- * About Our
- * Zmanim Calculations @ Chabad.org.
+ * This method returns mincha gedola calculated as 30 minutes after {@link #getChatzos() chatzos}
+ * and not 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} after {@link #getChatzos() chatzos} as
+ * calculated by {@link #getMinchaGedola}. Some use this time to delay the start of mincha in the winter when
+ * 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is less than 30 minutes. See
+ * {@link #getMinchaGedolaGreaterThan30()} for a convenience method that returns the later of the 2 calculations. One
+ * should not use this time to start mincha before the standard {@link #getMinchaGedola() mincha gedola}.
+ * See Shulchan Aruch Orach Chayim 234:1 and
+ * the Shaar Hatziyon seif katan ches.
*
- * Note: netz amiti is used only for calculating certain zmanim, and is intentionally unpublished. For
- * practical purposes, daytime mitzvos like shofar and lulav should not be done until after the
- * published time for netz / sunrise.
+ * @return the Date
of 30 minutes after chatzos. 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
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getMinchaGedola()
+ * @see #getMinchaGedolaGreaterThan30()
+ */
+ getMinchaGedola30Minutes(): Temporal.ZonedDateTime | undefined;
+ /**
+ * 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. For
+ * more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is
+ * calculated as 6.5 {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *
+ * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}.
*
- * @return the Date
representing the exact sea-level netz amiti (sunrise) 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 page.
+ * @see #getAlos72()
+ * @see #getMinchaGedola()
+ * @see #getMinchaKetana()
+ * @see ZmanimCalendar#getMinchaGedola()
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
+ */
+ getMinchaGedola72Minutes(): Temporal.ZonedDateTime | null;
+ /**
+ * This method returns the time of mincha gedola according to the Magen Avraham with the day starting and
+ * ending 16.1° below the horizon. This is the earliest time to pray mincha. For more information on
+ * this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is calculated as 6.5
+ * {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *
+ * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}.
*
- * @see #getSunrise()
- * @see #getSeaLevelSunrise()
- * @see #getSunsetBaalHatanya()
- * @see #ZENITH_1_POINT_583
+ * @see #getShaahZmanis16Point1Degrees()
+ * @see #getMinchaGedola()
+ * @see #getMinchaKetana()
+ * @return the Date
of the time of mincha gedola. 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 the {@link AstronomicalCalendar} documentation.
*/
- private getSunriseBaalHatanya;
+ getMinchaGedola16Point1Degrees(): Temporal.ZonedDateTime | null;
/**
- * A method that returns the Baal Hatanya's
- * shkiah amiti (sunset) without {@link AstronomicalCalculator#getElevationAdjustment(double)
- * elevation adjustment}. This forms the base for the Baal Hatanya's dusk-based calculations that are calculated
- * as a dip below the horizon after sunset.
- *
- * According to the Baal Hatanya, shkiah amiti, true (halachic) sunset, is when the top of the
- * sun's disk disappears from view at an elevation similar to the mountains of Eretz Yisrael.
- * This time is calculated as the point at which the center of the sun's disk is 1.583 degrees below the horizon.
- *
- * Note: shkiah amiti is used only for calculating certain zmanim, and is intentionally unpublished. For
- * practical purposes, all daytime mitzvos should be completed before the published time for shkiah / sunset.
- *
- * For further explanation of the calculations used for the Baal Hatanya's zmanim in this library, see
- * About Our
- * Zmanim Calculations @ Chabad.org.
+ * This method returns the time of mincha gedola based on the opinion of Rabbi Yaakov Moshe Hillel as published in the luach
+ * of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that mincha gedola is calculated as half a shaah
+ * zmanis after chatzos with shaos zmaniyos calculated based on a day starting 72 minutes befoe sunrise
+ * {@link #getAlos16Point1Degrees() alos 16.1°} and ending 13.5 minutes after sunset {@link
+ * #getTzaisGeonim3Point7Degrees() tzais 3.7°}. Mincha gedola is the earliest time to pray mincha.
+ * The later of this time or 30 clock minutes after chatzos is returned. See {@link #getMinchaGedolaGreaterThan30()}
+ * (though that calculation is based on mincha gedola GRA).
+ * For more information about mincha gedola see the documentation on {@link #getMinchaGedola() mincha gedola}.
*
- * @return the Date
representing the exact sea-level shkiah amiti (sunset) 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
- * {@link AstronomicalCalendar} documentation.
+ * @return the Date
of the mincha gedola. 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 the {@link AstronomicalCalendar} documentation.
*
- * @see #getSunset()
- * @see #getSeaLevelSunset()
- * @see #getSunriseBaalHatanya()
- * @see #ZENITH_1_POINT_583
+ * @see #getAlos16Point1Degrees()
+ * @see #getTzaisGeonim3Point7Degrees()
+ * @see #getShaahZmanisAlos16Point1ToTzais3Point7()
+ * @see #getMinchaGedolaGreaterThan30()
*/
- private getSunsetBaalHatanya;
+ getMinchaGedolaAhavatShalom(): Temporal.ZonedDateTime | null;
/**
- * A method that returns the Baal Hatanya's
- * a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}). This forms the base for the
- * Baal Hatanya's day based calculations that are calculated as a 1.583° dip below the horizon after sunset.
- * According to the Baal Hatanya, shkiah amiti, true (halachic) sunset, is when the top of the
- * sun's disk disappears from view at an elevation similar to the mountains of Eretz Yisrael.
- * This time is calculated as the point at which the center of the sun's disk is 1.583 degrees below the horizon.
- * A method that returns a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}) calculated
- * based on the Baal Hatanya's netz
- * amiti and shkiah amiti using a dip of 1.583° below the sea level horizon. This calculation divides
- * the day based on the opinion of the Baal Hatanya that the day runs from {@link #getSunriseBaalHatanya() netz amiti}
- * to {@link #getSunsetBaalHatanya() shkiah amiti}. The calculations are based on a day from {@link
- * #getSunriseBaalHatanya() sea level netz amiti} to {@link #getSunsetBaalHatanya() sea level shkiah amiti}.
- * The day is split into 12 equal parts with each one being a shaah zmanis. This method is similar to {@link
- * #getTemporalHour}, but all calculations are based on a sea level sunrise and sunset.
- * @return the long
millisecond length of a shaah zmanis calculated from
- * {@link #getSunriseBaalHatanya() netz amiti (sunrise)} to {@link #getSunsetBaalHatanya() shkiah amiti
- * ("real" 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, {@link Long#MIN_VALUE} will be returned. See
- * detailed explanation on top of the {@link AstronomicalCalendar} documentation.
+ * This is a convenience method that returns the later of {@link #getMinchaGedola()} and
+ * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is
+ * less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise {@link #getMinchaGedola()}
+ * will be returned.
*
- * @see #getTemporalHour(Date, Date)
- * @see #getSunriseBaalHatanya()
- * @see #getSunsetBaalHatanya()
- * @see #ZENITH_1_POINT_583
+ * @return the Date
of the later of {@link #getMinchaGedola()} and {@link #getMinchaGedola30Minutes()}.
+ * 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 {@link AstronomicalCalendar} documentation.
*/
- getShaahZmanisBaalHatanya(): Temporal.Duration | undefined;
+ getMinchaGedolaGreaterThan30(): Temporal.ZonedDateTime | null;
/**
- * Returns the Baal Hatanya's alos
- * (dawn) calculated as the time when the sun is 16.9° below the eastern {@link #GEOMETRIC_ZENITH geometric horizon}
- * before {@link #getSunrise sunrise}. For more information the source of 16.9° see {@link #ZENITH_16_POINT_9}.
+ * This method returns the time of mincha ketana according to the Magen Avraham with the day starting and
+ * ending 16.1° below the horizon. This is the preferred earliest time to pray mincha according to the
+ * opinion of the Rambam and others. For more information on
+ * this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is calculated as 9.5
+ * {@link #getTemporalHour() solar hours} after alos. The calculation used is 9.5 *
+ * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}.
*
- * @see #ZENITH_16_POINT_9
- * @return 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis16Point1Degrees()
+ * @see #getMinchaGedola()
+ * @see #getMinchaKetana()
+ * @return the Date
of the time of mincha ketana. 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 the {@link AstronomicalCalendar} documentation.
*/
- getAlosBaalHatanya(): Temporal.ZonedDateTime | null;
+ getMinchaKetana16Point1Degrees(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest zman krias shema (time to recite Shema in the morning). This time is 3
- * {@link #getShaahZmanisBaalHatanya() shaos zmaniyos} (solar hours) after {@link #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 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya()
- * netz amiti (sunrise)}.
+ * This method returns the time of mincha ketana based on the opinion of Rabbi Yaakov Moshe Hillel as published in the luach
+ * of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that mincha ketana is calculated as 2.5 shaos
+ * zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos zmaniyos
+ * calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and ending at
+ * tzais 3.8°. Mincha ketana is the preferred earliest time to pray mincha according to
+ * the opinion of the Rambam and others. For more information
+ * on this see the documentation on {@link #getMinchaKetana() mincha ketana}.
*
- * @see ZmanimCalendar#getSofZmanShma(Date, Date)
- * @see #getShaahZmanisBaalHatanya()
- * @return 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. See detailed explanation on top of the
- * {@link AstronomicalCalendar} documentation.
+ * @return the the Date
of the time of mincha ketana. 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 the {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getShaahZmanisAlos16Point1ToTzais3Point8()
+ * @see #getMinchaGedolaAhavatShalom()
+ * @see #getPlagAhavatShalom()
*/
- getSofZmanShmaBaalHatanya(): Temporal.ZonedDateTime | null;
+ getMinchaKetanaAhavatShalom(): Temporal.ZonedDateTime | undefined;
/**
- * 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 * {@link #getShaahZmanisBaalHatanya()} after
- * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.
+ * 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. For more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}.
+ * This is calculated as 9.5 {@link #getShaahZmanis72Minutes()} after alos. The calculation used is 9.5 *
+ * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}.
*
- * @see ZmanimCalendar#getSofZmanTfila(Date, Date)
- * @see #getShaahZmanisBaalHatanya()
- * @return 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 the {@link AstronomicalCalendar}
+ * @see #getShaahZmanis16Point1Degrees()
+ * @see #getMinchaGedola()
+ * @see #getMinchaKetana()
+ * @return 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 the {@link AstronomicalCalendar}
* documentation.
*/
- getSofZmanTfilaBaalHatanya(): Temporal.ZonedDateTime | null;
+ getMinchaKetana72Minutes(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the
- * opinion of the Baal Hatanya. This time is identical to the {@link #getSofZmanTfilaBaalHatanya() Sof zman tfilah
- * Baal Hatanya}. 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 {@link #getShaahZmanisBaalHatanya()} after
- * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.
+ * This method returns the time of plag hamincha according to the Magen Avraham with the day starting 60
+ * minutes before sunrise and ending 60 minutes after sunset. This is calculated as 10.75 hours after
+ * {@link #getAlos60() dawn}. The formula used is 10.75 {@link #getShaahZmanis60Minutes()} after {@link #getAlos60()}.
*
- * @see #getShaahZmanisBaalHatanya()
- * @see #getSofZmanTfilaBaalHatanya()
- * @return the Date
one is allowed eating chametz on Erev Pesach. 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
+ * @return 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 the
* {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getShaahZmanis60Minutes()
+ * @see #getAlos60()
+ * @see #getTzais60()
*/
- getSofZmanAchilasChametzBaalHatanya(): Temporal.ZonedDateTime | null;
+ getPlagHamincha60Minutes(): Temporal.ZonedDateTime | null;
/**
- * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of
- * the Baal Hatanya. This time is 5 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 5 * {@link #getShaahZmanisBaalHatanya()} after
- * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.
+ * This method should be used lechumra only and returns the time of plag hamincha according to the
+ * Magen Avraham with the day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is calculated
+ * as 10.75 hours after {@link #getAlos72() dawn}. The formula used is 10.75 {@link #getShaahZmanis72Minutes()} after
+ * {@link #getAlos72()}. Since plag by this calculation can occur after sunset, it should only be used
+ * lechumra.
*
- * @see #getShaahZmanisBaalHatanya()
- * @return the Date
of the latest time for burning chametz on Erev Pesach. 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
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
+ *
+ * @return 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 the
* {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getShaahZmanis72Minutes()
*/
- getSofZmanBiurChametzBaalHatanya(): Temporal.ZonedDateTime | null;
+ getPlagHamincha72Minutes(): Temporal.ZonedDateTime | null;
/**
- * 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 {@link #getMinchaKetanaBaalHatanya() 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 is calculated as 6.5 {@link #getShaahZmanisBaalHatanya()
- * sea level solar hours} after {@link #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
- * * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() netz amiti ("real" sunrise)}.
+ * This method should be used lechumra only and returns the time of plag hamincha according to the
+ * Magen Avraham with the day starting 90 minutes before sunrise and ending 90 minutes after sunset. This is calculated
+ * as 10.75 hours after {@link #getAlos90() dawn}. The formula used is 10.75 {@link #getShaahZmanis90Minutes()} after
+ * {@link #getAlos90()}. Since plag by this calculation can occur after sunset, it should only be used
+ * lechumra.
*
- * @see #getMinchaGedola(Date, Date)
- * @see #getShaahZmanisBaalHatanya()
- * @see #getMinchaKetanaBaalHatanya()
- * @return the Date
of the time of mincha gedola. If the calculation can't be computed such as
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
+ *
+ * @return 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 the {@link AstronomicalCalendar}
- * documentation.
- */
- getMinchaGedolaBaalHatanya(): Temporal.ZonedDateTime | null;
- /**
- * This is a convenience method that returns the later of {@link #getMinchaGedolaBaalHatanya()} and
- * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisBaalHatanya()
- * shaah zmanis} is less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise
- * {@link #getMinchaGedolaBaalHatanya()} will be returned.
+ * does not set, a null will be returned. See detailed explanation on top of the
+ * {@link AstronomicalCalendar} documentation.
*
- * @return the Date
of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}.
- * 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 {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis90Minutes()
*/
- getMinchaGedolaBaalHatanyaGreaterThan30(): Temporal.ZonedDateTime | null;
+ getPlagHamincha90Minutes(): Temporal.ZonedDateTime | null;
/**
- * 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 {@link #getMinchaGedolaBaalHatanya() mincha gedola}.
- * This is calculated as 9.5 {@link #getShaahZmanisBaalHatanya() sea level solar hours} after {@link #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 * {@link #getShaahZmanisBaalHatanya()} after {@link
- * #getSunriseBaalHatanya() netz amiti (sunrise)}.
+ * This method should be used lechumra only and returns the time of plag hamincha according to the Magen
+ * Avraham with the day starting 96 minutes before sunrise and ending 96 minutes after sunset. This is calculated as 10.75
+ * hours after {@link #getAlos96() dawn}. The formula used is 10.75 {@link #getShaahZmanis96Minutes()} after
+ * {@link #getAlos96()}. Since plag by this calculation can occur after sunset, it should only be used
+ * lechumra.
+ *
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
*
- * @see #getMinchaKetana(Date, Date)
- * @see #getShaahZmanisBaalHatanya()
- * @see #getMinchaGedolaBaalHatanya()
- * @return the Date
of the time of mincha ketana. If the calculation can't be computed such as
+ * @return 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 the {@link AstronomicalCalendar}
- * documentation.
+ * does not set, a null will be returned. See detailed explanation on top of the
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanis96Minutes()
*/
- getMinchaKetanaBaalHatanya(): Temporal.ZonedDateTime | null;
+ getPlagHamincha96Minutes(): Temporal.ZonedDateTime | null;
/**
- * 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 * {@link #getShaahZmanisBaalHatanya()} after
- * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.
+ * This method should be used lechumra only and returns the time of plag hamincha. This is calculated
+ * as 10.75 hours after {@link #getAlos96Zmanis() dawn}. The formula used is 10.75 * {@link
+ * #getShaahZmanis96MinutesZmanis()} after {@link #getAlos96Zmanis() dawn}. Since plag by this calculation can
+ * occur after sunset, it should only be used lechumra.
+ *
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
+ *
+ * @return 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 the
+ * {@link AstronomicalCalendar} documentation.
+ */
+ getPlagHamincha96MinutesZmanis(): Temporal.ZonedDateTime | null;
+ /**
+ * This method should be used lechumra only and returns the time of plag hamincha. This is calculated
+ * as 10.75 hours after {@link #getAlos90Zmanis() dawn}. The formula used is 10.75 * {@link
+ * #getShaahZmanis90MinutesZmanis()} after {@link #getAlos90Zmanis() dawn}. Since plag by this calculation can
+ * occur after sunset, it should only be used lechumra.
+ *
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
+ *
+ * @return 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 the
+ * {@link AstronomicalCalendar} documentation.
+ */
+ getPlagHamincha90MinutesZmanis(): Temporal.ZonedDateTime | null;
+ /**
+ * This method should be used lechumra only and returns the time of plag hamincha. This is calculated as
+ * 10.75 hours after {@link #getAlos72Zmanis()}. The formula used is 10.75 * {@link #getShaahZmanis72MinutesZmanis()} after
+ * {@link #getAlos72Zmanis() dawn}. Since plag by this calculation can occur after sunset, it should only be used
+ * lechumra.
+ *
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
*
- * @see #getPlagHamincha(Date, Date)
* @return 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 the
* {@link AstronomicalCalendar} documentation.
*/
- getPlagHaminchaBaalHatanya(): Temporal.ZonedDateTime | null;
+ getPlagHamincha72MinutesZmanis(): Temporal.ZonedDateTime | null;
/**
- * A method that returns tzais (nightfall) when the sun is 6° below the western geometric horizon
- * (90°) after {@link #getSunset sunset}. For information on the source of this calculation see
- * {@link #ZENITH_6_DEGREES}.
+ * This method should be used lechumra only and returns the time of plag hamincha based on the
+ * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link
+ * #getTzais16Point1Degrees() tzais 16.1°}. This is calculated as 10.75 hours zmaniyos
+ * after {@link #getAlos16Point1Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis16Point1Degrees()}
+ * after {@link #getAlos16Point1Degrees()}. Since plag by this calculation can occur after sunset, it
+ * should only be used lechumra.
*
- * @return 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 the {@link AstronomicalCalendar} documentation.
- * @see #ZENITH_6_DEGREES
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
+ *
+ * @return the Date
of the time of plag hamincha. 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 the {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getShaahZmanis16Point1Degrees()
*/
- getTzaisBaalHatanya(): Temporal.ZonedDateTime | null;
+ getPlagHamincha16Point1Degrees(): Temporal.ZonedDateTime | null;
/**
- * A utility methos to calculate zmanim based on Rav Moshe
- * Feinstein as calculated in MTJ, Yeshiva of Staten Island, and Camp Yeshiva
- * of Staten Island. The day is split in two, from alos / sunrise to fixed local chatzos, and the
- * second half of the day, from fixed local chatzos to sunset / tzais. Morning based times are calculated
- * based on the first 6 hours, and afternoon times based on the second half of the day.
+ * This method should be used lechumra only and returns the time of plag hamincha based on the
+ * opinion that the day starts at {@link #getAlos19Point8Degrees() alos 19.8°} and ends at {@link
+ * #getTzais19Point8Degrees() tzais 19.8°}. This is calculated as 10.75 hours zmaniyos
+ * after {@link #getAlos19Point8Degrees() dawn}. The formula used is 10.75 * {@link
+ * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees()}. Since plag by this
+ * calculation can occur after sunset, it should only be used lechumra.
*
- * @param startOfHalfDay
- * The start of the half day. This would be alos or sunrise for morning based times and fixed
- * local chatzos for the second half of the day.
- * @param endOfHalfDay
- * The end of the half day. This would be fixed local chatzos for morning based times and sunset
- * or tzais for afternoon based times.
- * @param hours
- * the number of hours to offset the beginning of the first or second half of the day
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
*
- * @return the Date
of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}.
- * 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 {@link AstronomicalCalendar} documentation.
+ * @return the Date
of the time of plag hamincha. 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 the {@link AstronomicalCalendar} documentation.
*
- * @see ComplexZmanimCalendar#getFixedLocalChatzos()
+ * @see #getShaahZmanis19Point8Degrees()
*/
- getFixedLocalChatzosBasedZmanim(startOfHalfDay: Temporal.ZonedDateTime, endOfHalfDay: Temporal.ZonedDateTime, hours: number): Temporal.ZonedDateTime | null;
+ getPlagHamincha19Point8Degrees(): Temporal.ZonedDateTime | null;
/**
- * This method returns Rav Moshe Feinstein's opinion of the
- * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the
- * opinion of the Magen Avraham (MGA) that the
- * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts
- * at alos defined as {@link #getAlos18Degrees() 18°} and ends at {@link #getFixedLocalChatzos() fixed local
- * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after alos or half of this half-day.
+ * This method should be used lechumra only and returns the time of plag hamincha based on the
+ * opinion that the day starts at {@link #getAlos26Degrees() alos 26°} and ends at {@link
+ * #getTzais26Degrees() tzais 26°}. This is calculated as 10.75 hours zmaniyos after {@link
+ * #getAlos26Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis26Degrees()} after {@link
+ * #getAlos26Degrees()}. Since the zman based on an extremely early alos and a very late
+ * tzais, it should only be used lechumra.
*
- * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
- * @see #getAlos18Degrees()
- * @see #getFixedLocalChatzos()
- * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)
- */
- getSofZmanShmaMGA18DegreesToFixedLocalChatzos(): Temporal.ZonedDateTime | null;
- /**
- * This method returns Rav Moshe Feinstein's opinion of the
- * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the
- * opinion of the Magen Avraham (MGA) that the
- * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts
- * at alos defined as {@link #getAlos16Point1Degrees() 16.1°} and ends at {@link #getFixedLocalChatzos() fixed local
- * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or half of this half-day.
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
*
- * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
- * @see #getAlos16Point1Degrees()
- * @see #getFixedLocalChatzos()
- * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)
+ * @return the Date
of the time of plag hamincha. 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 the {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getShaahZmanis26Degrees()
+ * @see #getPlagHamincha120Minutes()
*/
- getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos(): Temporal.ZonedDateTime | null;
+ getPlagHamincha26Degrees(): Temporal.ZonedDateTime | null;
/**
- * This method returns Rav Moshe Feinstein's opinion of the
- * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the
- * opinion of the Magen Avraham (MGA) that the
- * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts
- * at alos defined as {@link #getAlos90() 90 minutes before sunrise} and ends at {@link #getFixedLocalChatzos()
- * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or
- * half of this half-day.
+ * This method should be used lechumra only and returns the time of plag hamincha based on the
+ * opinion that the day starts at {@link #getAlos18Degrees() alos 18°} and ends at {@link
+ * #getTzais18Degrees() tzais 18°}. This is calculated as 10.75 hours zmaniyos after {@link
+ * #getAlos18Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis18Degrees()} after {@link
+ * #getAlos18Degrees()}. Since plag by this calculation can occur after sunset, it should only be used
+ * lechumra.
*
- * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
- * @see #getAlos90()
- * @see #getFixedLocalChatzos()
- * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
+ *
+ * @return the Date
of the time of plag hamincha. 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 the {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getShaahZmanis18Degrees()
*/
- getSofZmanShmaMGA90MinutesToFixedLocalChatzos(): Temporal.ZonedDateTime | null;
+ getPlagHamincha18Degrees(): Temporal.ZonedDateTime | null;
/**
- * This method returns Rav Moshe Feinstein's opinion of the
- * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the
- * opinion of the Magen Avraham (MGA) that the
- * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts
- * at alos defined as {@link #getAlos72() 72 minutes before sunrise} and ends at {@link #getFixedLocalChatzos()
- * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or
- * half of this half-day.
+ * This method should be used lechumra only and returns the time of plag hamincha based on the opinion
+ * that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getSunset() sunset}.
+ * 10.75 shaos zmaniyos are calculated based on this day and added to {@link #getAlos16Point1Degrees()
+ * alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal hours) after {@link
+ * #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link #getAlos16Point1Degrees()
+ * dawn} of 16.1 degrees before sunrise to {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 10.75 *
+ * the calculated shaah zmanis after {@link #getAlos16Point1Degrees() dawn}. Since plag by this
+ * calculation can occur after sunset, it should only be used lechumra.
*
- * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
- * @see #getAlos72()
- * @see #getFixedLocalChatzos()
- * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
+ *
+ * @return the Date
of the plag. 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 the {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getAlos16Point1Degrees()
+ * @see #getSeaLevelSunset()
*/
- getSofZmanShmaMGA72MinutesToFixedLocalChatzos(): Temporal.ZonedDateTime | null;
+ getPlagAlosToSunset(): Temporal.ZonedDateTime | null;
/**
- * This method returns Rav Moshe Feinstein's opinion of the
- * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the
- * opinion of the GRA that the day is calculated from
- * sunrise to sunset, but calculated using the first half of the day only. The half a day starts at {@link #getSunrise()
- * sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman Shema is 3 shaos
- * zmaniyos (solar hours) after sunrise or half of this half-day.
+ * This method returns the time of plag hamincha based on the opinion that the day starts at
+ * {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getTzaisGeonim7Point083Degrees()
+ * tzais}. 10.75 shaos zmaniyos are calculated based on this day and added to {@link
+ * #getAlos16Point1Degrees() alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal
+ * hours) after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a
+ * {@link #getAlos16Point1Degrees() dawn} of 16.1 degrees before sunrise to
+ * {@link #getTzaisGeonim7Point083Degrees() tzais} . This returns the time of 10.75 * the calculated
+ * shaah zmanis after {@link #getAlos16Point1Degrees() dawn}.
*
- * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
- * @see #getSunrise()
- * @see #getFixedLocalChatzos()
- * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)
+ * @return the Date
of the plag. 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 the {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getAlos16Point1Degrees()
+ * @see #getTzaisGeonim7Point083Degrees()
*/
- getSofZmanShmaGRASunriseToFixedLocalChatzos(): Temporal.ZonedDateTime | null;
+ getPlagAlos16Point1ToTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null;
/**
- * This method returns Rav Moshe Feinstein's opinion of the
- * calculation of sof zman tfila (zman tfilah (the latest time to recite the morning prayers))
- * according to the opinion of the GRA that the day is
- * calculated from sunrise to sunset, but calculated using the first half of the day only. The half a day starts at
- * {@link #getSunrise() sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman tefila
- * is 4 shaos zmaniyos (solar hours) after sunrise or 2/3 of this half-day.
+ * This method returns the time of plag hamincha (the earliest time that Shabbos can be started) based on the
+ * opinion of Rabbi Yaakov Moshe Hillel as published in
+ * the luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that that plag hamincha is calculated
+ * as 1.25 shaos zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos
+ * zmaniyos calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and
+ * ending at tzais 3.8°.
*
- * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
- * @see #getSunrise()
- * @see #getFixedLocalChatzos()
- * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)
+ * @return the Date
of the plag. 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 the {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getShaahZmanisAlos16Point1ToTzais3Point8()
+ * @see #getMinchaGedolaAhavatShalom()
+ * @see #getMinchaKetanaAhavatShalom()
*/
- getSofZmanTfilaGRASunriseToFixedLocalChatzos(): Temporal.ZonedDateTime | null;
+ getPlagAhavatShalom(): Temporal.ZonedDateTime | undefined;
/**
- * This method returns Rav Moshe Feinstein's opinion of
- * the calculation of mincha gedola, the earliest time one can pray mincha GRAthat is 30 minutes after {@link #getFixedLocalChatzos() fixed
- * local chatzos}.
+ * Method to return the beginning of bain hashmashos of Rabbeinu Tam calculated when the sun is
+ * {@link #ZENITH_13_POINT_24 13.24°} below the western {@link #GEOMETRIC_ZENITH geometric horizon} (90°)
+ * after sunset. This calculation is based on the same calculation of {@link #getBainHashmashosRT58Point5Minutes()
+ * bain hashmashos Rabbeinu Tam 58.5 minutes} but uses a degree-based calculation instead of 58.5 exact
+ * minutes. This calculation is based on the position of the sun 58.5 minutes after sunset in Jerusalem around the equinox / equilux,
+ * which calculates to 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith}.
+ * NOTE: As per Yisrael Vehazmanim Vol. III page 1028, No. 50, a dip of slightly less than 13° should be used.
+ * Calculations show that the proper dip to be 13.2456° (truncated to 13.24 that provides about 1.5 second
+ * earlier (lechumra) time) below the horizon at that time. This makes a difference of 1 minute and 10
+ * seconds in Jerusalem during the Equinox, and 1 minute 29 seconds during the solstice as compared to the proper
+ * 13.24° versus 13°. For NY during the solstice, the difference is 1 minute 56 seconds.
+ * @todo recalculate the above based on equilux/equinox calculations.
*
- * @return 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 the {@link AstronomicalCalendar}
- * documentation.
+ * @return the Date
of the sun being 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith}
+ * (90°). 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 the
+ * {@link AstronomicalCalendar} documentation.
*
- * @see #getMinchaGedola()
- * @see #getFixedLocalChatzos()
- * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset
+ * @see #ZENITH_13_POINT_24
+ * @see #getBainHashmashosRT58Point5Minutes()
*/
- getMinchaGedolaGRAFixedLocalChatzos30Minutes(): Temporal.ZonedDateTime | undefined;
+ getBainHashmashosRT13Point24Degrees(): Temporal.ZonedDateTime | null;
/**
- * This method returns Rav Moshe Feinstein's opinion
- * of the calculation of mincha ketana (the preferred time to recite the mincha prayers according to
- * the opinion of the Rambam and others) calculated according
- * to the GRA that is 3.5 shaos zmaniyos (solar
- * hours) after {@link #getFixedLocalChatzos() fixed local chatzos}.
+ * This method returns the beginning of Bain hashmashos of Rabbeinu Tam calculated as a 58.5
+ * minute offset after sunset. bain hashmashos is 3/4 of a Mil before tzais or 3 1/4
+ * Mil after sunset. With a Mil calculated as 18 minutes, 3.25 * 18 = 58.5 minutes.
*
- * @return 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 the {@link AstronomicalCalendar}
+ * @return the Date
of 58.5 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 the {@link AstronomicalCalendar}
* documentation.
*
- * @see #getMinchaGedola()
- * @see #getFixedLocalChatzos()
- * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes
*/
- getMinchaKetanaGRAFixedLocalChatzosToSunset(): Temporal.ZonedDateTime | null;
+ getBainHashmashosRT58Point5Minutes(): Temporal.ZonedDateTime | undefined;
/**
- * This method returns Rav Moshe Feinstein's opinion
- * of the calculation of plag hamincha. This method returns plag hamincha calculated according to the
- * GRA that the day ends at sunset and is 4.75 shaos
- * zmaniyos (solar hours) after {@link #getFixedLocalChatzos() fixed local chatzos}.
+ * This method returns the beginning of bain hashmashos based on the calculation of 13.5 minutes (3/4 of an
+ * 18-minute Mil) before shkiah calculated as {@link #getTzaisGeonim7Point083Degrees() 7.083°}.
*
- * @return 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 the {@link AstronomicalCalendar}
+ * @return the Date
of the bain hashmashos of Rabbeinu Tam in this calculation. 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 the {@link AstronomicalCalendar}
* documentation.
- *
- * @see #getPlagHamincha()
- * @see #getFixedLocalChatzos()
- * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset
- * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes
+ * @see #getTzaisGeonim7Point083Degrees()
*/
- getPlagHaminchaGRAFixedLocalChatzosToSunset(): Temporal.ZonedDateTime | null;
+ getBainHashmashosRT13Point5MinutesBefore7Point083Degrees(): Temporal.ZonedDateTime | undefined;
/**
- * Method to return tzais (dusk) calculated as 50 minutes after sea level sunset. This method returns
- * tzais (nightfall) based on the opinion of Rabbi Moshe Feinstein for the New York area. This time should
- * not be used for latitudes different than the NY area.
+ * This method returns the beginning of bain hashmashos of Rabbeinu Tam calculated according to the
+ * opinion of the Divrei Yosef (see Yisrael Vehazmanim) calculated 5/18th (27.77%) of the time between
+ * alos (calculated as 19.8° before sunrise) and sunrise. This is added to sunset to arrive at the time
+ * for bain hashmashos of Rabbeinu Tam.
*
- * @return 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 the {@link AstronomicalCalendar}
+ * @return the Date
of bain hashmashos of Rabbeinu Tam for this calculation. 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 the {@link AstronomicalCalendar}
* documentation.
*/
- getTzais50(): Temporal.ZonedDateTime | undefined;
+ getBainHashmashosRT2Stars(): Temporal.ZonedDateTime | null | undefined;
/**
- * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before
- * {@link #getMinchaKetana()} or is 9 * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link
- * #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()}
- * setting), calculated according to the GRA using a day starting at
- * sunrise and ending at sunset. This is the time that eating or other activity can't begin prior to praying mincha.
- * The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos
- * 16.1°}. See the Mechaber and Mishna Berurah
- * 232 for details.
+ * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 18 minutes
+ * or 3/4 of a 24-minute Mil before sunset. According to the Yereim, bain hashmashos starts 3/4
+ * of a Mil before sunset and tzais or nightfall starts at sunset.
*
- * @see #getShaahZmanisGra()
- * @see #getSamuchLeMinchaKetana16Point1Degrees()
- * @return the Date
of the time of samuch lemincha ketana. 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 the {@link AstronomicalCalendar} documentation.
+ * @return the Date
of 18 minutes before 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 the {@link AstronomicalCalendar}
+ * documentation.
+ * @see #getBainHashmashosYereim3Point05Degrees()
*/
- getSamuchLeMinchaKetanaGRA(): Temporal.ZonedDateTime | null;
+ getBainHashmashosYereim18Minutes(): Temporal.ZonedDateTime | undefined;
/**
- * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before
- * {@link #getMinchaGedola16Point1Degrees()} or 9 * shaos zmaniyos (temporal hours) after the start of the day,
- * calculated using a day starting and ending 16.1° below the horizon. This is the time that eating or other activity
- * can't begin prior to praying mincha. The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after
- * {@link #getAlos16Point1Degrees() alos 16.1°}. See the Mechaber and Mishna Berurah 232.
+ * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's
+ * position 3.05° above the horizon around the equinox / equilux,
+ * its position 18 minutes or 3/4 of an 24-minute mil before sunset. According to the Yereim, bain
+ * hashmashos starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset.
+ * Note that lechumra (of about 14 seconds) a refraction value of 0.5166° as opposed to the traditional
+ * 0.566° is used. This is more inline with the actual refraction in Eretz Yisrael and is brought down
+ * by Rabbi
+ * Yedidya Manet in his Zmanei Halacha
+ * Lema’aseh (p. 11). That is the first source that I am aware of that calculates degree-based Yereim
+ * zmanim. The 0.5166° refraction is also used by the Luach Itim
+ * Lebinah. Calculating the Yereim's bain hashmashos using 18-minute based degrees is also suggested
+ * in the upcoming 8th edition of the zmanim Kehilchasam. For more details, see the article The Yereim’s Bein Hashmashos.
*
- * @see #getShaahZmanis16Point1Degrees()
- * @return the Date
of the time of samuch lemincha ketana. 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 the {@link AstronomicalCalendar} documentation.
+ * @todo recalculate based on equinox/equilux
+ * @return the Date
of the sun's position 3.05° minutes before 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 the
+ * {@link AstronomicalCalendar} documentation.
+ *
+ * @see #ZENITH_MINUS_3_POINT_05
+ * @see #getBainHashmashosYereim18Minutes()
+ * @see #getBainHashmashosYereim2Point8Degrees()
+ * @see #getBainHashmashosYereim2Point1Degrees()
*/
- getSamuchLeMinchaKetana16Point1Degrees(): Temporal.ZonedDateTime | null;
+ getBainHashmashosYereim3Point05Degrees(): Temporal.ZonedDateTime | null;
/**
- * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before
- * {@link #getMinchaKetana72Minutes()} or 9 * shaos zmaniyos (temporal hours) after the start of the day,
- * calculated using a day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the time that eating
- * or other activity can't begin prior to praying mincha. The calculation used is 9 * {@link
- * #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos 16.1°}. See the Mechaber and Mishna Berurah 232.
+ * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 16.875
+ * minutes or 3/4 of a 22.5-minute Mil before sunset. According to the Yereim, bain hashmashos
+ * starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset.
*
- * @see #getShaahZmanis16Point1Degrees()
- * @return the Date
of the time of samuch lemincha ketana. 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 the {@link AstronomicalCalendar} documentation.
+ * @return the Date
of 16.875 minutes before 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 the {@link AstronomicalCalendar}
+ * documentation.
+ *
+ * @see #getBainHashmashosYereim2Point8Degrees()
*/
- getSamuchLeMinchaKetana72Minutes(): Temporal.ZonedDateTime | null;
- getClassName(): string;
-}
-/**
- * The JewishDate is the base calendar class, that supports maintenance of a {@link java.util.GregorianCalendar}
- * instance along with the corresponding Jewish date. This class can use the standard Java Date and Calendar
- * classes for setting and maintaining the dates, but it does not subclass these classes or use them internally
- * in any calculations. This class also does not have a concept of a time (which the Date class does). Please
- * note that the calendar does not currently support dates prior to 1/1/1 Gregorian. Also keep in mind that the
- * Gregorian calendar started on October 15, 1582, so any calculations prior to that are suspect (at least from
- * a Gregorian perspective). While 1/1/1 Gregorian and forward are technically supported, any calculations prior to Hillel II's (Hakatan's) calendar (4119 in the Jewish Calendar / 359
- * CE Julian as recorded by Rav Hai Gaon) would be just an
- * approximation.
- *
- * This open source Java code was written by Avrom Finkelstien from his C++
- * code. It was refactored to fit the KosherJava Zmanim API with simplification of the code, enhancements and some bug
- * fixing.
- *
- * Some of Avrom's original C++ code was translated from C/C++
- * code in Calendrical Calculations by Nachum Dershowitz and Edward M.
- * Reingold, Software-- Practice & Experience, vol. 20, no. 9 (September, 1990), pp. 899- 928. Any method with the mark
- * "ND+ER" indicates that the method was taken from this source with minor modifications.
- *
- * If you are looking for a class that implements a Jewish calendar version of the Calendar class, one is available from
- * the ICU (International Components for Unicode) project, formerly part of
- * IBM's DeveloperWorks.
- *
- * @see JewishCalendar
- * @see HebrewDateFormatter
- * @see java.util.Date
- * @see java.util.Calendar
- * @author © Avrom Finkelstien 2002
- * @author © Eliyahu Hershfeld 2011 - 2015
- */
-export declare class JewishDate {
+ getBainHashmashosYereim16Point875Minutes(): Temporal.ZonedDateTime | undefined;
/**
- * Value of the month field indicating Nissan, the first numeric month of the year in the Jewish calendar. With the
- * year starting at {@link #TISHREI}, it would actually be the 7th (or 8th in a {@link #isJewishLeapYear() leap
- * year}) month of the year.
+ * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's
+ * position 2.8° above the horizon around the equinox / equilux,
+ * its position 16.875 minutes or 3/4 of an 18-minute Mil before sunset. According to the Yereim, bain
+ * hashmashos starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset.
+ * Details, including how the degrees were calculated can be seen in the documentation of
+ * {@link #getBainHashmashosYereim3Point05Degrees()}.
+ *
+ * @return the Date
of the sun's position 2.8° minutes before 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 the
+ * {@link AstronomicalCalendar} documentation.
+ *
+ * @see #ZENITH_MINUS_2_POINT_8
+ * @see #getBainHashmashosYereim16Point875Minutes()
+ * @see #getBainHashmashosYereim3Point05Degrees()
+ * @see #getBainHashmashosYereim2Point1Degrees()
*/
- static readonly NISSAN: number;
+ getBainHashmashosYereim2Point8Degrees(): Temporal.ZonedDateTime | null;
/**
- * Value of the month field indicating Iyar, the second numeric month of the year in the Jewish calendar. With the
- * year starting at {@link #TISHREI}, it would actually be the 8th (or 9th in a {@link #isJewishLeapYear() leap
- * year}) month of the year.
+ * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 13.5 minutes
+ * or 3/4 of an 18-minute Mil before sunset. According to the Yereim, bain hashmashos starts 3/4 of
+ * a Mil before sunset and tzais or nightfall starts at sunset.
+ *
+ * @return the Date
of 13.5 minutes before 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 the {@link AstronomicalCalendar}
+ * documentation.
+ *
+ * @see #getBainHashmashosYereim2Point1Degrees()
*/
- static readonly IYAR: number;
+ getBainHashmashosYereim13Point5Minutes(): Temporal.ZonedDateTime | undefined;
/**
- * Value of the month field indicating Sivan, the third numeric month of the year in the Jewish calendar. With the
- * year starting at {@link #TISHREI}, it would actually be the 9th (or 10th in a {@link #isJewishLeapYear() leap
- * year}) month of the year.
+ * This method returns the beginning of bain hashmashos according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's
+ * position 2.1° above the horizon around the equinox / equilux in
+ * Yerushalayim, its position 13.5 minutes or 3/4 of an 18-minute Mil before sunset. According to the Yereim,
+ * bain hashmashos starts 3/4 of a mil before sunset and tzais or nightfall starts at sunset.
+ * Details, including how the degrees were calculated can be seen in the documentation of
+ * {@link #getBainHashmashosYereim3Point05Degrees()}.
+ *
+ * @return the Date
of the sun's position 2.1° minutes before 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 the
+ * {@link AstronomicalCalendar} documentation.
+ *
+ * @see #ZENITH_MINUS_2_POINT_1
+ * @see #getBainHashmashosYereim13Point5Minutes()
+ * @see #getBainHashmashosYereim2Point8Degrees()
+ * @see #getBainHashmashosYereim3Point05Degrees()
*/
- static readonly SIVAN: number;
+ getBainHashmashosYereim2Point1Degrees(): Temporal.ZonedDateTime | null;
/**
- * Value of the month field indicating Tammuz, the fourth numeric month of the year in the Jewish calendar. With the
- * year starting at {@link #TISHREI}, it would actually be the 10th (or 11th in a {@link #isJewishLeapYear() leap
- * year}) month of the year.
+ * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the
+ * sun's position at {@link #ZENITH_3_POINT_7 3.7°} below the western horizon.
+ *
+ * @return the Date
representing the time when the sun is 3.7° below sea level.
+ * @see #ZENITH_3_POINT_7
*/
- static readonly TAMMUZ: number;
+ getTzaisGeonim3Point7Degrees(): Temporal.ZonedDateTime | null;
/**
- * Value of the month field indicating Av, the fifth numeric month of the year in the Jewish calendar. With the year
- * starting at {@link #TISHREI}, it would actually be the 11th (or 12th in a {@link #isJewishLeapYear() leap year})
- * month of the year.
+ * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the
+ * sun's position at {@link #ZENITH_3_POINT_8 3.8°} below the western horizon.
+ *
+ * @return the Date
representing the time when the sun is 3.8° below sea level.
+ * @see #ZENITH_3_POINT_8
*/
- static readonly AV: number;
+ getTzaisGeonim3Point8Degrees(): Temporal.ZonedDateTime | null;
/**
- * Value of the month field indicating Elul, the sixth numeric month of the year in the Jewish calendar. With the
- * year starting at {@link #TISHREI}, it would actually be the 12th (or 13th in a {@link #isJewishLeapYear() leap
- * year}) month of the year.
+ * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the
+ * sun's position at {@link #ZENITH_5_POINT_95 5.95°} below the western horizon.
+ *
+ * @return the Date
representing the time when the sun is 5.95° below sea level. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #ZENITH_5_POINT_95
*/
- static readonly ELUL: number;
+ getTzaisGeonim5Point95Degrees(): Temporal.ZonedDateTime | null;
/**
- * Value of the month field indicating Tishrei, the seventh numeric month of the year in the Jewish calendar. With
- * the year starting at this month, it would actually be the 1st month of the year.
+ * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4
+ * of a Mil based on an 18
+ * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_65 3.65°} below the western
+ * horizon. This is a very early zman and should not be relied on without Rabbinical guidance.
+ *
+ * @return the Date
representing the time when the sun is 3.65° below sea level. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #ZENITH_3_POINT_65
*/
- static readonly TISHREI: number;
+ getTzaisGeonim3Point65Degrees(): Temporal.ZonedDateTime | null;
/**
- * Value of the month field indicating Cheshvan/marcheshvan, the eighth numeric month of the year in the Jewish
- * calendar. With the year starting at {@link #TISHREI}, it would actually be the 2nd month of the year.
+ * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4
+ * of a Mil based on an 18
+ * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_676 3.676°} below the western
+ * horizon based on the calculations of Stanley Fishkind. This is a very early zman and should not be
+ * relied on without Rabbinical guidance.
+ *
+ * @return the Date
representing the time when the sun is 3.676° below sea level. 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 the {@link AstronomicalCalendar}
+ * documentation.
+ * @see #ZENITH_3_POINT_676
*/
- static readonly CHESHVAN: number;
+ getTzaisGeonim3Point676Degrees(): Temporal.ZonedDateTime | null;
/**
- * Value of the month field indicating Kislev, the ninth numeric month of the year in the Jewish calendar. With the
- * year starting at {@link #TISHREI}, it would actually be the 3rd month of the year.
+ * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4
+ * of a mil based
+ * on a 24-minute Mil, or 18 minutes. It is the sun's position at {@link #ZENITH_4_POINT_61 4.61°} below the
+ * western horizon. This is a very early zman and should not be relied on without Rabbinical guidance.
+ *
+ * @return the Date
representing the time when the sun is 4.61° below sea level. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #ZENITH_4_POINT_61
*/
- static readonly KISLEV: number;
+ getTzaisGeonim4Point61Degrees(): Temporal.ZonedDateTime | null;
/**
- * Value of the month field indicating Teves, the tenth numeric month of the year in the Jewish calendar. With the
- * year starting at {@link #TISHREI}, it would actually be the 4th month of the year.
+ * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4
+ * of a Mil, based on a 22.5
+ * minute Mil, or 16 7/8 minutes. It is the sun's position at {@link #ZENITH_4_POINT_37 4.37°} below the western
+ * horizon. This is a very early zman and should not be relied on without Rabbinical guidance.
+ *
+ * @return the Date
representing the time when the sun is 4.37° below sea level. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #ZENITH_4_POINT_37
*/
- static readonly TEVES: number;
+ getTzaisGeonim4Point37Degrees(): Temporal.ZonedDateTime | null;
/**
- * Value of the month field indicating Shevat, the eleventh numeric month of the year in the Jewish calendar. With
- * the year starting at {@link #TISHREI}, it would actually be the 5th month of the year.
+ * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4
+ * of a 24-minute Mil,
+ * based on a Mil being 24 minutes, and is calculated as 18 + 2 + 4 for a total of 24 minutes. It is the
+ * sun's position at {@link #ZENITH_5_POINT_88 5.88°} below the western horizon. This is a very early
+ * zman and should not be relied on without Rabbinical guidance.
+ *
+ * @todo Additional detailed documentation needed.
+ * @return the Date
representing the time when the sun is 5.88° below sea level. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #ZENITH_5_POINT_88
*/
- static readonly SHEVAT: number;
+ getTzaisGeonim5Point88Degrees(): Temporal.ZonedDateTime | null;
/**
- * Value of the month field indicating Adar (or Adar I in a {@link #isJewishLeapYear() leap year}), the twelfth
- * numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually
- * be the 6th month of the year.
+ * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4
+ * of a Mil based on the
+ * sun's position at {@link #ZENITH_4_POINT_8 4.8°} below the western horizon. This is based on Rabbi Leo Levi's
+ * calculations. This is the This is a very early zman and should not be relied on without Rabbinical guidance.
+ * @todo Additional documentation needed.
+ *
+ * @return the Date
representing the time when the sun is 4.8° below sea level. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #ZENITH_4_POINT_8
*/
- static readonly ADAR: number;
+ getTzaisGeonim4Point8Degrees(): Temporal.ZonedDateTime | null;
/**
- * Value of the month field indicating Adar II, the leap (intercalary or embolismic) thirteenth (Undecimber) numeric
- * month of the year added in Jewish {@link #isJewishLeapYear() leap year}). The leap years are years 3, 6, 8, 11,
- * 14, 17 and 19 of a 19 year cycle. With the year starting at {@link #TISHREI}, it would actually be the 7th month
- * of the year.
+ * This method returns the tzais (nightfall) based on the opinion of the Geonim as calculated by
+ * Rabbi Yechiel Michel Tucazinsky. It is
+ * based on of the position of the sun no later than {@link #getTzaisGeonim6Point45Degrees() 31 minutes} after sunset
+ * in Jerusalem the height of the summer solstice and is 28 minutes after shkiah around the equinox / equilux. This
+ * computes to 6.45° below the western horizon.
+ * @todo Additional documentation details needed.
+ *
+ * @return the Date
representing the time when the sun is 6.45° below sea level. 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 the {@link AstronomicalCalendar}
+ * documentation.
+ * @see #ZENITH_6_POINT_45
*/
- static readonly ADAR_II: number;
+ getTzaisGeonim6Point45Degrees(): Temporal.ZonedDateTime | null;
/**
- * the Jewish epoch using the RD (Rata Die/Fixed Date or Reingold Dershowitz) day used in Calendrical Calculations.
- * Day 1 is January 1, 0001 Gregorian
+ * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated when the
+ * sun's position {@link #ZENITH_7_POINT_083 7.083° (or 7° 5\u2032}) below the western horizon. This is often
+ * referred to as 7°5' or 7° and 5 minutes. This calculation is based on the observation of 3 medium sized
+ * stars by Dr. Baruch (Berthold) Cohn in his luach Tabellen enthaltend die Zeitangaben für
+ * den Beginn der Nacht und des Tages für die Breitengrade + 66 bis -38 published in Strasbourg, France in 1899.
+ * This calendar was very popular in Europe, and many other calendars based their time on it. Rav Dovid Tzvi Hoffman in his
+ * Sh"Ut Melamed Leho'il in an exchange of letters with Baruch Cohn in Orach Chaim 30 agreed to this zman (page 36),
+ * as did the Sh"Ut Bnei Tziyon and the Tenuvas Sadeh. It is very close to the time of the Mekor Chesed of the Sefer chasidim. It is close to the position of the sun 30 minutes
+ * after sunset in Jerusalem around the equinox / equilux, but not
+ * Exactly. The actual position of the sun 30 minutes after sunset in Jerusalem at the equilux is 7.205° and 7.199°
+ * at the equinox. See Hazmanim Bahalacha vol 2, pages 520-521 for more details.
+ *
+ * @return the Date
representing the time when the sun is 7.083° below sea level. 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 the {@link AstronomicalCalendar}
+ * documentation.
+ * @see #ZENITH_7_POINT_083
*/
- private static readonly JEWISH_EPOCH;
- /** The number of chalakim (18) in a minute. */
- private static readonly CHALAKIM_PER_MINUTE;
- /** The number of chalakim (1080) in an hour. */
- private static readonly CHALAKIM_PER_HOUR;
- /** The number of chalakim (25,920) in a 24 hour day. */
- private static readonly CHALAKIM_PER_DAY;
- /** The number of chalakim in an average Jewish month. A month has 29 days, 12 hours and 793
- * chalakim (44 minutes and 3.3 seconds) for a total of 765,433 chalakim */
- private static readonly CHALAKIM_PER_MONTH;
+ getTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null;
/**
- * Days from the beginning of Sunday till molad BaHaRaD. Calculated as 1 day, 5 hours and 204 chalakim = (24 + 5) *
- * 1080 + 204 = 31524
+ * This method returns tzais (nightfall) based on the opinion of the Geonim calculated as 45 minutes
+ * after sunset during the summer solstice in New York, when the neshef (twilight) is the longest. The sun's
+ * position at this time computes to {@link #ZENITH_7_POINT_67 7.75°} below the western horizon. See Igros Moshe Even Haezer 4, Ch. 4 (regarding
+ * tzais for krias Shema). It is also mentioned in Rabbi Heber's Shaarei Zmanim on in
+ * chapter 10 (page 87) and
+ * chapter 12 (page 108). Also see the
+ * time of 45 minutes in Rabbi Simcha Bunim Cohen's The radiance of Shabbos as the earliest zman for New York.
+ * This zman is also listed in the Divrei
+ * Shalom Vol. III, chapter 75, and Bais Av"i
+ * Vol. III, chapter 117. This zman is also listed in the Divrei Shalom etc. chapter 177 (FIXME - could not
+ * be located). Since this zman depends on the level of light, Rabbi Yaakov Shakow presented this degree-based
+ * calculation to Rabbi Rabbi Shmuel Kamenetsky who agreed
+ * to it.
+ * @todo add hyperlinks to source of Divrei Shalom.
+ * @return the Date
representing the time when the sun is 7.67° below sea level. 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 the {@link AstronomicalCalendar}
+ * documentation.
+ * @see #ZENITH_7_POINT_67
*/
- private static readonly CHALAKIM_MOLAD_TOHU;
+ getTzaisGeonim7Point67Degrees(): Temporal.ZonedDateTime | null;
/**
- * A short year where both {@link #CHESHVAN} and {@link #KISLEV} are 29 days.
+ * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the
+ * sun's position at {@link #ZENITH_8_POINT_5 8.5°} below the western horizon.
*
- * @see #getCheshvanKislevKviah()
- * @see HebrewDateFormatter#getFormattedKviah(int)
+ * @return the Date
representing the time when the sun is 8.5° below sea level. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #ZENITH_8_POINT_5
*/
- static readonly CHASERIM: number;
+ getTzaisGeonim8Point5Degrees(): Temporal.ZonedDateTime | null;
/**
- * An ordered year where {@link #CHESHVAN} is 29 days and {@link #KISLEV} is 30 days.
+ * This method returns the tzais (nightfall) based on the calculations used in the Luach Itim Lebinah as the stringent time for tzais. It is
+ * calculated at the sun's position at {@link #ZENITH_9_POINT_3 9.3°} below the western horizon.
*
- * @see #getCheshvanKislevKviah()
- * @see HebrewDateFormatter#getFormattedKviah(int)
+ * @return the Date
representing the time when the sun is 9.3° below sea level. 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 the {@link AstronomicalCalendar} documentation.
*/
- static readonly KESIDRAN: number;
+ getTzaisGeonim9Point3Degrees(): Temporal.ZonedDateTime | null;
/**
- * A long year where both {@link #CHESHVAN} and {@link #KISLEV} are 30 days.
+ * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 60
+ * minutes after sunset around the equinox / equilux, the
+ * day that a solar hour is 60 minutes in New York. The sun's position at this time computes to
+ * {@link #ZENITH_9_POINT_75 9.75°} below the western horizon. This is the opinion of Rabbi Eliyahu Henkin. This also follows the opinion of
+ * Rabbi Shmuel Kamenetsky. Rabbi Yaakov Shakow presented
+ * these degree-based times to Rabbi Shmuel Kamenetsky who agreed to them.
*
- * @see #getCheshvanKislevKviah()
- * @see HebrewDateFormatter#getFormattedKviah(int)
- */
- static readonly SHELAIMIM: number;
- private date;
- /** the internal count of molad hours. */
- private moladHours;
- /** the internal count of molad minutes. */
- private moladMinutes;
- /** the internal count of molad chalakim. */
- private moladChalakim;
- /**
- * Returns the molad hours. Only a JewishDate object populated with {@link #getMolad()},
- * {@link #setJewishDate(int, int, int, int, int, int)} or {@link #setMoladHours(int)} will have this field
- * populated. A regular JewishDate object will have this field set to 0.
+ * @todo recalculate based on equinox / equilux.
+ * @return the Date
representing the time when the sun is 9.75° below sea level. 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 the {@link AstronomicalCalendar} documentation.
*
- * @return the molad hours
- * @see #setMoladHours(int)
- * @see #getMolad()
- * @see #setJewishDate(int, int, int, int, int, int)
+ * @see #getTzais60()
*/
- getMoladHours(): number;
+ getTzaisGeonim9Point75Degrees(): Temporal.ZonedDateTime | null;
/**
- * Sets the molad hours.
+ * This method returns the tzais (nightfall) based on the opinion of the Chavas Yair and Divrei Malkiel that the time to walk the distance of a Mil is 15 minutes for a total of 60 minutes
+ * for 4 Mil after {@link #getSeaLevelSunset() sea level sunset}. See detailed documentation explaining the
+ * 60 minute concept at {@link #getAlos60()}.
*
- * @param moladHours
- * the molad hours to set
- * @see #getMoladHours()
- * @see #getMolad()
- * @see #setJewishDate(int, int, int, int, int, int)
+ * @return the Date
representing 60 minutes after sea level 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 the
+ * {@link AstronomicalCalendar} documentation.
*
+ * @see #getAlos60()
+ * @see #getPlagHamincha60Minutes()
+ * @see #getShaahZmanis60Minutes()
*/
- setMoladHours(moladHours: number): void;
+ getTzais60(): Temporal.ZonedDateTime | undefined;
/**
- * Returns the molad minutes. Only an object populated with {@link #getMolad()},
- * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladMinutes(int)} will have these fields
- * populated. A regular JewishDate object will have this field set to 0.
+ * This method returns tzais usually calculated as 40 minutes (configurable to any offset via
+ * {@link #setAteretTorahSunsetOffset(double)}) after sunset. Please note that Chacham Yosef Harari-Raful
+ * of Yeshivat Ateret Torah who uses this time, does so only for calculating various other zmanai hayom
+ * such as Sof Zman Krias Shema and Plag Hamincha. His calendars do not publish a zman
+ * for Tzais. It should also be noted that Chacham Harari-Raful provided a 25 minute zman
+ * for Israel. This API uses 40 minutes year round in any place on the globe by default. This offset can be change
+ * by calling {@link #setAteretTorahSunsetOffset(double)}.
*
- * @return the molad minutes
- * @see #setMoladMinutes(int)
- * @see #getMolad()
- * @see #setJewishDate(int, int, int, int, int, int)
+ * @return the Date
representing 40 minutes (configurable via {@link #setAteretTorahSunsetOffset})
+ * after sea level 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getAteretTorahSunsetOffset()
+ * @see #setAteretTorahSunsetOffset(double)
*/
- getMoladMinutes(): number;
+ getTzaisAteretTorah(): Temporal.ZonedDateTime | undefined;
/**
- * Sets the molad minutes. The expectation is that the traditional minute-less chalakim will be broken out to
- * minutes and {@link #setMoladChalakim(int) chalakim/parts} , so 793 (TaShTZaG) parts would have the minutes set to
- * 44 and chalakim to 1.
- *
- * @param moladMinutes
- * the molad minutes to set
- * @see #getMoladMinutes()
- * @see #setMoladChalakim(int)
- * @see #getMolad()
- * @see #setJewishDate(int, int, int, int, int, int)
+ * Returns the offset in minutes after sunset used to calculate tzais based on the calculations of
+ * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculations. The default value is 40 minutes.
+ * This affects most zmanim, since almost all zmanim use subset as part of their calculation.
*
+ * @return the number of minutes after sunset for Tzait.
+ * @see #setAteretTorahSunsetOffset(double)
*/
- setMoladMinutes(moladMinutes: number): void;
+ getAteretTorahSunsetOffset(): number;
/**
- * Sets the molad chalakim/parts. The expectation is that the traditional minute-less chalakim will be broken out to
- * {@link #setMoladMinutes(int) minutes} and chalakim, so 793 (TaShTZaG) parts would have the minutes set to 44 and
- * chalakim to 1.
- *
- * @param moladChalakim
- * the molad chalakim/parts to set
- * @see #getMoladChalakim()
- * @see #setMoladMinutes(int)
- * @see #getMolad()
- * @see #setJewishDate(int, int, int, int, int, int)
+ * Allows setting the offset in minutes after sunset for the Ateret Torah zmanim. The default if unset is
+ * 40 minutes. Chacham Yosef Harari-Raful of Yeshivat Ateret Torah uses 40 minutes globally with the exception
+ * of Israel where a 25 minute offset is used. This 40 minute (or any other) offset can be overridden by this method.
+ * This offset impacts all Ateret Torah zmanim.
*
+ * @param ateretTorahSunsetOffset
+ * the number of minutes after sunset to use as an offset for the Ateret Torah tzais
+ * @see #getAteretTorahSunsetOffset()
*/
- setMoladChalakim(moladChalakim: number): void;
+ setAteretTorahSunsetOffset(ateretTorahSunsetOffset: number): void;
/**
- * Returns the molad chalakim/parts. Only an object populated with {@link #getMolad()},
- * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladChalakim(int)} will have these fields
- * populated. A regular JewishDate object will have this field set to 0.
+ * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the
+ * calculation of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts
+ * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending
+ * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via
+ * {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and added
+ * to {@link #getAlos72Zmanis() alos} to reach this time. This time is 3
+ * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after
+ * {@link #getAlos72Zmanis() alos 72 zmaniyos}. Note: Based on this calculation chatzos
+ * will not be at midday.
*
- * @return the molad chalakim/parts
- * @see #setMoladChalakim(int)
- * @see #getMolad()
- * @see #setJewishDate(int, int, int, int, int, int)
+ * @return the Date
of the latest zman krias shema based on this calculation. 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 {@link AstronomicalCalendar} documentation.
+ * @see #getAlos72Zmanis()
+ * @see #getTzaisAteretTorah()
+ * @see #getAteretTorahSunsetOffset()
+ * @see #setAteretTorahSunsetOffset(double)
+ * @see #getShaahZmanisAteretTorah()
*/
- getMoladChalakim(): number;
+ getSofZmanShmaAteretTorah(): Temporal.ZonedDateTime | null;
/**
- * Returns the last day in a gregorian month
+ * This method returns the latest zman tfila (time to recite the morning prayers) based on the calculation
+ * of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis()
+ * 1/10th of the day} before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes
+ * after sunset} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos
+ * are calculated based on this day and added to {@link #getAlos72Zmanis() alos} to reach this time. This time
+ * is 4 * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after
+ * {@link #getAlos72Zmanis() alos 72 zmaniyos}.
+ * Note: Based on this calculation chatzos will not be at midday.
*
- * @param month
- * the Gregorian month
- * @return the last day of the Gregorian month
+ * @return the Date
of the latest zman krias shema based on this calculation. 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 {@link AstronomicalCalendar} documentation.
+ * @see #getAlos72Zmanis()
+ * @see #getTzaisAteretTorah()
+ * @see #getShaahZmanisAteretTorah()
+ * @see #setAteretTorahSunsetOffset(double)
*/
- getLastDayOfGregorianMonth(month: number): number;
+ getSofZmanTfilahAteretTorah(): Temporal.ZonedDateTime | null;
/**
- * Returns the number of days in a given month in a given month and year.
+ * This method returns the time of mincha gedola based on the calculation of Chacham Yosef
+ * Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day}
+ * before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset}
+ * (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest
+ * time to pray mincha according to the opinion of the Rambam and others. For more information on this see the documentation on {@link #getMinchaGedola() mincha
+ * gedola}. This is calculated as 6.5 {@link #getShaahZmanisAteretTorah() solar hours} after alos. The
+ * calculation used is 6.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}.
*
- * @param month
- * the month. As with other cases in this class, this is 1-based, not zero-based.
- * @param year
- * the year (only impacts February)
- * @return the number of days in the month in the given year
- */
- private static getLastDayOfGregorianMonth;
- /**
- * Computes the Gregorian date from the absolute date. ND+ER
- * @param absDate - the absolute date
- */
- private absDateToDate;
- /**
- * Computes the absolute date from a Gregorian date. ND+ER
+ * @see #getAlos72Zmanis()
+ * @see #getTzaisAteretTorah()
+ * @see #getShaahZmanisAteretTorah()
+ * @see #getMinchaGedola()
+ * @see #getMinchaKetanaAteretTorah()
+ * @see ZmanimCalendar#getMinchaGedola()
+ * @see #getAteretTorahSunsetOffset()
+ * @see #setAteretTorahSunsetOffset(double)
*
- * @param year
- * the Gregorian year
- * @param month
- * the Gregorian month. Unlike the Java Calendar where January has the value of 0,This expects a 1 for
- * January
- * @param dayOfMonth
- * the day of the month (1st, 2nd, etc...)
- * @return the absolute Gregorian day
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
*/
- private static gregorianDateToAbsDate;
+ getMinchaGedolaAteretTorah(): Temporal.ZonedDateTime | null;
/**
- * Returns if the year is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19 year cycle are leap years.
+ * This method returns the time of mincha ketana based on the calculation of
+ * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts
+ * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending
+ * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via
+ * {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest time to pray mincha
+ * according to the opinion of the Rambam and others.
+ * For more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is
+ * calculated as 9.5 {@link #getShaahZmanisAteretTorah() solar hours} after {@link #getAlos72Zmanis() alos}.
+ * The calculation used is 9.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}.
*
- * @param year
- * the Jewish year.
- * @return true if it is a leap year
- * @see #isJewishLeapYear()
+ * @see #getAlos72Zmanis()
+ * @see #getTzaisAteretTorah()
+ * @see #getShaahZmanisAteretTorah()
+ * @see #getAteretTorahSunsetOffset()
+ * @see #setAteretTorahSunsetOffset(double)
+ * @see #getMinchaGedola()
+ * @see #getMinchaKetana()
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
*/
- private static isJewishLeapYear;
+ getMinchaKetanaAteretTorah(): Temporal.ZonedDateTime | null;
/**
- * Returns if the year the calendar is set to is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19 year
- * cycle are leap years.
- *
- * @return true if it is a leap year
- * @see #isJewishLeapYear(int)
- */
- isJewishLeapYear(): boolean;
+ * This method returns the time of plag hamincha based on the calculation of Chacham Yosef Harari-Raful
+ * of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is
+ * usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset
+ * via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and
+ * added to {@link #getAlos72Zmanis() alos} to reach this time. This time is 10.75
+ * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after {@link #getAlos72Zmanis()
+ * dawn}.
+ *
+ * @return the Date
of the plag. 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 {@link AstronomicalCalendar} documentation.
+ * @see #getAlos72Zmanis()
+ * @see #getTzaisAteretTorah()
+ * @see #getShaahZmanisAteretTorah()
+ * @see #setAteretTorahSunsetOffset(double)
+ * @see #getAteretTorahSunsetOffset()
+ */
+ getPlagHaminchaAteretTorah(): Temporal.ZonedDateTime | null;
/**
- * Returns the last month of a given Jewish year. This will be 12 on a non {@link #isJewishLeapYear(int) leap year}
- * or 13 on a leap year.
+ * This method returns the time of misheyakir based on the common calculation of the Syrian community in NY
+ * that the alos is a fixed minute offset from day starting {@link #getAlos72Zmanis() 1/10th of the day}
+ * before sunrise. The common offsets are 6 minutes (based on the Pri Megadim, but not linked to the
+ * calculation of Alos as 1/10th of the day), 8 and 18 minutes (possibly attributed to
+ * Chacham Baruch Ben Haim). Since there is no universal accepted offset, the user of this API will have to
+ * Chacham Baruch Ben Haim). Since there is no
+ * universal accepted offset, the user of this API will have to specify one. Chacham Yosef Harari-Raful of
+ * Yeshivat Ateret Torah does not supply any zman for misheyakir and does not endorse any
+ * specific calculation for misheyakir. For that reason, this method is not a public method.
*
- * @param year
- * the Jewish year.
- * @return 12 on a non leap year or 13 on a leap year
- * @see #isJewishLeapYear(int)
+ * @param minutes
+ * the number of minutes after alos calculated as {@link #getAlos72Zmanis() 1/10th of the day}
+ * @return the Date
of misheyakir. 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 {@link AstronomicalCalendar}
+ * documentation.
+ * @see #getAlos72Zmanis()
*/
- private static getLastMonthOfJewishYear;
+ private getMesheyakirAteretTorah;
/**
- * Returns the number of days elapsed from the Sunday prior to the start of the Jewish calendar to the mean
- * conjunction of Tishri of the Jewish year.
+ * Method to return tzais (dusk) calculated as 72 minutes zmaniyos, or 1/10th of the day after
+ * {@link #getSeaLevelSunset() sea level sunset}. This is the way that the Minchas Cohen in Ma'amar 2:4 calculates Rebbeinu Tam's
+ * time of tzeis. It should be noted that this calculation results in the shortest time from sunset to
+ * tzais being during the winter solstice, the longest at the summer solstice and 72 clock minutes at the
+ * equinox. This does not match reality, since there is no direct relationship between the length of the day and
+ * twilight. The shortest twilight is during the equinox, the longest is during the the summer solstice, and in the
+ * winter with the shortest daylight, the twilight period is longer than during the equinoxes.
*
- * @param year
- * the Jewish year
- * @return the number of days elapsed from prior to the molad Tohu BaHaRaD (Be = Monday, Ha= 5 hours and Rad =204
- * chalakim/parts) prior to the start of the Jewish calendar, to the mean conjunction of Tishri of the
- * Jewish year. BeHaRaD is 23:11:20 on Sunday night(5 hours 204/1080 chalakim after sunset on Sunday
- * evening).
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
+ * @see #getAlos72Zmanis()
*/
- static getJewishCalendarElapsedDays(year: number): number;
+ getTzais72Zmanis(): Temporal.ZonedDateTime | null;
/**
- * Adds the 4 dechiyos for molad Tishrei. These are:
- * 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. A null will also be returned if 0 is passed in, since we can't tell if it is sunrise
+ * or sunset based. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
*/
- private static addDechiyos;
+ private getZmanisBasedOffset;
/**
- * Returns the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu to the year
- * and month passed in.
+ * Method to return tzais (dusk) calculated using 90 minutes zmaniyos or 1/8th of the day after {@link
+ * #getSeaLevelSunset() sea level sunset}. This time is known in Yiddish as the achtel (an eighth)
+ * zman.
*
- * @param year
- * the Jewish year
- * @param month
- * the Jewish month the Jewish month, with the month numbers starting from Nisan. Use the JewishDate
- * constants such as {@link JewishDate#TISHREI}.
- * @return the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
+ * @see #getAlos90Zmanis()
*/
- private static getChalakimSinceMoladTohu;
+ getTzais90Zmanis(): Temporal.ZonedDateTime | null;
/**
- * Returns the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu to the Jewish
- * year and month that this Object is set to.
+ * Method to return tzais (dusk) calculated using 96 minutes zmaniyos or 1/7.5 of the day after
+ * {@link #getSeaLevelSunset() sea level sunset}.
*
- * @return the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
+ * @see #getAlos96Zmanis()
*/
- getChalakimSinceMoladTohu(): number;
+ getTzais96Zmanis(): Temporal.ZonedDateTime | null;
/**
- * Converts the {@link JewishDate#NISSAN} based constants used by this class to numeric month starting from
- * {@link JewishDate#TISHREI}. This is required for Molad claculations.
+ * Method to return tzais (dusk) calculated as 90 minutes after sea level sunset. This method returns
+ * tzais (nightfall) based on the opinion of the Magen Avraham that the time to walk the distance of a
+ * Mil according to the Rambam's opinion
+ * is 18 minutes for a total of 90 minutes based on the opinion of Ula who calculated tzais as 5
+ * Mil after sea level shkiah (sunset). A similar calculation {@link #getTzais19Point8Degrees()}
+ * uses solar position calculations based on this time.
*
- * @param year
- * The Jewish year
- * @param month
- * The Jewish Month
- * @return the Jewish month of the year starting with Tishrei
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
+ * @see #getTzais19Point8Degrees()
+ * @see #getAlos90()
*/
- private static getJewishMonthOfYear;
+ getTzais90(): Temporal.ZonedDateTime | undefined;
/**
- * Validates the components of a Jewish date for validity. It will throw an {@link IllegalArgumentException} if the
- * Jewish date is earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a
- * {@link #isJewishLeapYear(int) leap year}), the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 >
- * 59 or chalakim < 0 > 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the chalakim into
- * minutes (18 chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793/TaShTzaG).
+ * This method should be used lechumra only and returns tzais (nightfall) based on the calculations
+ * of Rav Chaim Naeh that the time to walk the
+ * distance of a Mil according to the Rambam's opinion
+ * is 2/5 of an hour (24 minutes) for a total of 120 minutes based on the opinion of Ula who calculated
+ * tzais as 5 Mil after sea level shkiah (sunset). A similar calculation {@link
+ * #getTzais26Degrees()} uses degree-based calculations based on this 120 minute calculation. Since the zman
+ * is extremely late and at a point that is long past the 18° point where the darkest point is
+ * reached, it should only be used lechumra, such as delaying the start of nighttime mitzvos.
+ *
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
+ *
+ * @return 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 the {@link AstronomicalCalendar}.
+ * documentation.
+ * @see #getTzais26Degrees()
+ * @see #getAlos120()
+ */
+ getTzais120(): Temporal.ZonedDateTime;
+ /**
+ * This method should be used lechumra only and returns tzais (dusk) calculated using 120 minutes
+ * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. Since the zman
+ * is extremely late and at a point when the it is long past the 18° point where the darkest point is
+ * reached, it should only be used lechumra, such as delaying the start of nighttime mitzvos.
*
- * @param year
- * the Jewish year to validate. It will reject any year <= 3761 (lower than the year 1 Gregorian).
- * @param month
- * the Jewish month to validate. It will reject a month < 1 or > 12 (or 13 on a leap year) .
- * @param dayOfMonth
- * the day of the Jewish month to validate. It will reject any value < 1 or > 30 TODO: check calling
- * methods to see if there is any reason that the class can validate that 30 is invalid for some months.
- * @param hours
- * the hours (for molad calculations). It will reject an hour < 0 or > 23
- * @param minutes
- * the minutes (for molad calculations). It will reject a minute < 0 or > 59
- * @param chalakim
- * the chalakim/parts (for molad calculations). It will reject a chalakim < 0 or > 17. For larger numbers
- * such as 793 (TaShTzaG) break the chalakim into minutes (18 chalakim per minutes, so it would be 44
- * minutes and 1 chelek in the case of 793/TaShTzaG)
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
*
- * @throws IllegalArgumentException
- * if a A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a
- * leap year), the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 > 59 or chalakim < 0 >
- * 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the chalakim into minutes (18
- * chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG).
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
+ * @see #getAlos120Zmanis()
+ * @see #getTzais120()
+ * @see #getTzais26Degrees()
*/
- private static validateJewishDate;
+ getTzais120Zmanis(): Temporal.ZonedDateTime | null;
/**
- * Validates the components of a Gregorian date for validity. It will throw an {@link IllegalArgumentException} if a
- * year of < 1, a month < 0 or > 11 or a day of month < 1 is passed in.
+ * This calculates the time of tzais at the point when the sun is 16.1° below the horizon. This is
+ * the sun's dip below the horizon 72 minutes after sunset according Rabbeinu Tam's calculation of tzais
+ * around the equinox / equilux in
+ * Jerusalem. The question of equinox VS equilux is complex, with Rabbi Meir Posen in the Ohr Meir of the opinion that the equilux should be used. See
+ * Yisrael Vehazmanim vol I, 34:1:4. Rabbi Yedidya Manet in his Zmanei Halacha Lema'aseh (4th edition part 2, pages
+ * and 22 and 24) and Rabbi Yonah Metzbuch (in a letter published by Rabbi Manet) are of the opinion that the
+ * astronomical equinox should be used. The difference adds up to about 9 seconds, too trivial to make much of a
+ * difference. For information on how this is calculated see the comments on {@link #getAlos16Point1Degrees()}.
*
- * @param year
- * the Gregorian year to validate. It will reject any year < 1.
- * @param month
- * the Gregorian month number to validate. It will enforce that the month is between 0 - 11 like a
- * {@link GregorianCalendar}, where {@link Calendar#JANUARY} has a value of 0.
- * @param dayOfMonth
- * the day of the Gregorian month to validate. It will reject any value < 1, but will allow values > 31
- * since calling methods will simply set it to the maximum for that month. TODO: check calling methods to
- * see if there is any reason that the class needs days > the maximum.
- * @throws IllegalArgumentException
- * if a year of < 1, a month < 0 or > 11 or a day of month < 1 is passed in
- * @see #validateGregorianYear(int)
- * @see #validateGregorianMonth(int)
- * @see #validateGregorianDayOfMonth(int)
+ * @return the Date
representing the time. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getTzais72()
+ * @see #getAlos16Point1Degrees() for more information on this calculation.
*/
- private static validateGregorianDate;
+ getTzais16Point1Degrees(): Temporal.ZonedDateTime | null;
/**
- * Validates a Gregorian month for validity.
+ * This method should be used lechumra only and returns tzais based on when the sun is 26°
+ * below the horizon.For information on how this is calculated see the comments on {@link #getAlos26Degrees()}.
+ * Since the zman is extremely late and at a point when it is long past the 18° point where the
+ * darkest point is reached, it should only be used lechumra such as delaying the start of nighttime
+ * mitzvos.
*
- * @param month
- * the Gregorian month number to validate. It will enforce that the month is between 0 - 11 like a
- * {@link GregorianCalendar}, where {@link Calendar#JANUARY} has a value of 0.
+ * @deprecated This method should be used lechumra only since it returns a very late time, and if used
+ * lekula can result in chillul Shabbos etc. There is no current plan to remove this
+ * method from the API, and this deprecation is intended to alert developers of the danger of using it.
+ *
+ * @return the Date
representing the time. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getTzais120()
+ * @see #getAlos26Degrees()
*/
- private static validateGregorianMonth;
+ getTzais26Degrees(): Temporal.ZonedDateTime | null;
/**
- * Validates a Gregorian day of month for validity.
+ * For information on how this is calculated see the comments on {@link #getAlos18Degrees()}
*
- * @param dayOfMonth
- * the day of the Gregorian month to validate. It will reject any value < 1, but will allow values > 31
- * since calling methods will simply set it to the maximum for that month. TODO: check calling methods to
- * see if there is any reason that the class needs days > the maximum.
+ * @return the Date
representing the time. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getAlos18Degrees()
*/
- private static validateGregorianDayOfMonth;
+ getTzais18Degrees(): Temporal.ZonedDateTime | null;
/**
- * Validates a Gregorian year for validity.
+ * For information on how this is calculated see the comments on {@link #getAlos19Point8Degrees()}
*
- * @param year
- * the Gregorian year to validate. It will reject any year < 1.
+ * @return the Date
representing the time. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getTzais90()
+ * @see #getAlos19Point8Degrees()
*/
- private static validateGregorianYear;
+ getTzais19Point8Degrees(): Temporal.ZonedDateTime | null;
/**
- * Returns the number of days for a given Jewish year. ND+ER
+ * A method to return tzais (dusk) calculated as 96 minutes after sea level sunset. For information on how
+ * this is calculated see the comments on {@link #getAlos96()}.
*
- * @param year
- * the Jewish year
- * @return the number of days for a given Jewish year.
- * @see #isCheshvanLong()
- * @see #isKislevShort()
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
+ * @see #getAlos96()
*/
- static getDaysInJewishYear(year: number): number;
+ getTzais96(): Temporal.ZonedDateTime | undefined;
/**
- * Returns the number of days for the current year that the calendar is set to.
+ * A method that returns the local time for fixed chatzos. This time is noon and midnight adjusted from
+ * standard time to account for the local latitude. The 360° of the globe divided by 24 calculates to 15°
+ * per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... Chatzos is at exactly 12:00
+ * noon. This is the time of chatzos according to the Aruch Hashulchan in Orach Chaim 233:14 and Rabbi Moshe Feinstein in Igros Moshe Orach Chaim 1:24 and 2:20.
+ * Lakewood, N.J., with a longitude of -74.2094, is 0.7906 away from the closest multiple of 15 at -75°. This
+ * is multiplied by 4 to yield 3 minutes and 10 seconds for a chatzos of 11:56:50. This method is not tied
+ * to the theoretical 15° timezones, but will adjust to the actual timezone and Daylight saving time.
*
- * @return the number of days for the Object's current Jewish year.
- * @see #isCheshvanLong()
- * @see #isKislevShort()
- * @see #isJewishLeapYear()
+ * @return the Date representing the local chatzos
+ * @see GeoLocation#getLocalMeanTimeOffset()
*/
- getDaysInJewishYear(): number;
+ getFixedLocalChatzos(): Temporal.ZonedDateTime | undefined;
/**
- * Returns if Cheshvan is long in a given Jewish year. The method name isLong is done since in a Kesidran (ordered)
- * year Cheshvan is short. ND+ER
+ * A method that returns the latest zman krias shema (time to recite Shema in the morning) calculated as 3
+ * clock hours before {@link #getFixedLocalChatzos()}. Note that there are opinions brought down in Yisrael Vehazmanim
+ * page 57 and Rav Yitzchak Silber's Sha'aos Shavos Balalacha that this calculation is a mistake and regular
+ * chatzos shoud be used for clock-hour calculations as opposed to fixed local chatzos. According to
+ * these opinions it should be 3 clock hours before regular chatzos as calculated in {@link
+ * #getSofZmanShma3HoursBeforeChatzos()}.
+ *
+ * @return the Date
of the latest zman krias shema calculated as 3 clock hours before
+ * {@link #getFixedLocalChatzos()}.
+ * @see #getFixedLocalChatzos()
+ * @see #getSofZmanShma3HoursBeforeChatzos()
+ * @see #getSofZmanTfilaFixedLocal()
+ *
+ * @deprecated This method of calculating sof zman Shma is considered a mistaken understanding of the proper
+ * calculation of this zman in the opinion of Rav Yitzchak Silber's Sha'aos Shavos Balalacha. On pages 316-318 he discusses Rav Yisrael
+ * Harfenes's calculations and points to his seeming agreement that using fixed local chatzos as the focal
+ * point is problematic. See Yisrael Vehazmanim page 57. While the Yisrael Vehazmanim mentions
+ * this issue in vol. 1, it was not corrected in the calculations in vol. 3 and other parts of the sefer.
+ * A competent rabbinical authority should be consulted before using this zman. Instead, the use of {@link
+ * #getSofZmanShma3HoursBeforeChatzos()} should be used to calculate sof zman Tfila using 3 fixed clock hours.
+ * This will likely be removed in v3.0.
+ */
+ getSofZmanShmaFixedLocal(): Temporal.ZonedDateTime | undefined;
+ /**
+ * This method returns the latest zman tfila (time to recite the morning prayers) calculated as 2 hours
+ * before {@link #getFixedLocalChatzos()}. See the documentation on {@link #getSofZmanShmaFixedLocal()} showing
+ * differing opinions on how the zman is calculated. According to many opinions {@link
+ * #getSofZmanTfila2HoursBeforeChatzos()} should be used as opposed to this zman.
+ *
+ * @return the Date
of the latest zman tfila.
+ * @see #getFixedLocalChatzos()
+ * @see #getSofZmanShmaFixedLocal()
+ * @see #getSofZmanTfila2HoursBeforeChatzos()
+ *
+ * @deprecated This method of calculating sof zman Tfila is considered a mistaken understanding of the proper
+ * calculation of this zman in the opinion of Rav Yitzchak Silber's Sha'aos Shavos Balalacha. On pages 316-318 he discusses Rav Yisrael
+ * Harfenes's calculations and points to his seeming agreement that using fixed local chatzos as the focal
+ * point is problematic. See Yisrael Vehazmanim page 57. While the Yisrael Vehazmanim mentions
+ * this issue in vol. 1, it was not corrected in the calculations in vol. 3 and other parts of the sefer.
+ * A competent rabbinical authority should be consulted before using this zman. Instead, the use of {@link
+ * #getSofZmanTfila2HoursBeforeChatzos()} should be used to calculate sof zman Tfila using 2 fixed
+ * clock hours. This will likely be removed in v3.0.
+ */
+ getSofZmanTfilaFixedLocal(): Temporal.ZonedDateTime | undefined;
+ /**
+ * Returns the latest time of Kidush 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.
+ * If the time of sof zman Kiddush Levana occurs during the day (between the alos and tzais passed in
+ * as parameters), it returns the alos passed in. If a null alos or tzais are passed to this method,
+ * the non-daytime adjusted time will be returned.
*
- * @param year
- * the year
- * @return true if Cheshvan is long in Jewish year.
- * @see #isCheshvanLong()
- * @see #getCheshvanKislevKviah()
+ * @param alos
+ * 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.
+ * @param tzais
+ * 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 parameter
+ * are null, no daytime adjustment will be made.
+ * @return the Date representing the moment halfway between molad and molad. If the time occurs between
+ * alos and tzais, alos will be returned
+ * @see #getSofZmanKidushLevanaBetweenMoldos()
+ * @see #getSofZmanKidushLevana15Days(Date, Date)
+ * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos()
*/
- private static isCheshvanLong;
+ getSofZmanKidushLevanaBetweenMoldos(alos: Temporal.ZonedDateTime, tzais: Temporal.ZonedDateTime): Temporal.ZonedDateTime | null;
/**
- * Returns if Cheshvan is long (30 days VS 29 days) for the current year that the calendar is set to. The method
- * name isLong is done since in a Kesidran (ordered) year Cheshvan is short.
+ * Returns the Date of the molad based time if it occurs on the current date. Since Kiddush Levana
+ * can only be said during the day, there are parameters to limit it to between alos and tzais. If
+ * the time occurs between alos and tzais, tzais will be returned.
*
- * @return true if Cheshvan is long for the current year that the calendar is set to
- * @see #isCheshvanLong()
+ * @param moladBasedTime
+ * the molad based time such as molad, tchilas and sof zman Kiddush Levana
+ * @param alos
+ * optional start of day to limit molad times to the end of the night before or beginning of the next night.
+ * Ignored if either alos or tzais are null.
+ * @param tzais
+ * optional end of day to limit molad times to the end of the night before or beginning of the next night.
+ * Ignored if either tzais or alos are null
+ * @param techila
+ * is it the start of Kiddush Levana time or the end? If it is start roll it to the next tzais, and
+ * and if it is the end, return the end of the previous night (alos passed in). Ignored if either
+ * alos or tzais are null.
+ * @return the molad based time. If the zman does not occur during the current date, null will be returned.
*/
- isCheshvanLong(): boolean;
+ private getMoladBasedTime;
/**
- * Returns if Kislev is short (29 days VS 30 days) in a given Jewish year. The method name isShort is done since in
- * a Kesidran (ordered) year Kislev is long. ND+ER
+ * Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the
+ * opinion brought down in 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
+ * {@link #getSofZmanKidushLevanaBetweenMoldos(Date, Date) 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. If the time of sof zman Kiddush Levana occurs during
+ * the day (between the alos and tzais passed in as parameters), it returns the alos passed in. If a
+ * null alos or tzais are passed to this method, the non-daytime adjusted time will be returned.
*
- * @param year
- * the Jewish year
- * @return true if Kislev is short for the given Jewish year.
- * @see #isKislevShort()
- * @see #getCheshvanKislevKviah()
+ * @param alos
+ * 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.
+ * @param tzais
+ * 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.
+ *
+ * @return the Date representing the moment 15 days after the molad. If the time occurs between alos and
+ * tzais, alos will be returned
+ *
+ * @see #getSofZmanKidushLevanaBetweenMoldos(Date, Date)
+ * @see JewishCalendar#getSofZmanKidushLevana15Days()
*/
- private static isKislevShort;
+ getSofZmanKidushLevana15Days(alos?: Temporal.ZonedDateTime | null, tzais?: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
/**
- * Returns if the Kislev is short for the year that this class is set to. The method name isShort is done since in a
- * Kesidran (ordered) year Kislev is long.
+ * Returns the earliest time of Kiddush Levana according to 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.
*
- * @return true if Kislev is short for the year that this class is set to
+ * @param alos
+ * 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.
+ * @param tzais
+ * 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.
+ *
+ * @return the Date representing the moment 3 days after the molad. If the time occurs between alos and
+ * tzais, tzais will be returned
+ * @see #getTchilasZmanKidushLevana3Days()
+ * @see #getTchilasZmanKidushLevana7Days(Date, Date)
+ * @see JewishCalendar#getTchilasZmanKidushLevana3Days()
*/
- isKislevShort(): boolean;
+ getTchilasZmanKidushLevana3Days(alos?: Temporal.ZonedDateTime | null, tzais?: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
/**
- * Returns the Cheshvan and Kislev kviah (whether a Jewish year is short, regular or long). It will return
- * {@link #SHELAIMIM} if both cheshvan and kislev are 30 days, {@link #KESIDRAN} if Cheshvan is 29 days and Kislev
- * is 30 days and {@link #CHASERIM} if both are 29 days.
+ * Returns the point in time of Molad as a Date
Object. For the traditional day of week, hour,
+ * minute and chalakim, {@link JewishCalendar#getMoladAsDate()} and the not yet completed
+ * {@link HebrewDateFormatter} that will have formatting for this.
*
- * @return {@link #SHELAIMIM} if both cheshvan and kislev are 30 days, {@link #KESIDRAN} if Cheshvan is 29 days and
- * Kislev is 30 days and {@link #CHASERIM} if both are 29 days.
- * @see #isCheshvanLong()
- * @see #isKislevShort()
+ * @return the Date representing the moment of the molad. If the molad does not occur on this day, a null will be returned.
+ *
+ * @see #getTchilasZmanKidushLevana3Days()
+ * @see #getTchilasZmanKidushLevana7Days(Date, Date)
+ * @see JewishCalendar#getMoladAsDate()
*/
- getCheshvanKislevKviah(): number;
+ getZmanMolad(): Temporal.ZonedDateTime | null;
/**
- * Returns the number of days of a Jewish month for a given month and year.
- *
- * @param month
- * the Jewish month
- * @param year
- * the Jewish Year
- * @return the number of days for a given Jewish month
+ * Used by Molad based zmanim to determine if zmanim occur during the current day.
+ * @see #getMoladBasedTime(Date, Date, Date, boolean)
+ * @return previous midnight
*/
- private static getDaysInJewishMonth;
+ private getMidnightLastNight;
/**
- * Returns the number of days of the Jewish month that the calendar is currently set to.
- *
- * @return the number of days for the Jewish month that the calendar is currently set to.
+ * Used by Molad based zmanim to determine if zmanim occur during the current day.
+ * @see #getMoladBasedTime(Date, Date, Date, boolean)
+ * @return following midnight
*/
- getDaysInJewishMonth(): number;
+ private getMidnightTonight;
/**
- * Returns the molad for a given year and month. Returns a JewishDate {@link Object} set to the date of the molad
- * with the {@link #getMoladHours() hours}, {@link #getMoladMinutes() minutes} and {@link #getMoladChalakim()
- * chalakim} set. In the current implementation, it sets the molad time based on a midnight date rollover. This
- * means that Rosh Chodesh Adar II, 5771 with a molad of 7 chalakim past midnight on Shabbos 29 Adar I / March 5,
- * 2011 12:00 AM and 7 chalakim, will have the following values: hours: 0, minutes: 0, Chalakim: 7.
+ * Returns the earliest time of Kiddush Levana according to the opinions that it should not be said until 7
+ * days after the molad. If the time of tchilas zman Kiddush Levana occurs during the day (between
+ * {@link ZmanimCalendar#getAlos72() alos} and {@link ZmanimCalendar#getTzais72() tzais}) it
+ * return the next tzais.
*
- * @return a JewishDate {@link Object} set to the date of the molad with the {@link #getMoladHours() hours},
- * {@link #getMoladMinutes() minutes} and {@link #getMoladChalakim() chalakim} set.
+ * @param alos
+ * 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.
+ * @param tzais
+ * 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.
+ *
+ * @return the Date representing the moment 7 days after the molad. If the time occurs between alos and
+ * tzais, tzais will be returned
+ * @see #getTchilasZmanKidushLevana3Days(Date, Date)
+ * @see #getTchilasZmanKidushLevana7Days()
+ * @see JewishCalendar#getTchilasZmanKidushLevana7Days()
*/
- getMolad(): JewishDate;
+ getTchilasZmanKidushLevana7Days(alos?: Temporal.ZonedDateTime | null, tzais?: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null;
/**
- * Returns the number of days from the Jewish epoch from the number of chalakim from the epoch passed in.
+ * This method returns the latest time one is allowed eating chametz on Erev Pesach according to
+ * the opinion of theGRA. This time is identical to the {@link
+ * #getSofZmanTfilaGRA() Sof zman tfilah GRA} and is provided as a convenience method for those who are
+ * unaware how this zman is calculated. This time is 4 hours into the day based on the opinion of the
+ * GRA that the day is calculated from sunrise to sunset.
+ * This returns the time 4 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea level sunrise}.
*
- * @param chalakim
- * the number of chalakim since the beginning of Sunday prior to BaHaRaD
- * @return the number of days from the Jewish epoch
+ * @see ZmanimCalendar#getShaahZmanisGra()
+ * @see ZmanimCalendar#getSofZmanTfilaGRA()
+ * @return the Date
one is allowed eating chametz on Erev Pesach. 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
+ * {@link AstronomicalCalendar} documentation.
*/
- private static moladToAbsDate;
+ getSofZmanAchilasChametzGRA(): Temporal.ZonedDateTime | null;
/**
- * Constructor that creates a JewishDate based on a molad passed in. The molad would be the number of chalakim/parts
- * starting at the beginning of Sunday prior to the molad Tohu BeHaRaD (Be = Monday, Ha= 5 hours and Rad =204
- * chalakim/parts) - prior to the start of the Jewish calendar. BeHaRaD is 23:11:20 on Sunday night(5 hours 204/1080
- * chalakim after sunset on Sunday evening).
+ * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the
+ * opinion of the Magen Avraham (MGA) based on alos
+ * being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is identical to the
+ * {@link #getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link #getShaahZmanisMGA()
+ * shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of the MGA that the day is
+ * calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link #getTzais72() nightfall} of 72 minutes
+ * after sunset. This returns the time of 4 * {@link #getShaahZmanisMGA()} after {@link #getAlos72() dawn}.
*
- * @param molad the number of chalakim since the beginning of Sunday prior to BaHaRaD
+ * @return the Date
of the latest time of eating chametz. 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
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanisMGA()
+ * @see #getAlos72()
+ * @see #getSofZmanTfilaMGA72Minutes()
*/
+ getSofZmanAchilasChametzMGA72Minutes(): Temporal.ZonedDateTime | null;
/**
- * Sets the molad time (hours minutes and chalakim) based on the number of chalakim since the start of the day.
+ * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the
+ * opinion of theMagen Avraham (MGA) based on alos
+ * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time is 4 {@link
+ * #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees() dawn}
+ * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1°
+ * below sunrise or sunset. This returns the time of 4 {@link #getShaahZmanis16Point1Degrees()} after
+ * {@link #getAlos16Point1Degrees() dawn}.
*
- * @param chalakim
- * the number of chalakim since the start of the day.
+ * @return the Date
of the latest time of eating chametz. 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 the {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getShaahZmanis16Point1Degrees()
+ * @see #getAlos16Point1Degrees()
+ * @see #getSofZmanTfilaMGA16Point1Degrees()
*/
- private setMoladTime;
+ getSofZmanAchilasChametzMGA16Point1Degrees(): Temporal.ZonedDateTime | null;
/**
- * returns the number of days from Rosh Hashana of the date passed in, to the full date passed in.
+ * 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 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea
+ * level sunrise}.
*
- * @return the number of days
+ * @see ZmanimCalendar#getShaahZmanisGra()
+ * @return the Date
of the latest time for burning chametz on Erev Pesach. 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 {@link AstronomicalCalendar} documentation.
*/
- getDaysSinceStartOfJewishYear(): number;
- constructor(jewishYear: number, jewishMonth: number, jewishDayOfMonth: number);
- constructor(molad: number);
- constructor(date: Date);
- constructor(date: Temporal.PlainDate);
- constructor();
+ getSofZmanBiurChametzGRA(): Temporal.ZonedDateTime | null;
/**
- * Creates a Jewish date based on a Jewish year, month and day of month.
+ * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of
+ * the Magen Avraham (MGA) based on alos
+ * being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 5 {@link
+ * #getShaahZmanisMGA() shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of
+ * the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link
+ * #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link #getShaahZmanisMGA()} after
+ * {@link #getAlos72() dawn}.
*
- * @param jewishYear
- * the Jewish year
- * @param jewishMonth
- * the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the
- * constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar II) to avoid any
- * confusion.
- * @param jewishDayOfMonth
- * the Jewish day of month. If 30 is passed in for a month with only 29 days (for example {@link #IYAR},
- * or {@link #KISLEV} in a year that {@link #isKislevShort()}), the 29th (last valid date of the month)
- * will be set
- * @throws IllegalArgumentException
- * if the day of month is < 1 or > 30, or a year of < 0 is passed in.
+ * @return the Date
of the latest time for burning chametz on Erev Pesach. 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
+ * {@link AstronomicalCalendar} documentation.
+ * @see #getShaahZmanisMGA()
+ * @see #getAlos72()
*/
+ getSofZmanBiurChametzMGA72Minutes(): Temporal.ZonedDateTime | null;
/**
- * Default constructor will set a default date to the current system date.
+ * This method returns the latest time for burning chametz on Erev Pesach according to the opinion
+ * of the Magen Avraham (MGA) based on alos
+ * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time is 5
+ * {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees()
+ * dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1°
+ * below sunrise or sunset. This returns the time of 5 {@link #getShaahZmanis16Point1Degrees()} after
+ * {@link #getAlos16Point1Degrees() dawn}.
+ *
+ * @return the Date
of the latest time for burning chametz on Erev Pesach. 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 the {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getShaahZmanis16Point1Degrees()
+ * @see #getAlos16Point1Degrees()
*/
+ getSofZmanBiurChametzMGA16Point1Degrees(): Temporal.ZonedDateTime | null;
/**
- * A constructor that initializes the date to the {@link java.util.Date Date} paremeter.
+ * A method that returns the Baal Hatanya's
+ * netz amiti (sunrise) without {@link AstronomicalCalculator#getElevationAdjustment(double)
+ * elevation adjustment}. This forms the base for the Baal Hatanya's dawn-based calculations that are
+ * calculated as a dip below the horizon before sunrise.
*
- * @param date
- * the Date
to set the calendar to
- * @throws IllegalArgumentException
- * if the date would fall prior to the January 1, 1 AD
+ * According to the Baal Hatanya, netz amiti, or true (halachic) sunrise, is when the top of the sun's
+ * disk is visible at an elevation similar to the mountains of Eretz Yisrael. The time is calculated as the point at which
+ * the center of the sun's disk is 1.583° below the horizon. This degree-based calculation can be found in Rabbi Shalom
+ * DovBer Levine's commentary on The Baal
+ * Hatanya's Seder Hachnasas Shabbos. From an elevation of 546 meters, the top of Har Hacarmel, the sun disappears when it is 1° 35' or 1.583°
+ * below the sea level horizon. This in turn is based on the Gemara Shabbos 35a. There are other opinions brought down by
+ * Rabbi Levine, including Rabbi Yosef Yitzchok Feigelstock who calculates it as the degrees below the horizon 4 minutes after
+ * sunset in Yerushalayim (on the equinox). That is brought down as 1.583°. This is identical to the 1° 35' zman
+ * and is probably a typo and should be 1.683°. These calculations are used by most Chabad calendars that use the Baal Hatanya's zmanim. See
+ * About Our
+ * Zmanim Calculations @ Chabad.org.
+ *
+ * Note: netz amiti is used only for calculating certain zmanim, and is intentionally unpublished. For
+ * practical purposes, daytime mitzvos like shofar and lulav should not be done until after the
+ * published time for netz / sunrise.
+ *
+ * @return the Date
representing the exact sea-level netz amiti (sunrise) 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 page.
+ *
+ * @see #getSunrise()
+ * @see #getSeaLevelSunrise()
+ * @see #getSunsetBaalHatanya()
+ * @see #ZENITH_1_POINT_583
*/
+ private getSunriseBaalHatanya;
/**
- * A constructor that initializes the date to the {@link java.util.Calendar Calendar} paremeter.
+ * A method that returns the Baal Hatanya's
+ * shkiah amiti (sunset) without {@link AstronomicalCalculator#getElevationAdjustment(double)
+ * elevation adjustment}. This forms the base for the Baal Hatanya's dusk-based calculations that are calculated
+ * as a dip below the horizon after sunset.
*
- * @param calendar
- * the Calendar
to set the calendar to
- * @throws IllegalArgumentException
- * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC}
+ * According to the Baal Hatanya, shkiah amiti, true (halachic) sunset, is when the top of the
+ * sun's disk disappears from view at an elevation similar to the mountains of Eretz Yisrael.
+ * This time is calculated as the point at which the center of the sun's disk is 1.583 degrees below the horizon.
+ *
+ * Note: shkiah amiti is used only for calculating certain zmanim, and is intentionally unpublished. For
+ * practical purposes, all daytime mitzvos should be completed before the published time for shkiah / sunset.
+ *
+ * For further explanation of the calculations used for the Baal Hatanya's zmanim in this library, see
+ * About Our
+ * Zmanim Calculations @ Chabad.org.
+ *
+ * @return the Date
representing the exact sea-level shkiah amiti (sunset) 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
+ * {@link AstronomicalCalendar} documentation.
+ *
+ * @see #getSunset()
+ * @see #getSeaLevelSunset()
+ * @see #getSunriseBaalHatanya()
+ * @see #ZENITH_1_POINT_583
*/
+ private getSunsetBaalHatanya;
/**
- * Sets the date based on a {@link java.util.Calendar Calendar} object. Modifies the Jewish date as well.
+ * A method that returns the Baal Hatanya's
+ * a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}). This forms the base for the
+ * Baal Hatanya's day based calculations that are calculated as a 1.583° dip below the horizon after sunset.
+ * According to the Baal Hatanya, shkiah amiti, true (halachic) sunset, is when the top of the
+ * sun's disk disappears from view at an elevation similar to the mountains of Eretz Yisrael.
+ * This time is calculated as the point at which the center of the sun's disk is 1.583 degrees below the horizon.
+ * A method that returns a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}) calculated
+ * based on the Baal Hatanya's netz
+ * amiti and shkiah amiti using a dip of 1.583° below the sea level horizon. This calculation divides
+ * the day based on the opinion of the Baal Hatanya that the day runs from {@link #getSunriseBaalHatanya() netz amiti}
+ * to {@link #getSunsetBaalHatanya() shkiah amiti}. The calculations are based on a day from {@link
+ * #getSunriseBaalHatanya() sea level netz amiti} to {@link #getSunsetBaalHatanya() sea level shkiah amiti}.
+ * The day is split into 12 equal parts with each one being a shaah zmanis. This method is similar to {@link
+ * #getTemporalHour}, but all calculations are based on a sea level sunrise and sunset.
+ * @return the long
millisecond length of a shaah zmanis calculated from
+ * {@link #getSunriseBaalHatanya() netz amiti (sunrise)} to {@link #getSunsetBaalHatanya() shkiah amiti
+ * ("real" 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, {@link Long#MIN_VALUE} will be returned. See
+ * detailed explanation on top of the {@link AstronomicalCalendar} documentation.
*
- * @param date
- * the Calendar
to set the calendar to
- * @throws IllegalArgumentException
- * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC}
+ * @see #getTemporalHour(Date, Date)
+ * @see #getSunriseBaalHatanya()
+ * @see #getSunsetBaalHatanya()
+ * @see #ZENITH_1_POINT_583
*/
- setDate(date: Temporal.PlainDate): void;
+ getShaahZmanisBaalHatanya(): Temporal.Duration | undefined;
/**
- * Sets the date based on a {@link java.util.Date Date} object. Modifies the Jewish date as well.
+ * Returns the Baal Hatanya's alos
+ * (dawn) calculated as the time when the sun is 16.9° below the eastern {@link #GEOMETRIC_ZENITH geometric horizon}
+ * before {@link #getSunrise sunrise}. For more information the source of 16.9° see {@link #ZENITH_16_POINT_9}.
*
- * @param date
- * the Date
to set the calendar to
- * @throws IllegalArgumentException
- * if the date would fall prior to the year 1 AD
+ * @see #ZENITH_16_POINT_9
+ * @return 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 the {@link AstronomicalCalendar} documentation.
*/
+ getAlosBaalHatanya(): Temporal.ZonedDateTime | null;
/**
- * Sets the Gregorian Date, and updates the Jewish date accordingly. Like the Java Calendar A value of 0 is expected
- * for January.
+ * This method returns the latest zman krias shema (time to recite Shema in the morning). This time is 3
+ * {@link #getShaahZmanisBaalHatanya() shaos zmaniyos} (solar hours) after {@link #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 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya()
+ * netz amiti (sunrise)}.
*
- * @param year
- * the Gregorian year
- * @param month
- * the Gregorian month. Like the Java Calendar, this class expects 0 for January
- * @param dayOfMonth
- * the Gregorian day of month. If this is > the number of days in the month/year, the last valid date of
- * the month will be set
- * @throws IllegalArgumentException
- * if a year of < 1, a month < 0 or > 11 or a day of month < 1 is passed in
+ * @see ZmanimCalendar#getSofZmanShma(Date, Date)
+ * @see #getShaahZmanisBaalHatanya()
+ * @return 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. See detailed explanation on top of the
+ * {@link AstronomicalCalendar} documentation.
*/
- setGregorianDate(year: number, month: number, dayOfMonth: number): void;
+ getSofZmanShmaBaalHatanya(): Temporal.ZonedDateTime | null;
/**
- * Sets the hidden internal representation of the Gregorian date , and updates the Jewish date accordingly. While
- * public getters and setters have 0 based months matching the Java Calendar classes, This class internally
- * represents the Gregorian month starting at 1. When this is called it will not adjust the month to match the Java
- * Calendar classes.
+ * 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 * {@link #getShaahZmanisBaalHatanya()} after
+ * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.
*
- * @param year - the year
- * @param month - the month
- * @param dayOfMonth - the day of month
+ * @see ZmanimCalendar#getSofZmanTfila(Date, Date)
+ * @see #getShaahZmanisBaalHatanya()
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
*/
- private setInternalGregorianDate;
+ getSofZmanTfilaBaalHatanya(): Temporal.ZonedDateTime | null;
/**
- * Sets the Jewish Date and updates the Gregorian date accordingly.
+ * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the
+ * opinion of the Baal Hatanya. This time is identical to the {@link #getSofZmanTfilaBaalHatanya() Sof zman tfilah
+ * Baal Hatanya}. 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 {@link #getShaahZmanisBaalHatanya()} after
+ * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.
*
- * @param year
- * the Jewish year. The year can't be negative
- * @param month
- * the Jewish month starting with Nisan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for
- * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar
- * II) to avoid any confusion.
- * @param dayOfMonth
- * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only
- * has 29 days, the day will be set as 29.
- * @throws IllegalArgumentException
- * if a A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a
- * leap year) or the day of month is < 1 or > 30 is passed in
+ * @see #getShaahZmanisBaalHatanya()
+ * @see #getSofZmanTfilaBaalHatanya()
+ * @return the Date
one is allowed eating chametz on Erev Pesach. 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
+ * {@link AstronomicalCalendar} documentation.
*/
+ getSofZmanAchilasChametzBaalHatanya(): Temporal.ZonedDateTime | null;
/**
- * Sets the Jewish Date and updates the Gregorian date accordingly.
- *
- * @param year
- * the Jewish year. The year can't be negative
- * @param month
- * the Jewish month starting with Nisan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for
- * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar
- * II) to avoid any confusion.
- * @param dayOfMonth
- * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only
- * has 29 days, the day will be set as 29.
- *
- * @param hours
- * the hour of the day. Used for Molad calculations
- * @param minutes
- * the minutes. Used for Molad calculations
- * @param chalakim
- * the chalakim/parts. Used for Molad calculations. The chalakim should not exceed 17. Minutes should be
- * used for larger numbers.
+ * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of
+ * the Baal Hatanya. This time is 5 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 5 * {@link #getShaahZmanisBaalHatanya()} after
+ * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.
*
- * @throws IllegalArgumentException
- * if a A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a
- * leap year), the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 > 59 or chalakim < 0 >
- * 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the chalakim into minutes (18
- * chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG).
+ * @see #getShaahZmanisBaalHatanya()
+ * @return the Date
of the latest time for burning chametz on Erev Pesach. 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
+ * {@link AstronomicalCalendar} documentation.
*/
- setJewishDate(year: number, month: number, dayOfMonth: number, hours: number, minutes: number, chalakim: number): void;
- setJewishDate(year: number, month: number, dayOfMonth: number): void;
+ getSofZmanBiurChametzBaalHatanya(): Temporal.ZonedDateTime | null;
/**
- * Returns this object's date as a {@link java.util.Calendar} object.
+ * 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 {@link #getMinchaKetanaBaalHatanya() 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 is calculated as 6.5 {@link #getShaahZmanisBaalHatanya()
+ * sea level solar hours} after {@link #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
+ * * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() netz amiti ("real" sunrise)}.
*
- * @return The {@link java.util.Calendar}
- */
- getDate(): Temporal.PlainDate;
- /**
- * Resets this date to the current system date.
+ * @see #getMinchaGedola(Date, Date)
+ * @see #getShaahZmanisBaalHatanya()
+ * @see #getMinchaKetanaBaalHatanya()
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
*/
- resetDate(): void;
+ getMinchaGedolaBaalHatanya(): Temporal.ZonedDateTime | null;
/**
- * Returns a string containing the Jewish date in the form, "day Month, year" e.g. "21 Shevat, 5729". For more
- * complex formatting, use the formatter classes.
- *
- * This functionality is duplicated from {@link HebrewDateFormatter} to avoid circular dependencies.
+ * This is a convenience method that returns the later of {@link #getMinchaGedolaBaalHatanya()} and
+ * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisBaalHatanya()
+ * shaah zmanis} is less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise
+ * {@link #getMinchaGedolaBaalHatanya()} will be returned.
*
- * @return the Jewish date in the form "day Month, year" e.g. "21 Shevat, 5729"
- * @see HebrewDateFormatter#format(JewishDate)
+ * @return the Date
of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}.
+ * 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 {@link AstronomicalCalendar} documentation.
*/
- toString(): string;
+ getMinchaGedolaBaalHatanyaGreaterThan30(): Temporal.ZonedDateTime | null;
/**
- * Rolls the date, month or year forward by the amount passed in. It modifies both the Gregorian and Jewish dates
- * accordingly. If manipulation beyond the fields supported here is required, use the {@link Calendar} class
- * {@link Calendar#add(int, int)} or {@link Calendar#roll(int, int)} methods in the following manner.
- *
- *
- *
- * Calendar cal = jewishDate.getTime(); // get a java.util.Calendar representation of the JewishDate
- * cal.add(Calendar.MONTH, 3); // add 3 Gregorian months
- * jewishDate.setDate(cal); // set the updated calendar back to this class
- *
- *
- *
- * @param field the calendar field to be forwarded. The must be {@link Calendar#DATE}, {@link Calendar#MONTH} or {@link Calendar#YEAR}
- * @param amount the positive amount to move forward
- * @throws IllegalArgumentException if the field is anything besides {@link Calendar#DATE}, {@link Calendar#MONTH}
- * or {@link Calendar#YEAR} or if the amount is less than 1
+ * 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 {@link #getMinchaGedolaBaalHatanya() mincha gedola}.
+ * This is calculated as 9.5 {@link #getShaahZmanisBaalHatanya() sea level solar hours} after {@link #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 * {@link #getShaahZmanisBaalHatanya()} after {@link
+ * #getSunriseBaalHatanya() netz amiti (sunrise)}.
*
- * @see #back()
- * @see Calendar#add(int, int)
- * @see Calendar#roll(int, int)
+ * @see #getMinchaKetana(Date, Date)
+ * @see #getShaahZmanisBaalHatanya()
+ * @see #getMinchaGedolaBaalHatanya()
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
*/
- forward(field: number, amount: number): void;
+ getMinchaKetanaBaalHatanya(): Temporal.ZonedDateTime | null;
/**
- * Rolls the date back by 1 day. It modifies both the Gregorian and Jewish dates accordingly. The API does not
- * currently offer the ability to forward more than one day t a time, or to forward by month or year. If such
- * manipulation is required use the {@link Calendar} class {@link Calendar#add(int, int)} or
- * {@link Calendar#roll(int, int)} methods in the following manner.
- *
- *
- *
- * Calendar cal = jewishDate.getTime(); // get a java.util.Calendar representation of the JewishDate
- * cal.add(Calendar.MONTH, -3); // subtract 3 Gregorian months
- * jewishDate.setDate(cal); // set the updated calendar back to this class
- *
- *
+ * 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 * {@link #getShaahZmanisBaalHatanya()} after
+ * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.
*
- * @see #back()
- * @see Calendar#add(int, int)
- * @see Calendar#roll(int, int)
- */
- back(): void;
- /**
- * Indicates whether some other object is "equal to" this one.
- * @see Object#equals(Object)
+ * @see #getPlagHamincha(Date, Date)
+ * @return 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 the
+ * {@link AstronomicalCalendar} documentation.
*/
- equals(object: JewishDate): boolean;
+ getPlagHaminchaBaalHatanya(): Temporal.ZonedDateTime | null;
/**
- * Compares two dates as per the compareTo() method in the Comparable interface. Returns a value less than 0 if this
- * date is "less than" (before) the date, greater than 0 if this date is "greater than" (after) the date, or 0 if
- * they are equal.
+ * A method that returns tzais (nightfall) when the sun is 6° below the western geometric horizon
+ * (90°) after {@link #getSunset sunset}. For information on the source of this calculation see
+ * {@link #ZENITH_6_DEGREES}.
+ *
+ * @return 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 the {@link AstronomicalCalendar} documentation.
+ * @see #ZENITH_6_DEGREES
*/
- compareTo(jewishDate: JewishDate): number;
+ getTzaisBaalHatanya(): Temporal.ZonedDateTime | null;
/**
- * Returns the Gregorian month (between 0-11).
+ * A utility methos to calculate zmanim based on Rav Moshe
+ * Feinstein as calculated in MTJ, Yeshiva of Staten Island, and Camp Yeshiva
+ * of Staten Island. The day is split in two, from alos / sunrise to fixed local chatzos, and the
+ * second half of the day, from fixed local chatzos to sunset / tzais. Morning based times are calculated
+ * based on the first 6 hours, and afternoon times based on the second half of the day.
*
- * @return the Gregorian month (between 0-11). Like the java.util.Calendar, months are 0 based.
+ * @param startOfHalfDay
+ * The start of the half day. This would be alos or sunrise for morning based times and fixed
+ * local chatzos for the second half of the day.
+ * @param endOfHalfDay
+ * The end of the half day. This would be fixed local chatzos for morning based times and sunset
+ * or tzais for afternoon based times.
+ * @param hours
+ * the number of hours to offset the beginning of the first or second half of the day
+ *
+ * @return the Date
of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}.
+ * 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 {@link AstronomicalCalendar} documentation.
+ *
+ * @see ComplexZmanimCalendar#getFixedLocalChatzos()
*/
- getGregorianMonth(): number;
+ getFixedLocalChatzosBasedZmanim(startOfHalfDay: Temporal.ZonedDateTime, endOfHalfDay: Temporal.ZonedDateTime, hours: number): Temporal.ZonedDateTime | null;
/**
- * Returns the Gregorian day of the month.
+ * This method returns Rav Moshe Feinstein's opinion of the
+ * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the
+ * opinion of the Magen Avraham (MGA) that the
+ * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts
+ * at alos defined as {@link #getAlos18Degrees() 18°} and ends at {@link #getFixedLocalChatzos() fixed local
+ * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after alos or half of this half-day.
*
- * @return the Gregorian day of the mont
+ * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getAlos18Degrees()
+ * @see #getFixedLocalChatzos()
+ * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)
*/
- getGregorianDayOfMonth(): number;
+ getSofZmanShmaMGA18DegreesToFixedLocalChatzos(): Temporal.ZonedDateTime | null;
/**
- * Returns the Gregotian year.
+ * This method returns Rav Moshe Feinstein's opinion of the
+ * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the
+ * opinion of the Magen Avraham (MGA) that the
+ * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts
+ * at alos defined as {@link #getAlos16Point1Degrees() 16.1°} and ends at {@link #getFixedLocalChatzos() fixed local
+ * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or half of this half-day.
*
- * @return the Gregorian year
+ * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getAlos16Point1Degrees()
+ * @see #getFixedLocalChatzos()
+ * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)
*/
- getGregorianYear(): number;
+ getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos(): Temporal.ZonedDateTime | null;
/**
- * Returns the Jewish month 1-12 (or 13 years in a leap year). The month count starts with 1 for Nisan and goes to
- * 13 for Adar II
+ * This method returns Rav Moshe Feinstein's opinion of the
+ * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the
+ * opinion of the Magen Avraham (MGA) that the
+ * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts
+ * at alos defined as {@link #getAlos90() 90 minutes before sunrise} and ends at {@link #getFixedLocalChatzos()
+ * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or
+ * half of this half-day.
*
- * @return the Jewish month from 1 to 12 (or 13 years in a leap year). The month count starts with 1 for Nisan and
- * goes to 13 for Adar II
+ * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getAlos90()
+ * @see #getFixedLocalChatzos()
+ * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)
*/
- getJewishMonth(): number;
+ getSofZmanShmaMGA90MinutesToFixedLocalChatzos(): Temporal.ZonedDateTime | null;
/**
- * Returns the Jewish day of month.
+ * This method returns Rav Moshe Feinstein's opinion of the
+ * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the
+ * opinion of the Magen Avraham (MGA) that the
+ * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts
+ * at alos defined as {@link #getAlos72() 72 minutes before sunrise} and ends at {@link #getFixedLocalChatzos()
+ * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or
+ * half of this half-day.
*
- * @return the Jewish day of the month
+ * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getAlos72()
+ * @see #getFixedLocalChatzos()
+ * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)
*/
- getJewishDayOfMonth(): number;
+ getSofZmanShmaMGA72MinutesToFixedLocalChatzos(): Temporal.ZonedDateTime | null;
/**
- * Returns the Jewish year.
+ * This method returns Rav Moshe Feinstein's opinion of the
+ * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the
+ * opinion of the GRA that the day is calculated from
+ * sunrise to sunset, but calculated using the first half of the day only. The half a day starts at {@link #getSunrise()
+ * sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman Shema is 3 shaos
+ * zmaniyos (solar hours) after sunrise or half of this half-day.
*
- * @return the Jewish year
+ * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getSunrise()
+ * @see #getFixedLocalChatzos()
+ * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)
*/
- getJewishYear(): number;
+ getSofZmanShmaGRASunriseToFixedLocalChatzos(): Temporal.ZonedDateTime | null;
/**
- * Returns the day of the week as a number between 1-7.
+ * This method returns Rav Moshe Feinstein's opinion of the
+ * calculation of sof zman tfila (zman tfilah (the latest time to recite the morning prayers))
+ * according to the opinion of the GRA that the day is
+ * calculated from sunrise to sunset, but calculated using the first half of the day only. The half a day starts at
+ * {@link #getSunrise() sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman tefila
+ * is 4 shaos zmaniyos (solar hours) after sunrise or 2/3 of this half-day.
*
- * @return the day of the week as a number between 1-7.
+ * @return the Date
of the latest zman krias shema. 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 the {@link AstronomicalCalendar} documentation.
+ * @see #getSunrise()
+ * @see #getFixedLocalChatzos()
+ * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)
*/
- getDayOfWeek(): number;
+ getSofZmanTfilaGRASunriseToFixedLocalChatzos(): Temporal.ZonedDateTime | null;
/**
- * Sets the Gregorian month.
+ * This method returns Rav Moshe Feinstein's opinion of
+ * the calculation of mincha gedola, the earliest time one can pray mincha GRAthat is 30 minutes after {@link #getFixedLocalChatzos() fixed
+ * local chatzos}.
*
- * @param month
- * the Gregorian month
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
*
- * @throws IllegalArgumentException
- * if a month < 0 or > 11 is passed in
+ * @see #getMinchaGedola()
+ * @see #getFixedLocalChatzos()
+ * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset
*/
- setGregorianMonth(month: number): void;
+ getMinchaGedolaGRAFixedLocalChatzos30Minutes(): Temporal.ZonedDateTime | undefined;
/**
- * sets the Gregorian year.
+ * This method returns Rav Moshe Feinstein's opinion
+ * of the calculation of mincha ketana (the preferred time to recite the mincha prayers according to
+ * the opinion of the Rambam and others) calculated according
+ * to the GRA that is 3.5 shaos zmaniyos (solar
+ * hours) after {@link #getFixedLocalChatzos() fixed local chatzos}.
*
- * @param year
- * the Gregorian year.
- * @throws IllegalArgumentException
- * if a year of < 1 is passed in
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
+ *
+ * @see #getMinchaGedola()
+ * @see #getFixedLocalChatzos()
+ * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes
*/
- setGregorianYear(year: number): void;
+ getMinchaKetanaGRAFixedLocalChatzosToSunset(): Temporal.ZonedDateTime | null;
/**
- * sets the Gregorian Day of month.
+ * This method returns Rav Moshe Feinstein's opinion
+ * of the calculation of plag hamincha. This method returns plag hamincha calculated according to the
+ * GRA that the day ends at sunset and is 4.75 shaos
+ * zmaniyos (solar hours) after {@link #getFixedLocalChatzos() fixed local chatzos}.
*
- * @param dayOfMonth
- * the Gregorian Day of month.
- * @throws IllegalArgumentException
- * if the day of month of < 1 is passed in
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
+ *
+ * @see #getPlagHamincha()
+ * @see #getFixedLocalChatzos()
+ * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset
+ * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes
*/
- setGregorianDayOfMonth(dayOfMonth: number): void;
+ getPlagHaminchaGRAFixedLocalChatzosToSunset(): Temporal.ZonedDateTime | null;
/**
- * sets the Jewish month.
+ * Method to return tzais (dusk) calculated as 50 minutes after sea level sunset. This method returns
+ * tzais (nightfall) based on the opinion of Rabbi Moshe Feinstein for the New York area. This time should
+ * not be used for latitudes different than the NY area.
*
- * @param month
- * the Jewish month from 1 to 12 (or 13 years in a leap year). The month count starts with 1 for Nisan
- * and goes to 13 for Adar II
- * @throws IllegalArgumentException
- * if a month < 1 or > 12 (or 13 on a leap year) is passed in
+ * @return 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 the {@link AstronomicalCalendar}
+ * documentation.
*/
- setJewishMonth(month: number): void;
+ getTzais50(): Temporal.ZonedDateTime | undefined;
/**
- * sets the Jewish year.
+ * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before
+ * {@link #getMinchaKetana()} or is 9 * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link
+ * #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()}
+ * setting), calculated according to the GRA using a day starting at
+ * sunrise and ending at sunset. This is the time that eating or other activity can't begin prior to praying mincha.
+ * The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos
+ * 16.1°}. See the Mechaber and Mishna Berurah
+ * 232 for details.
*
- * @param year
- * the Jewish year
- * @throws IllegalArgumentException
- * if a year of < 3761 is passed in. The same will happen if the year is 3761 and the month and day
- * previously set are < 18 Teves (preior to Jan 1, 1 AD)
+ * @see #getShaahZmanisGra()
+ * @see #getSamuchLeMinchaKetana16Point1Degrees()
+ * @return the Date
of the time of samuch lemincha ketana. 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 the {@link AstronomicalCalendar} documentation.
*/
- setJewishYear(year: number): void;
+ getSamuchLeMinchaKetanaGRA(): Temporal.ZonedDateTime | null;
/**
- * sets the Jewish day of month.
+ * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before
+ * {@link #getMinchaGedola16Point1Degrees()} or 9 * shaos zmaniyos (temporal hours) after the start of the day,
+ * calculated using a day starting and ending 16.1° below the horizon. This is the time that eating or other activity
+ * can't begin prior to praying mincha. The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after
+ * {@link #getAlos16Point1Degrees() alos 16.1°}. See the Mechaber and Mishna Berurah 232.
*
- * @param dayOfMonth
- * the Jewish day of month
- * @throws IllegalArgumentException
- * if the day of month is < 1 or > 30 is passed in
+ * @see #getShaahZmanis16Point1Degrees()
+ * @return the Date
of the time of samuch lemincha ketana. 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 the {@link AstronomicalCalendar} documentation.
*/
- setJewishDayOfMonth(dayOfMonth: number): void;
+ getSamuchLeMinchaKetana16Point1Degrees(): Temporal.ZonedDateTime | null;
/**
- * A method that creates a deep copy of the object.
+ * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before
+ * {@link #getMinchaKetana72Minutes()} or 9 * shaos zmaniyos (temporal hours) after the start of the day,
+ * calculated using a day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the time that eating
+ * or other activity can't begin prior to praying mincha. The calculation used is 9 * {@link
+ * #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos 16.1°}. See the Mechaber and Mishna Berurah 232.
*
- * @see Object#clone()
+ * @see #getShaahZmanis16Point1Degrees()
+ * @return the Date
of the time of samuch lemincha ketana. 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 the {@link AstronomicalCalendar} documentation.
*/
- clone(): JewishDate;
+ getSamuchLeMinchaKetana72Minutes(): Temporal.ZonedDateTime | null;
+ getClassName(): string;
}
declare abstract class Daf {
/**
@@ -9299,6 +9300,9 @@ export interface Options {
*/
complexZmanim?: boolean;
}
+export declare const temporalExtended: {
+ rangeDates: typeof rangeDates;
+};
export {
Temporal,
diff --git a/assets/libraries/kosherZmanim/kosher-zmanim.esm.js b/assets/libraries/kosherZmanim/kosher-zmanim.esm.js
index 28dd0db..7efd732 100644
--- a/assets/libraries/kosherZmanim/kosher-zmanim.esm.js
+++ b/assets/libraries/kosherZmanim/kosher-zmanim.esm.js
@@ -1,13 +1,13 @@
-var Rl=Object.defineProperty,vl=Object.defineProperties;var Ll=Object.getOwnPropertyDescriptors;var As=Object.getOwnPropertySymbols;var wl=Object.prototype.hasOwnProperty,Yl=Object.prototype.propertyIsEnumerable;var Es=(t,e,a)=>e in t?Rl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,m=(t,e)=>{for(var a in e||(e={}))wl.call(e,a)&&Es(t,a,e[a]);if(As)for(var a of As(e))Yl.call(e,a)&&Es(t,a,e[a]);return t},J=(t,e)=>vl(t,Ll(e));function Ze(t,e,a,n,o){return Ge(e,Ls(t,e),a,n,o)}function Ge(t,e,a,n,o,r){let i=_o(e,a,n);if(o&&e!==i)throw new RangeError(Ad(t,e,a,n,r));return i}function Ls(t,e){let a=t[e];if(a===void 0)throw new TypeError(Ii(e));return a}function le(t){return t!==null&&/object|function/.test(typeof t)}function Le(t,e=Map){let a=new e;return(n,...o)=>{if(a.has(n))return a.get(n);let r=t(n,...o);return a.set(n,r),r}}function nr(t){return Vt({name:t},1)}function Vt(t,e){return _e(a=>({value:a,configurable:1,writable:!e}),t)}function ws(t){return _e(e=>({get:e,configurable:1}),t)}function Zn(t){return{[Symbol.toStringTag]:{value:t,configurable:1}}}function da(t,e){let a={},n=t.length;for(let o of e)a[t[--n]]=o;return a}function _e(t,e,a){let n={};for(let o in e)n[o]=t(e[o],o,a);return n}function za(t,e,a){let n={};for(let o=0;o\r\n * This is the definition of lexicographic ordering. If two strings are\r\n * different, then either they have different characters at some index\r\n * that is a valid index for both strings, or their lengths are different,\r\n * or both. If they have different characters at one or more index\r\n * positions, let k be the smallest such index; then the string\r\n * whose character at position k has the smaller value, as\r\n * determined by using the < operator, lexicographically precedes the\r\n * other string. In this case, {@code compareTo} returns the\r\n * difference of the two character values at position {@code k} in\r\n * the two string -- that is, the value:\r\n *
\r\n * If there is no index position at which they differ, then the shorter\r\n * string lexicographically precedes the longer string. In this case,\r\n * {@code compareTo} returns the difference of the lengths of the\r\n * strings -- that is, the value:\r\n *\r\n * this.charAt(k)-anotherString.charAt(k)\r\n *
\r\n *\r\n * @param string1\r\n * @param string2 the {@code String} to be compared.\r\n * @return the value {@code 0} if the argument string is equal to\r\n * this string; a value less than {@code 0} if this string\r\n * is lexicographically less than the string argument; and a\r\n * value greater than {@code 0} if this string is\r\n * lexicographically greater than the string argument.\r\n */\r\n export function compareTo(string1: string, string2: string): number {\r\n let k: number = 0;\r\n while (k < Math.min(string1.length, string2.length)) {\r\n if (string1.substr(k, 1) !== string2.substr(k, 1)) {\r\n return string1.charCodeAt(k) - string2.charCodeAt(k);\r\n }\r\n k++;\r\n }\r\n return string1.length - string2.length;\r\n }\r\n}\r\n\r\nexport namespace IntegerUtils {\r\n /**\r\n * Compares 2 numbers\r\n * @param x\r\n * @param y\r\n */\r\n export function compare(x: number, y: number): number {\r\n if (x === y) return 0;\r\n return x > y ? 1 : -1;\r\n }\r\n\r\n}\r\n\r\n// export const Long_MIN_VALUE = 0;\r\nexport const Long_MIN_VALUE = NaN;\r\n\r\n/**\r\n * @param {number} num\r\n * @param {number} places - The number of places to pad with zeros\r\n * @returns {string} - The formatted integer\r\n */\r\nexport function padZeros(num: number, places: number): string {\r\n const int = Math.trunc(num);\r\n if (int >= Math.pow(10, places)) return int.toString();\r\n return '0'.repeat(places).concat(int.toString()).slice(-places);\r\n}", "/* eslint-disable max-classes-per-file */\r\nclass BaseCustomError extends Error {\r\n constructor(message?: string) {\r\n super(message);\r\n this.name = this.constructor.name;\r\n }\r\n}\r\n\r\nexport class NullPointerException extends BaseCustomError {\r\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\r\n constructor() {\r\n super();\r\n }\r\n}\r\n\r\nexport class IllegalArgumentException extends BaseCustomError {}\r\n\r\nexport class UnsupportedError extends BaseCustomError {}\r\n", "import { MathUtils, TimeZone } from '../polyfills/Utils.ts';\r\nimport { IllegalArgumentException, UnsupportedError } from '../polyfills/errors.ts';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\n/**\r\n * A class that contains location information such as latitude and longitude required for astronomical calculations. The\r\n * elevation field may not be used by some calculation engines and would be ignored if set. Check the documentation for\r\n * specific implementations of the {@link AstronomicalCalculator} to see if elevation is calculated as part of the\r\n * algorithm.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2016\r\n * @version 1.1\r\n */\r\nexport class GeoLocation {\r\n /**\r\n * @see #getLatitude()\r\n * @see #setLatitude(double)\r\n * @see #setLatitude(int, int, double, String)\r\n */\r\n private latitude!: number;\r\n\r\n /**\r\n * @see #getLongitude()\r\n * @see #setLongitude(double)\r\n * @see #setLongitude(int, int, double, String)\r\n */\r\n private longitude!: number;\r\n\r\n /**\r\n * @see #getLocationName()\r\n * @see #setLocationName(String)\r\n */\r\n private locationName: string | null = null;\r\n\r\n /**\r\n * @see #getTimeZone()\r\n * @see #setTimeZone(TimeZone)\r\n */\r\n private timeZoneId!: string;\r\n\r\n /**\r\n * @see #getElevation()\r\n * @see #setElevation(double)\r\n */\r\n private elevation!: number;\r\n\r\n /**\r\n * Constant for a distance type calculation.\r\n * @see #getGeodesicDistance(GeoLocation)\r\n */\r\n private static readonly DISTANCE: number = 0;\r\n\r\n /**\r\n * Constant for a initial bearing type calculation.\r\n * @see #getGeodesicInitialBearing(GeoLocation)\r\n */\r\n private static readonly INITIAL_BEARING: number = 1;\r\n\r\n /**\r\n * Constant for a final bearing type calculation.\r\n * @see #getGeodesicFinalBearing(GeoLocation)\r\n */\r\n private static readonly FINAL_BEARING: number = 2;\r\n\r\n /** constant for nanoseconds in a minute (60 * 1000 * 1000 * 1000) */\r\n private static readonly MINUTE_NANOS = Temporal.Duration.from({ minutes: 1 }).total('nanoseconds');\r\n\r\n /** constant for nanoseconds in an hour (3,600,000) */\r\n private static readonly HOUR_NANOS: number = Temporal.Duration.from({ hours: 1 }).total('nanoseconds');\r\n\r\n /**\r\n * Method to get the elevation in Meters.\r\n *\r\n * @return Returns the elevation in Meters.\r\n */\r\n public getElevation(): number {\r\n return this.elevation;\r\n }\r\n\r\n /**\r\n * Method to set the elevation in Meters above sea level.\r\n *\r\n * @param elevation\r\n * The elevation to set in Meters. An IllegalArgumentException will be thrown if the value is a negative.\r\n */\r\n public setElevation(elevation: number): void {\r\n if (elevation < 0) {\r\n throw new IllegalArgumentException('Elevation cannot be negative');\r\n }\r\n this.elevation = elevation;\r\n }\r\n\r\n /**\r\n * GeoLocation constructor with parameters for all required fields.\r\n *\r\n * @param name\r\n * The location name for display use such as "Lakewood, NJ"\r\n * @param latitude\r\n * the latitude in a double format such as 40.095965 for Lakewood, NJ.\r\n * Note: For latitudes south of the equator, a negative value should be used.\r\n * @param longitude\r\n * double the longitude in a double format such as -74.222130 for Lakewood, NJ.\r\n * Note: For longitudes east of the Prime\r\n * Meridian (Greenwich), a negative value should be used.\r\n * @param timeZone\r\n * the\r\n * this.length()-anotherString.length()\r\n *
TimeZone
for the location.\r\n */\r\n\r\n /*\r\n public GeoLocation(String name, double latitude, double longitude, TimeZone timeZone) {\r\n this(name, latitude, longitude, 0, timeZone);\r\n }\r\n */\r\n\r\n /**\r\n * GeoLocation constructor with parameters for all required fields.\r\n *\r\n * @param name\r\n * The location name for display use such as "Lakewood, NJ"\r\n * @param latitude\r\n * the latitude in a double format such as 40.095965 for Lakewood, NJ.\r\n * Note: For latitudes south of the equator, a negative value should be used.\r\n * @param longitude\r\n * double the longitude in a double format such as -74.222130 for Lakewood, NJ.\r\n * Note: For longitudes east of the Prime\r\n * Meridian (Greenwich), a negative value should be used.\r\n * @param elevation\r\n * the elevation above sea level in Meters. Elevation is not used in most algorithms used for calculating\r\n * sunrise and set.\r\n * @param timeZoneId\r\n * the TimeZone
for the location.\r\n */\r\n constructor(name: string | null, latitude: number, longitude: number, elevation: number, timeZoneId?: string);\r\n constructor(name: string | null, latitude: number, longitude: number, timeZoneId: string);\r\n constructor(name: string | null, latitude: number, longitude: number, elevationOrTimeZoneId?: number | string, timeZoneId?: string) {\r\n let elevation: number = 0;\r\n if (timeZoneId) {\r\n elevation = elevationOrTimeZoneId as number;\r\n } else {\r\n timeZoneId = elevationOrTimeZoneId as string;\r\n }\r\n\r\n this.setLocationName(name);\r\n this.setLatitude(latitude);\r\n this.setLongitude(longitude);\r\n this.setElevation(elevation);\r\n this.setTimeZone(timeZoneId);\r\n }\r\n\r\n /**\r\n * Default GeoLocation constructor will set location to the Prime Meridian at Greenwich, England and a TimeZone of\r\n * GMT. The longitude will be set to 0 and the latitude will be 51.4772 to match the location of the Royal Observatory, Greenwich . No daylight savings time will be used.\r\n */\r\n /*\r\n public GeoLocation() {\r\n setLocationName(\"Greenwich, England\");\r\n setLongitude(0); // added for clarity\r\n setLatitude(51.4772);\r\n setTimeZone(TimeZone.getTimeZone(\"GMT\"));\r\n }\r\n */\r\n\r\n /**\r\n * Method to set the latitude.\r\n *\r\n * @param latitude\r\n * The degrees of latitude to set. The values should be between -90° and 90°. An\r\n * IllegalArgumentException will be thrown if the value exceeds the limit. For example 40.095965 would be\r\n * used for Lakewood, NJ. Note: For latitudes south of the equator, a negative value should be\r\n * used.\r\n */\r\n\r\n /*\r\n public setLatitude(latitude: number): void {\r\n if (latitude > 90 || latitude < -90) {\r\n throw new IllegalArgumentException(\"Latitude must be between -90 and 90\");\r\n }\r\n this.latitude = latitude;\r\n }\r\n */\r\n\r\n /**\r\n * Method to set the latitude in degrees, minutes and seconds.\r\n *\r\n * @param degrees\r\n * The degrees of latitude to set between 0° and 90°. For example 40 would be used for Lakewood, NJ.\r\n * An IllegalArgumentException will be thrown if the value exceeds the limit.\r\n * @param minutes\r\n * minutes of arc\r\n * @param seconds\r\n * seconds of arc\r\n * @param direction\r\n * N for north and S for south. An IllegalArgumentException will be thrown if the value is not S or N.\r\n */\r\n public setLatitude(degrees: number, minutes: number, seconds: number, direction: 'N' | 'S'): void;\r\n public setLatitude(latitude: number): void;\r\n public setLatitude(degreesOrLatitude: number, minutes?: number, seconds?: number, direction?: 'N' | 'S'): void {\r\n if (!minutes) {\r\n const latitude: number = degreesOrLatitude;\r\n\r\n if (latitude > 90 || latitude < -90) {\r\n throw new IllegalArgumentException('Latitude must be between -90 and 90');\r\n }\r\n\r\n this.latitude = latitude;\r\n } else {\r\n const degrees: number = degreesOrLatitude;\r\n\r\n let tempLat: number = degrees + ((minutes + (seconds! / 60)) / 60);\r\n if (tempLat > 90 || tempLat < 0) { // FIXME An exception should be thrown if degrees, minutes or seconds are negative\r\n throw new IllegalArgumentException('Latitude must be between 0 and 90. Use direction of S instead of negative.');\r\n }\r\n if (direction === 'S') {\r\n tempLat *= -1;\r\n } else if (!(direction === 'N')) {\r\n throw new IllegalArgumentException('Latitude direction must be N or S');\r\n }\r\n this.latitude = tempLat;\r\n }\r\n }\r\n\r\n /**\r\n * @return Returns the latitude.\r\n */\r\n public getLatitude(): number {\r\n return this.latitude;\r\n }\r\n\r\n /**\r\n * Method to set the longitude in a double format.\r\n *\r\n * @param longitude\r\n * The degrees of longitude to set in a double format between -180° and 180°. An\r\n * IllegalArgumentException will be thrown if the value exceeds the limit. For example -74.2094 would be\r\n * used for Lakewood, NJ. Note: for longitudes east of the Prime Meridian (Greenwich) a negative value\r\n * should be used.\r\n */\r\n\r\n /*\r\n public setLongitude(longitude: number): void {\r\n if (longitude > 180 || longitude < -180) {\r\n throw new IllegalArgumentException(\"Longitude must be between -180 and 180\");\r\n }\r\n this.longitude = longitude;\r\n }\r\n */\r\n\r\n /**\r\n * Method to set the longitude in degrees, minutes and seconds.\r\n *\r\n * @param degrees\r\n * The degrees of longitude to set between 0° and 180°. As an example 74 would be set for Lakewood, NJ.\r\n * An IllegalArgumentException will be thrown if the value exceeds the limits.\r\n * @param minutes\r\n * minutes of arc\r\n * @param seconds\r\n * seconds of arc\r\n * @param direction\r\n * E for east of the Prime Meridian or W for west of it.\r\n * An IllegalArgumentException will be thrown if\r\n * the value is not E or W.\r\n */\r\n public setLongitude(degrees: number, minutes: number, seconds: number, direction: 'E' | 'W'): void;\r\n public setLongitude(longitude: number): void;\r\n public setLongitude(degreesOrLongitude: number, minutes?: number, seconds?: number, direction?: 'E' | 'W'): void {\r\n if (!minutes) {\r\n const longitude: number = degreesOrLongitude;\r\n\r\n if (longitude > 180 || longitude < -180) {\r\n throw new IllegalArgumentException('Longitude must be between -180 and 180');\r\n }\r\n\r\n this.longitude = longitude;\r\n } else {\r\n const degrees: number = degreesOrLongitude;\r\n\r\n let longTemp: number = degrees + ((minutes + (seconds! / 60)) / 60);\r\n if (longTemp > 180 || this.longitude < 0) { // FIXME An exception should be thrown if degrees, minutes or seconds are negative\r\n throw new IllegalArgumentException('Longitude must be between 0 and 180. Use a direction of W instead of negative.');\r\n }\r\n if (direction === 'W') {\r\n longTemp *= -1;\r\n } else if (!(direction === 'E')) {\r\n throw new IllegalArgumentException('Longitude direction must be E or W');\r\n }\r\n this.longitude = longTemp;\r\n }\r\n }\r\n\r\n /**\r\n * @return Returns the longitude.\r\n */\r\n public getLongitude(): number {\r\n return this.longitude;\r\n }\r\n\r\n /**\r\n * @return Returns the location name.\r\n */\r\n public getLocationName(): string | null {\r\n return this.locationName;\r\n }\r\n\r\n /**\r\n * @param name\r\n * The setter method for the display name.\r\n */\r\n public setLocationName(name: string | null): void {\r\n this.locationName = name;\r\n }\r\n\r\n /**\r\n * @return Returns the timeZone.\r\n */\r\n public getTimeZone(): string {\r\n return this.timeZoneId;\r\n }\r\n\r\n /**\r\n * Method to set the TimeZone. If this is ever set after the GeoLocation is set in the\r\n * {@link AstronomicalCalendar}, it is critical that\r\n * {@link AstronomicalCalendar#getCalendar()}.\r\n * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} be called in order for the\r\n * AstronomicalCalendar to output times in the expected offset. This situation will arise if the\r\n * AstronomicalCalendar is ever {@link AstronomicalCalendar#clone() cloned}.\r\n *\r\n * @param timeZone\r\n * The timeZone to set.\r\n */\r\n public setTimeZone(timeZoneId: string): void {\r\n this.timeZoneId = timeZoneId;\r\n }\r\n\r\n /**\r\n * A method that will return the location's local mean time offset in nanoseconds from local standard time. The globe is split into 360°, with\r\n * 15° per hour of the day. For a local that is at a longitude that is evenly divisible by 15 (longitude % 15 ==\r\n * 0), at solar {@link AstronomicalCalendar#getSunTransit() noon} (with adjustment for the equation of time) the sun should be directly overhead,\r\n * so a user who is 1° west of this will have noon at 4 minutes after standard time noon, and conversely, a user\r\n * who is 1° east of the 15° longitude will have noon at 11:56 AM. Lakewood, N.J., whose longitude is\r\n * -74.2094, is 0.7906 away from the closest multiple of 15 at -75°. This is multiplied by 4 to yield 3 minutes\r\n * and 10 seconds earlier than standard time. The offset returned does not account for the Daylight saving time offset since this class is\r\n * unaware of dates.\r\n *\r\n * @return the offset in nanoseconds not accounting for Daylight saving time. A positive value will be returned\r\n * East of the 15° timezone line, and a negative value West of it.\r\n * @since 1.1\r\n */\r\n public getLocalMeanTimeOffset(): number {\r\n return this.getLongitude() * 4 * GeoLocation.MINUTE_NANOS - TimeZone.getRawOffset(this.getTimeZone());\r\n }\r\n\r\n /**\r\n * Adjust the date for antimeridian crossover. This is\r\n * needed to deal with edge cases such as Samoa that use a different calendar date than expected based on their\r\n * geographic location.\r\n *\r\n * The actual Time Zone offset may deviate from the expected offset based on the longitude. Since the 'absolute time'\r\n * calculations are always based on longitudinal offset from UTC for a given date, the date is presumed to only\r\n * increase East of the Prime Meridian, and to only decrease West of it. For Time Zones that cross the antimeridian,\r\n * the date will be artificially adjusted before calculation to conform with this presumption.\r\n *\r\n * For example, Apia, Samoa with a longitude of -171.75 uses a local offset of +14:00. When calculating sunrise for\r\n * 2018-02-03, the calculator should operate using 2018-02-02 since the expected zone is -11. After determining the\r\n * UTC time, the local DST offset of UTC+14:00 should be applied\r\n * to bring the date back to 2018-02-03.\r\n *\r\n * @return the number of days to adjust the date This will typically be 0 unless the date crosses the antimeridian\r\n */\r\n public getAntimeridianAdjustment(): -1 | 1 | 0 {\r\n const localHoursOffset: number = this.getLocalMeanTimeOffset() / GeoLocation.HOUR_NANOS;\r\n\r\n // if the offset is 20 hours or more in the future (never expected anywhere other\r\n // than a location using a timezone across the anti meridian to the east such as Samoa)\r\n if (localHoursOffset >= 20) {\r\n // roll the date forward a day\r\n return 1;\r\n } else if (localHoursOffset <= -20) {\r\n // if the offset is 20 hours or more in the past (no current location is known\r\n // that crosses the antimeridian to the west, but better safe than sorry)\r\n // roll the date back a day\r\n return -1;\r\n }\r\n // 99.999% of the world will have no adjustment\r\n return 0;\r\n }\r\n\r\n /**\r\n * Calculate the initial geodesic bearing between this\r\n * Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics on the Ellipsoid\r\n * with application of nested equations\", Survey Review, vol XXII no 176, 1975\r\n *\r\n * @param location\r\n * the destination location\r\n * @return the initial bearing\r\n */\r\n public getGeodesicInitialBearing(location: GeoLocation): number {\r\n return this.vincentyFormula(location, GeoLocation.INITIAL_BEARING);\r\n }\r\n\r\n /**\r\n * Calculate the final geodesic bearing between this Object\r\n * and a second Object passed to this method using Thaddeus\r\n * Vincenty's inverse formula See T Vincenty, \"Direct and\r\n * Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations\", Survey Review, vol\r\n * XXII no 176, 1975\r\n *\r\n * @param location\r\n * the destination location\r\n * @return the final bearing\r\n */\r\n public getGeodesicFinalBearing(location: GeoLocation): number {\r\n return this.vincentyFormula(location, GeoLocation.FINAL_BEARING);\r\n }\r\n\r\n /**\r\n * Calculate geodesic distance in Meters between\r\n * this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics on the Ellipsoid\r\n * with application of nested equations\", Survey Review, vol XXII no 176, 1975\r\n *\r\n * @see #vincentyFormula(GeoLocation, int)\r\n * @param location\r\n * the destination location\r\n * @return the geodesic distance in Meters\r\n */\r\n public getGeodesicDistance(location: GeoLocation): number {\r\n return this.vincentyFormula(location, GeoLocation.DISTANCE);\r\n }\r\n\r\n /**\r\n * Calculate geodesic distance in Meters between\r\n * this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics on the Ellipsoid\r\n * with application of nested equations\", Survey Review, vol XXII no 176, 1975\r\n *\r\n * @param location\r\n * the destination location\r\n * @param formula\r\n * This formula calculates initial bearing ({@link #INITIAL_BEARING}), final bearing (\r\n * {@link #FINAL_BEARING}) and distance ({@link #DISTANCE}).\r\n * @return geodesic distance in Meters\r\n */\r\n private vincentyFormula(location: GeoLocation, formula: number): number {\r\n const a: number = 6378137;\r\n const b: number = 6356752.3142;\r\n const f: number = 1 / 298.257223563; // WGS-84 ellipsiod\r\n const L: number = MathUtils.degreesToRadians(location.getLongitude() - this.getLongitude());\r\n const U1: number = Math.atan((1 - f) * Math.tan(MathUtils.degreesToRadians(this.getLatitude())));\r\n const U2: number = Math.atan((1 - f) * Math.tan(MathUtils.degreesToRadians(location.getLatitude())));\r\n const sinU1: number = Math.sin(U1);\r\n const cosU1: number = Math.cos(U1);\r\n const sinU2: number = Math.sin(U2);\r\n const cosU2: number = Math.cos(U2);\r\n\r\n let lambda: number = L;\r\n let lambdaP: number = 2 * Math.PI;\r\n let iterLimit: number = 20;\r\n let sinLambda: number = 0;\r\n let cosLambda: number = 0;\r\n let sinSigma: number = 0;\r\n let cosSigma: number = 0;\r\n let sigma: number = 0;\r\n let sinAlpha: number = 0;\r\n let cosSqAlpha: number = 0;\r\n let cos2SigmaM: number = 0;\r\n let C: number;\r\n\r\n while (Math.abs(lambda - lambdaP) > 1e-12 && --iterLimit > 0) {\r\n sinLambda = Math.sin(lambda);\r\n cosLambda = Math.cos(lambda);\r\n sinSigma = Math.sqrt((cosU2 * sinLambda) * (cosU2 * sinLambda)\r\n + (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda) * (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda));\r\n if (sinSigma === 0) return 0; // co-incident points\r\n cosSigma = sinU1 * sinU2 + cosU1 * cosU2 * cosLambda;\r\n sigma = Math.atan2(sinSigma, cosSigma);\r\n sinAlpha = (cosU1 * cosU2 * sinLambda) / sinSigma;\r\n cosSqAlpha = 1 - sinAlpha * sinAlpha;\r\n cos2SigmaM = cosSigma - 2 * sinU1 * sinU2 / cosSqAlpha;\r\n if (Number.isNaN(cos2SigmaM)) cos2SigmaM = 0; // equatorial line: cosSqAlpha=0 (\u00A76)\r\n C = f / 16 * cosSqAlpha * (4 + f * (4 - 3 * cosSqAlpha));\r\n lambdaP = lambda;\r\n lambda = L + (1 - C) * f * sinAlpha\r\n * (sigma + C * sinSigma * (cos2SigmaM + C * cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM)));\r\n }\r\n if (iterLimit === 0) return Number.NaN; // formula failed to converge\r\n\r\n const uSq: number = cosSqAlpha * (a * a - b * b) / (b * b);\r\n const A: number = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));\r\n const B: number = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));\r\n const deltaSigma: number = B * sinSigma\r\n * (cos2SigmaM + B / 4\r\n * (cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM) - B / 6 * cos2SigmaM\r\n * (-3 + 4 * sinSigma * sinSigma) * (-3 + 4 * cos2SigmaM * cos2SigmaM)));\r\n const distance: number = b * A * (sigma - deltaSigma);\r\n\r\n // initial bearing\r\n const fwdAz: number = MathUtils.radiansToDegrees(Math.atan2(cosU2 * sinLambda, cosU1 * sinU2 - sinU1 * cosU2 * cosLambda));\r\n // final bearing\r\n const revAz: number = MathUtils.radiansToDegrees(Math.atan2(cosU1 * sinLambda, -sinU1 * cosU2 + cosU1 * sinU2 * cosLambda));\r\n if (formula === GeoLocation.DISTANCE) {\r\n return distance;\r\n } else if (formula === GeoLocation.INITIAL_BEARING) {\r\n return fwdAz;\r\n } else if (formula === GeoLocation.FINAL_BEARING) {\r\n return revAz;\r\n }\r\n // should never happen\r\n return Number.NaN;\r\n }\r\n\r\n /**\r\n * Returns the rhumb line bearing from the current location to\r\n * the GeoLocation passed in.\r\n *\r\n * @param location\r\n * destination location\r\n * @return the bearing in degrees\r\n */\r\n public getRhumbLineBearing(location: GeoLocation): number {\r\n let dLon: number = MathUtils.degreesToRadians(location.getLongitude() - this.getLongitude());\r\n const dPhi: number = Math.log(Math.tan(MathUtils.degreesToRadians(location.getLatitude()) / 2 + Math.PI / 4)\r\n / Math.tan(MathUtils.degreesToRadians(this.getLatitude()) / 2 + Math.PI / 4));\r\n if (Math.abs(dLon) > Math.PI) dLon = dLon > 0 ? -(2 * Math.PI - dLon) : (2 * Math.PI + dLon);\r\n return MathUtils.radiansToDegrees(Math.atan2(dLon, dPhi));\r\n }\r\n\r\n /**\r\n * Returns the rhumb line distance from the current location\r\n * to the GeoLocation passed in.\r\n *\r\n * @param location\r\n * the destination location\r\n * @return the distance in Meters\r\n */\r\n public getRhumbLineDistance(location: GeoLocation): number {\r\n const earthRadius: number = 6378137; // earth's mean radius in km\r\n const dLat: number = MathUtils.degreesToRadians(location.getLatitude()) - MathUtils.degreesToRadians(this.getLatitude());\r\n let dLon: number = Math.abs(MathUtils.degreesToRadians(location.getLongitude()) - MathUtils.degreesToRadians(this.getLongitude()));\r\n const dPhi: number = Math.log(Math.tan(MathUtils.degreesToRadians(location.getLatitude()) / 2 + Math.PI / 4)\r\n / Math.tan(MathUtils.degreesToRadians(this.getLatitude()) / 2 + Math.PI / 4));\r\n\r\n let q: number = dLat / dPhi;\r\n if (!Number.isFinite(q)) {\r\n q = Math.cos(MathUtils.degreesToRadians(this.getLatitude()));\r\n }\r\n\r\n // if dLon over 180\u00B0 take shorter rhumb across 180\u00B0 meridian:\r\n if (dLon > Math.PI) {\r\n dLon = 2 * Math.PI - dLon;\r\n }\r\n const d: number = Math.sqrt(dLat * dLat + q * q * dLon * dLon);\r\n return d * earthRadius;\r\n }\r\n\r\n /**\r\n * A method that returns an XML formatted String
representing the serialized Object
. Very\r\n * similar to the toString method but the return value is in an xml format. The format currently used (subject to\r\n * change) is:\r\n *\r\n * \r\n * <GeoLocation>\r\n * <LocationName>Lakewood, NJ</LocationName>\r\n * <Latitude>40.0828°</Latitude>\r\n * <Longitude>-74.2094°</Longitude>\r\n * <Elevation>0 Meters</Elevation>\r\n * <TimezoneName>America/New_York</TimezoneName>\r\n * <TimeZoneDisplayName>Eastern Standard Time</TimeZoneDisplayName>\r\n * <TimezoneGMTOffset>-5</TimezoneGMTOffset>\r\n * <TimezoneDSTOffset>1</TimezoneDSTOffset>\r\n * </GeoLocation>\r\n *\r\n *\r\n * @return The XML formatted
String
.\r\n * @deprecated\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toXML(): void {\r\n throw new UnsupportedError('This method is deprecated');\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#equals(Object)\r\n */\r\n public equals(object: object): boolean {\r\n if (this === object) return true;\r\n if (!(object instanceof GeoLocation)) return false;\r\n\r\n const geo: GeoLocation = object as GeoLocation;\r\n return this.latitude === geo.latitude\r\n && this.longitude === geo.longitude\r\n && this.elevation === geo.elevation\r\n && this.locationName === geo.locationName\r\n && this.timeZoneId === geo.getTimeZone();\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#toString()\r\n */\r\n public toString(): string {\r\n return (`Location Name:\\t\\t\\t${this.getLocationName()}`)\r\n .concat(`\\nLatitude:\\t\\t\\t${this.getLatitude().toString()}\\u00B0`)\r\n .concat(`\\nLongitude:\\t\\t\\t${this.getLongitude().toString()}\\u00B0`)\r\n .concat(`\\nElevation:\\t\\t\\t${this.getElevation().toString()} Meters`)\r\n .concat(`\\nTimezone ID:\\t\\t\\t${this.getTimeZone()}`)\r\n .concat(`\\nTimezone Display Name:\\t\\t${TimeZone.getDisplayName(this.getTimeZone())}`)\r\n .concat(`\\nTimezone GMT Offset:\\t\\t${(TimeZone.getRawOffset(this.getTimeZone()) / GeoLocation.HOUR_NANOS).toString()}`)\r\n .concat(`\\nTimezone DST Offset:\\t\\t${(TimeZone.getDSTSavings(this.getTimeZone()) / GeoLocation.HOUR_NANOS).toString()}`);\r\n }\r\n\r\n /**\r\n * An implementation of the {@link java.lang.Object#clone()} method that creates a deep copy of the object.\r\n * Note: If the {@link java.util.TimeZone} in the clone will be changed from the original, it is critical\r\n * that {@link AstronomicalCalendar#getCalendar()}.\r\n * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} is called after cloning in order for the\r\n * AstronomicalCalendar to output times in the expected offset.\r\n *\r\n * @see java.lang.Object#clone()\r\n * @since 1.1\r\n */\r\n public clone(): GeoLocation {\r\n return JSON.parse(JSON.stringify(this));\r\n }\r\n}\r\n", "import { GeoLocation } from './GeoLocation.ts';\r\nimport { MathUtils } from '../polyfills/Utils.ts';\r\nimport { UnsupportedError } from '../polyfills/errors.ts';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\n/**\r\n * An abstract class that all sun time calculating classes extend. This allows the algorithm used to be changed at\r\n * runtime, easily allowing comparison the results of using different algorithms.\r\n * TODO: Consider methods that would allow atmospheric modeling. This can currently be adjusted by {@link\r\n * #setRefraction(double) setting the refraction}.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2020\r\n */\r\nexport abstract class AstronomicalCalculator {\r\n /**\r\n * The commonly used average solar refraction. Calendrical Calculations lists a more accurate global average of\r\n * 34.478885263888294\r\n *\r\n * @see #getRefraction()\r\n */\r\n private refraction: number = 34 / 60;\r\n // private double refraction = 34.478885263888294 / 60d;\r\n\r\n /**\r\n * The commonly used average solar radius in minutes of a degree.\r\n *\r\n * @see #getSolarRadius()\r\n */\r\n private solarRadius: number = 16 / 60;\r\n\r\n /**\r\n * The commonly used average earth radius in KM. At this time, this only affects elevation adjustment and not the\r\n * sunrise and sunset calculations. The value currently defaults to 6356.9 KM.\r\n *\r\n * @see #getEarthRadius()\r\n * @see #setEarthRadius(double)\r\n */\r\n private earthRadius: number = 6356.9; // in KM\r\n\r\n /**\r\n * A method that returns the earth radius in KM. The value currently defaults to 6356.9 KM if not set.\r\n *\r\n * @return the earthRadius the earth radius in KM.\r\n */\r\n public getEarthRadius(): number {\r\n return this.earthRadius;\r\n }\r\n\r\n /**\r\n * A method that allows setting the earth's radius.\r\n *\r\n * @param earthRadius\r\n * the earthRadius to set in KM\r\n */\r\n public setEarthRadius(earthRadius: number): void {\r\n this.earthRadius = earthRadius;\r\n }\r\n\r\n /**\r\n * The zenith of astronomical sunrise and sunset. The sun is 90° from the vertical 0°\r\n */\r\n private static readonly GEOMETRIC_ZENITH: number = 90;\r\n\r\n /**\r\n * Returns the default class for calculating sunrise and sunset. This is currently the {@link NOAACalculator},\r\n * but this may change.\r\n *\r\n * @return AstronomicalCalculator the default class for calculating sunrise and sunset. In the current\r\n * implementation the default calculator returned is the {@link NOAACalculator}.\r\n * @deprecated This depends on a circular dependency. Use new NOAACalculator()instead\r\n */\r\n public static getDefault(): void {\r\n throw new UnsupportedError('This method is deprecated, due to the fact that it depends on a circular dependency. '\r\n + 'Use `new NOAACalculator()` instead.');\r\n }\r\n\r\n /**\r\n * Returns the name of the algorithm.\r\n *\r\n * @return the descriptive name of the algorithm.\r\n */\r\n public abstract getCalculatorName(): string;\r\n\r\n /**\r\n * Setter method for the descriptive name of the calculator. This will typically not have to be set\r\n *\r\n * @param calculatorName\r\n * descriptive name of the algorithm.\r\n */\r\n\r\n /**\r\n * A method that calculates UTC sunrise as well as any time based on an angle above or below sunrise. This abstract\r\n * method is implemented by the classes that extend this class.\r\n *\r\n * @param calendar\r\n * Used to calculate day of year.\r\n * @param geoLocation\r\n * The location information used for astronomical calculating sun times.\r\n * @param zenith\r\n * the azimuth below the vertical zenith of 90 degrees. for sunrise typically the {@link #adjustZenith\r\n * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts}\r\n * this slightly to account for solar refraction and the sun's radius. Another example would be\r\n * {@link AstronomicalCalendar#getBeginNauticalTwilight()} that passes\r\n * {@link AstronomicalCalendar#NAUTICAL_ZENITH} to this method.\r\n * @param adjustForElevation\r\n * Should the time be adjusted for elevation\r\n * @return The UTC time of sunrise in 24 hour format. 5:45:00 AM will return 5.75.0. If an error was encountered in\r\n * the calculation (expected behavior for some locations such as near the poles,\r\n * {@link java.lang.Double#NaN} will be returned.\r\n * @see #getElevationAdjustment(double)\r\n */\r\n public abstract getUTCSunrise(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number,\r\n adjustForElevation: boolean): number; // eslint-disable-line @typescript-eslint/indent\r\n\r\n /**\r\n * A method that calculates UTC sunset as well as any time based on an angle above or below sunset. This abstract\r\n * method is implemented by the classes that extend this class.\r\n *\r\n * @param calendar\r\n * Used to calculate day of year.\r\n * @param geoLocation\r\n * The location information used for astronomical calculating sun times.\r\n * @param zenith\r\n * the azimuth below the vertical zenith of 90°. For sunset typically the {@link #adjustZenith\r\n * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts}\r\n * this slightly to account for solar refraction and the sun's radius. Another example would be\r\n * {@link AstronomicalCalendar#getEndNauticalTwilight()} that passes\r\n * {@link AstronomicalCalendar#NAUTICAL_ZENITH} to this method.\r\n * @param adjustForElevation\r\n * Should the time be adjusted for elevation\r\n * @return The UTC time of sunset in 24 hour format. 5:45:00 AM will return 5.75.0. If an error was encountered in\r\n * the calculation (expected behavior for some locations such as near the poles,\r\n * {@link java.lang.Double#NaN} will be returned.\r\n * @see #getElevationAdjustment(double)\r\n */\r\n public abstract getUTCSunset(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number;\r\n\r\n /**\r\n\t * Return solar noon (UTC) for the given day at the\r\n\t * given location on earth. The the {@link com.kosherjava.zmanim.util.NOAACalculator} implementation calculates\r\n\t * true solar noon, while the {@link com.kosherjava.zmanim.util.SunTimesCalculator} approximates it, calculating\r\n\t * the time as halfway between sunrise and sunset.\r\n\t * \r\n\t * @param calendar\r\n\t * Used to calculate day of year.\r\n\t * @param geoLocation\r\n\t * The location information used for astronomical calculating sun times. \r\n\t * \r\n\t * @return the time in minutes from zero UTC\r\n\t */\r\n public abstract getUTCNoon(calendar: Temporal.PlainDate, geoLocation: GeoLocation): number;\r\n\r\n /**\r\n * Method to return the adjustment to the zenith required to account for the elevation. Since a person at a higher\r\n * elevation can see farther below the horizon, the calculation for sunrise / sunset is calculated below the horizon\r\n * used at sea level. This is only used for sunrise and sunset and not times before or after it such as\r\n * {@link AstronomicalCalendar#getBeginNauticalTwilight() nautical twilight} since those\r\n * calculations are based on the level of available light at the given dip below the horizon, something that is not\r\n * affected by elevation, the adjustment should only made if the zenith == 90° {@link #adjustZenith adjusted}\r\n * for refraction and solar radius. The algorithm used is\r\n *\r\n *
\r\n * elevationAdjustment = Math.toDegrees(Math.acos(earthRadiusInMeters / (earthRadiusInMeters + elevationMeters)));\r\n *\r\n *\r\n * The source of this algorithm is Calendrical Calculations by Edward M.\r\n * Reingold and Nachum Dershowitz. An alternate algorithm that produces an almost identical (but not accurate)\r\n * result found in Ma'aglay Tzedek by Moishe Kosower and other sources is:\r\n *\r\n *
\r\n * elevationAdjustment = 0.0347 * Math.sqrt(elevationMeters);\r\n *\r\n *\r\n * @param elevation\r\n * elevation in Meters.\r\n * @return the adjusted zenith\r\n */\r\n public getElevationAdjustment(elevation: number): number {\r\n // double elevationAdjustment = 0.0347 * Math.sqrt(elevation);\r\n const elevationAdjustment: number = MathUtils.radiansToDegrees(Math.acos(this.earthRadius / (this.earthRadius + (elevation / 1000))));\r\n return elevationAdjustment;\r\n }\r\n\r\n /**\r\n * Adjusts the zenith of astronomical sunrise and sunset to account for solar refraction, solar radius and\r\n * elevation. The value for Sun's zenith and true rise/set Zenith (used in this class and subclasses) is the angle\r\n * that the center of the Sun makes to a line perpendicular to the Earth's surface. If the Sun were a point and the\r\n * Earth were without an atmosphere, true sunset and sunrise would correspond to a 90° zenith. Because the Sun\r\n * is not a point, and because the atmosphere refracts light, this 90° zenith does not, in fact, correspond to\r\n * true sunset or sunrise, instead the centre of the Sun's disk must lie just below the horizon for the upper edge\r\n * to be obscured. This means that a zenith of just above 90° must be used. The Sun subtends an angle of 16\r\n * minutes of arc (this can be changed via the {@link #setSolarRadius(double)} method , and atmospheric refraction\r\n * accounts for 34 minutes or so (this can be changed via the {@link #setRefraction(double)} method), giving a total\r\n * of 50 arcminutes. The total value for ZENITH is 90+(5/6) or 90.8333333° for true sunrise/sunset. Since a\r\n * person at an elevation can see blow the horizon of a person at sea level, this will also adjust the zenith to\r\n * account for elevation if available. Note that this will only adjust the value if the zenith is exactly 90 degrees.\r\n * For values below and above this no correction is done. As an example, astronomical twilight is when the sun is\r\n * 18° below the horizon or {@link AstronomicalCalendar#ASTRONOMICAL_ZENITH 108°\r\n * below the zenith}. This is traditionally calculated with none of the above mentioned adjustments. The same goes\r\n * for various tzais and alos times such as the\r\n * {@link ZmanimCalendar#ZENITH_16_POINT_1 16.1°} dip used in\r\n * {@link ComplexZmanimCalendar#getAlos16Point1Degrees()}.\r\n *\r\n * @param zenith\r\n * the azimuth below the vertical zenith of 90°. For sunset typically the {@link #adjustZenith\r\n * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts}\r\n * this slightly to account for solar refraction and the sun's radius. Another example would be\r\n * {@link AstronomicalCalendar#getEndNauticalTwilight()} that passes\r\n * {@link AstronomicalCalendar#NAUTICAL_ZENITH} to this method.\r\n * @param elevation\r\n * elevation in Meters.\r\n * @return The zenith adjusted to include the {@link #getSolarRadius sun's radius}, {@link #getRefraction\r\n * refraction} and {@link #getElevationAdjustment elevation} adjustment. This will only be adjusted for\r\n * sunrise and sunset (if the zenith == 90°)\r\n * @see #getElevationAdjustment(double)\r\n */\r\n public adjustZenith(zenith: number, elevation: number) {\r\n let adjustedZenith: number = zenith;\r\n if (zenith === AstronomicalCalculator.GEOMETRIC_ZENITH) { // only adjust if it is exactly sunrise or sunset\r\n adjustedZenith = zenith + (this.getSolarRadius() + this.getRefraction() + this.getElevationAdjustment(elevation));\r\n }\r\n return adjustedZenith;\r\n }\r\n\r\n /**\r\n * Method to get the refraction value to be used when calculating sunrise and sunset. The default value is 34 arc\r\n * minutes. The Errata and\r\n * Notes for Calendrical Calculations: The Millennium Edition by Edward M. Reingold and Nachum Dershowitz lists\r\n * the actual average refraction value as 34.478885263888294 or approximately 34' 29\". The refraction value as well\r\n * as the solarRadius and elevation adjustment are added to the zenith used to calculate sunrise and sunset.\r\n *\r\n * @return The refraction in arc minutes.\r\n */\r\n public getRefraction(): number {\r\n return this.refraction;\r\n }\r\n\r\n /**\r\n * A method to allow overriding the default refraction of the calculator.\r\n * @todo At some point in the future, an AtmosphericModel or Refraction object that models the atmosphere of different\r\n * locations might be used for increased accuracy.\r\n *\r\n * @param refraction\r\n * The refraction in arc minutes.\r\n * @see #getRefraction()\r\n */\r\n public setRefraction(refraction: number): void {\r\n this.refraction = refraction;\r\n }\r\n\r\n /**\r\n * Method to get the sun's radius. The default value is 16 arc minutes. The sun's radius as it appears from earth is\r\n * almost universally given as 16 arc minutes but in fact it differs by the time of the year. At the perihelion it has an apparent radius of 16.293, while at the\r\n * aphelion it has an apparent radius of 15.755. There is little\r\n * affect for most location, but at high and low latitudes the difference becomes more apparent. My Calculations for\r\n * the difference at the location of the Royal Observatory, Greenwich show\r\n * only a 4.494 second difference between the perihelion and aphelion radii, but moving into the arctic circle the\r\n * difference becomes more noticeable. Tests for Tromso, Norway (latitude 69.672312, longitude 19.049787) show that\r\n * on May 17, the rise of the midnight sun, a 2 minute 23 second difference is observed between the perihelion and\r\n * aphelion radii using the USNO algorithm, but only 1 minute and 6 seconds difference using the NOAA algorithm.\r\n * Areas farther north show an even greater difference. Note that these test are not real valid test cases because\r\n * they show the extreme difference on days that are not the perihelion or aphelion, but are shown for illustrative\r\n * purposes only.\r\n *\r\n * @return The sun's radius in arc minutes.\r\n */\r\n public getSolarRadius(): number {\r\n return this.solarRadius;\r\n }\r\n\r\n /**\r\n * Method to set the sun's radius.\r\n *\r\n * @param solarRadius\r\n * The sun's radius in arc minutes.\r\n * @see #getSolarRadius()\r\n */\r\n public setSolarRadius(solarRadius: number): void {\r\n this.solarRadius = solarRadius;\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#clone()\r\n * @since 1.1\r\n */\r\n public clone(): AstronomicalCalculator {\r\n return JSON.parse(JSON.stringify(this));\r\n }\r\n\r\n public equals(object: object) {\r\n return this === object;\r\n }\r\n}\r\n", "import { GeoLocation } from './GeoLocation.ts';\r\nimport { AstronomicalCalculator } from './AstronomicalCalculator.ts';\r\nimport { MathUtils } from '../polyfills/Utils.ts';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\n/**\r\n * Implementation of sunrise and sunset methods to calculate astronomical times based on the NOAA algorithm. This calculator uses the Java algorithm based on the implementation by NOAA - National Oceanic and Atmospheric Administration's Surface Radiation Research Branch. NOAA's implementation is based on equations from Astronomical Algorithms by Jean Meeus. Added to the algorithm is an adjustment of the zenith\r\n * to account for elevation. The algorithm can be found in the Wikipedia Sunrise Equation article.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport class NOAACalculator extends AstronomicalCalculator {\r\n /**\r\n * The Julian day of January 1, 2000\r\n */\r\n private static readonly JULIAN_DAY_JAN_1_2000: number = 2451545;\r\n\r\n /**\r\n * Julian days per century\r\n */\r\n private static readonly JULIAN_DAYS_PER_CENTURY: number = 36525;\r\n\r\n /**\r\n * @see AstronomicalCalculator#getCalculatorName()\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public getCalculatorName(): string {\r\n return 'US National Oceanic and Atmospheric Administration Algorithm';\r\n }\r\n\r\n /**\r\n * @see AstronomicalCalculator#getUTCSunrise(Calendar, GeoLocation, double, boolean)\r\n */\r\n public getUTCSunrise(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number {\r\n const elevation: number = adjustForElevation ? geoLocation.getElevation() : 0;\r\n const adjustedZenith: number = this.adjustZenith(zenith, elevation);\r\n\r\n let sunrise: number = NOAACalculator.getSunriseUTC(NOAACalculator.getJulianDay(date), geoLocation.getLatitude(), -geoLocation.getLongitude(),\r\n adjustedZenith);\r\n sunrise = sunrise / 60;\r\n\r\n // ensure that the time is >= 0 and < 24\r\n while (sunrise < 0) {\r\n sunrise += 24;\r\n }\r\n while (sunrise >= 24) {\r\n sunrise -= 24;\r\n }\r\n return sunrise;\r\n }\r\n\r\n /**\r\n * @see AstronomicalCalculator#getUTCSunset(Calendar, GeoLocation, double, boolean)\r\n */\r\n public getUTCSunset(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number {\r\n const elevation: number = adjustForElevation ? geoLocation.getElevation() : 0;\r\n const adjustedZenith: number = this.adjustZenith(zenith, elevation);\r\n\r\n let sunset: number = NOAACalculator.getSunsetUTC(NOAACalculator.getJulianDay(date), geoLocation.getLatitude(), -geoLocation.getLongitude(),\r\n adjustedZenith);\r\n sunset = sunset / 60;\r\n\r\n // ensure that the time is >= 0 and < 24\r\n while (sunset < 0) {\r\n sunset += 24;\r\n }\r\n while (sunset >= 24) {\r\n sunset -= 24;\r\n }\r\n return sunset;\r\n }\r\n\r\n /**\r\n * Return the Julian day from a Java Calendar\r\n *\r\n * @param calendar\r\n * The Java Calendar\r\n * @return the Julian day corresponding to the date Note: Number is returned for start of day. Fractional days\r\n * should be added later.\r\n */\r\n private static getJulianDay(date: Temporal.PlainDate): number {\r\n let { year, month } = date;\r\n const { day } = date;\r\n if (month <= 2) {\r\n year -= 1;\r\n month += 12;\r\n }\r\n const a: number = Math.trunc(year / 100);\r\n const b: number = Math.trunc(2 - a + a / 4);\r\n\r\n return Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + b - 1524.5;\r\n }\r\n\r\n /**\r\n * Convert Julian day to centuries since J2000.0.\r\n *\r\n * @param julianDay\r\n * the Julian Day to convert\r\n * @return the centuries since 2000 Julian corresponding to the Julian Day\r\n */\r\n private static getJulianCenturiesFromJulianDay(julianDay: number): number {\r\n return (julianDay - NOAACalculator.JULIAN_DAY_JAN_1_2000) / NOAACalculator.JULIAN_DAYS_PER_CENTURY;\r\n }\r\n\r\n /**\r\n * Convert centuries since J2000.0 to Julian day.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the Julian Day corresponding to the Julian centuries passed in\r\n */\r\n private static getJulianDayFromJulianCenturies(julianCenturies: number): number {\r\n return julianCenturies * NOAACalculator.JULIAN_DAYS_PER_CENTURY + NOAACalculator.JULIAN_DAY_JAN_1_2000;\r\n }\r\n\r\n /**\r\n * Returns the Geometric Mean Longitude of the Sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the Geometric Mean Longitude of the Sun in degrees\r\n */\r\n private static getSunGeometricMeanLongitude(julianCenturies: number): number {\r\n let longitude: number = 280.46646 + julianCenturies * (36000.76983 + 0.0003032 * julianCenturies);\r\n while (longitude > 360) {\r\n longitude -= 360;\r\n }\r\n while (longitude < 0) {\r\n longitude += 360;\r\n }\r\n\r\n return longitude; // in degrees\r\n }\r\n\r\n /**\r\n * Returns the Geometric Mean Anomaly of the Sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the Geometric Mean Anomaly of the Sun in degrees\r\n */\r\n private static getSunGeometricMeanAnomaly(julianCenturies: number): number {\r\n return 357.52911 + julianCenturies * (35999.05029 - 0.0001537 * julianCenturies); // in degrees\r\n }\r\n\r\n /**\r\n * Return the eccentricity of earth's orbit.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the unitless eccentricity\r\n */\r\n private static getEarthOrbitEccentricity(julianCenturies: number): number {\r\n return 0.016708634 - julianCenturies * (0.000042037 + 0.0000001267 * julianCenturies); // unitless\r\n }\r\n\r\n /**\r\n * Returns the equation of center for the sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the equation of center for the sun in degrees\r\n */\r\n private static getSunEquationOfCenter(julianCenturies: number): number {\r\n const m: number = NOAACalculator.getSunGeometricMeanAnomaly(julianCenturies);\r\n\r\n const mrad: number = MathUtils.degreesToRadians(m);\r\n const sinm: number = Math.sin(mrad);\r\n const sin2m: number = Math.sin(mrad + mrad);\r\n const sin3m: number = Math.sin(mrad + mrad + mrad);\r\n\r\n return sinm * (1.914602 - julianCenturies * (0.004817 + 0.000014 * julianCenturies)) + sin2m\r\n * (0.019993 - 0.000101 * julianCenturies) + sin3m * 0.000289; // in degrees\r\n }\r\n\r\n /**\r\n * Return the true longitude of the sun\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the sun's true longitude in degrees\r\n */\r\n private static getSunTrueLongitude(julianCenturies: number): number {\r\n const sunLongitude: number = NOAACalculator.getSunGeometricMeanLongitude(julianCenturies);\r\n const center: number = NOAACalculator.getSunEquationOfCenter(julianCenturies);\r\n\r\n return sunLongitude + center; // in degrees\r\n }\r\n\r\n // /**\r\n // * Returns the true anamoly of the sun.\r\n // *\r\n // * @param julianCenturies\r\n // * the number of Julian centuries since J2000.0\r\n // * @return the sun's true anamoly in degrees\r\n // */\r\n // private static double getSunTrueAnomaly(double julianCenturies) {\r\n // double meanAnomaly = getSunGeometricMeanAnomaly(julianCenturies);\r\n // double equationOfCenter = getSunEquationOfCenter(julianCenturies);\r\n //\r\n // return meanAnomaly + equationOfCenter; // in degrees\r\n // }\r\n\r\n /**\r\n * Return the apparent longitude of the sun\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return sun's apparent longitude in degrees\r\n */\r\n private static getSunApparentLongitude(julianCenturies: number): number {\r\n const sunTrueLongitude: number = NOAACalculator.getSunTrueLongitude(julianCenturies);\r\n\r\n const omega: number = 125.04 - 1934.136 * julianCenturies;\r\n const lambda: number = sunTrueLongitude - 0.00569 - 0.00478 * Math.sin(MathUtils.degreesToRadians(omega));\r\n return lambda; // in degrees\r\n }\r\n\r\n /**\r\n * Returns the mean obliquity of the ecliptic (Axial tilt).\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the mean obliquity in degrees\r\n */\r\n private static getMeanObliquityOfEcliptic(julianCenturies: number): number {\r\n const seconds: number = 21.448 - julianCenturies\r\n * (46.8150 + julianCenturies * (0.00059 - julianCenturies * (0.001813)));\r\n return 23 + (26 + (seconds / 60)) / 60; // in degrees\r\n }\r\n\r\n /**\r\n * Returns the corrected obliquity of the ecliptic (Axial\r\n * tilt).\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the corrected obliquity in degrees\r\n */\r\n private static getObliquityCorrection(julianCenturies: number): number {\r\n const obliquityOfEcliptic: number = NOAACalculator.getMeanObliquityOfEcliptic(julianCenturies);\r\n\r\n const omega: number = 125.04 - 1934.136 * julianCenturies;\r\n return obliquityOfEcliptic + 0.00256 * Math.cos(MathUtils.degreesToRadians(omega)); // in degrees\r\n }\r\n\r\n /**\r\n * Return the declination of the sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return\r\n * the sun's declination in degrees\r\n */\r\n private static getSunDeclination(julianCenturies: number): number {\r\n const obliquityCorrection: number = NOAACalculator.getObliquityCorrection(julianCenturies);\r\n const lambda: number = NOAACalculator.getSunApparentLongitude(julianCenturies);\r\n\r\n const sint: number = Math.sin(MathUtils.degreesToRadians(obliquityCorrection)) * Math.sin(MathUtils.degreesToRadians(lambda));\r\n const theta: number = MathUtils.radiansToDegrees(Math.asin(sint));\r\n return theta; // in degrees\r\n }\r\n\r\n /**\r\n * Return the Equation of Time - the difference between\r\n * true solar time and mean solar time\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return equation of time in minutes of time\r\n */\r\n private static getEquationOfTime(julianCenturies: number): number {\r\n const epsilon: number = NOAACalculator.getObliquityCorrection(julianCenturies);\r\n const geomMeanLongSun: number = NOAACalculator.getSunGeometricMeanLongitude(julianCenturies);\r\n const eccentricityEarthOrbit: number = NOAACalculator.getEarthOrbitEccentricity(julianCenturies);\r\n const geomMeanAnomalySun: number = NOAACalculator.getSunGeometricMeanAnomaly(julianCenturies);\r\n\r\n let y: number = Math.tan(MathUtils.degreesToRadians(epsilon) / 2);\r\n y *= y;\r\n\r\n const sin2l0: number = Math.sin(2 * MathUtils.degreesToRadians(geomMeanLongSun));\r\n const sinm: number = Math.sin(MathUtils.degreesToRadians(geomMeanAnomalySun));\r\n const cos2l0: number = Math.cos(2 * MathUtils.degreesToRadians(geomMeanLongSun));\r\n const sin4l0: number = Math.sin(4 * MathUtils.degreesToRadians(geomMeanLongSun));\r\n const sin2m: number = Math.sin(2 * MathUtils.degreesToRadians(geomMeanAnomalySun));\r\n\r\n const equationOfTime: number = y * sin2l0 - 2 * eccentricityEarthOrbit * sinm + 4 * eccentricityEarthOrbit * y\r\n * sinm * cos2l0 - 0.5 * y * y * sin4l0 - 1.25 * eccentricityEarthOrbit * eccentricityEarthOrbit * sin2m;\r\n return MathUtils.radiansToDegrees(equationOfTime) * 4; // in minutes of time\r\n }\r\n\r\n /**\r\n * Return the hour angle of the sun at sunrise for the\r\n * latitude.\r\n *\r\n * @param lat\r\n * , the latitude of observer in degrees\r\n * @param solarDec\r\n * the declination angle of sun in degrees\r\n * @param zenith\r\n * the zenith\r\n * @return hour angle of sunrise in radians\r\n */\r\n private static getSunHourAngleAtSunrise(lat: number, solarDec: number, zenith: number): number {\r\n const latRad: number = MathUtils.degreesToRadians(lat);\r\n const sdRad: number = MathUtils.degreesToRadians(solarDec);\r\n\r\n return (Math.acos(Math.cos(MathUtils.degreesToRadians(zenith)) / (Math.cos(latRad) * Math.cos(sdRad))\r\n - Math.tan(latRad) * Math.tan(sdRad))); // in radians\r\n }\r\n\r\n /**\r\n * Returns the hour angle of the sun at sunset for the\r\n * latitude. TODO: use - {@link #getSunHourAngleAtSunrise(double, double, double)} implementation to avoid\r\n * duplication of code.\r\n *\r\n * @param lat\r\n * the latitude of observer in degrees\r\n * @param solarDec\r\n * the declination angle of sun in degrees\r\n * @param zenith\r\n * the zenith\r\n * @return the hour angle of sunset in radians\r\n */\r\n private static getSunHourAngleAtSunset(lat: number, solarDec: number, zenith: number): number {\r\n const latRad: number = MathUtils.degreesToRadians(lat);\r\n const sdRad: number = MathUtils.degreesToRadians(solarDec);\r\n\r\n const hourAngle: number = (Math.acos(Math.cos(MathUtils.degreesToRadians(zenith)) / (Math.cos(latRad) * Math.cos(sdRad))\r\n - Math.tan(latRad) * Math.tan(sdRad)));\r\n return -hourAngle; // in radians\r\n }\r\n\r\n /**\r\n * Return the Solar Elevation for the\r\n * horizontal coordinate system at the given location at the given time. Can be negative if the sun is below the\r\n * horizon. Not corrected for altitude.\r\n *\r\n * @param cal\r\n * time of calculation\r\n * @param lat\r\n * latitude of location for calculation\r\n * @param lon\r\n * longitude of location for calculation\r\n * @return solar elevation in degrees - horizon is 0 degrees, civil twilight is -6 degrees\r\n */\r\n\r\n /*public static getSolarElevation(date: Temporal.PlainDate, lat: number, lon: number): number {\r\n const julianDay: number = NOAACalculator.getJulianDay(date);\r\n const julianCenturies: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\r\n const equationOfTime: number = NOAACalculator.getEquationOfTime(julianCenturies);\r\n\r\n let longitude: number = (date.hour + 12) + (date.minute + equationOfTime + date.second / 60) / 60;\r\n\r\n longitude = -(longitude * 360 / 24) % 360;\r\n const hourAngleRad: number = MathUtils.degreesToRadians(lon - longitude);\r\n const declination: number = NOAACalculator.getSunDeclination(julianCenturies);\r\n const decRad: number = MathUtils.degreesToRadians(declination);\r\n const latRad: number = MathUtils.degreesToRadians(lat);\r\n return MathUtils.radiansToDegrees(Math.asin((Math.sin(latRad) * Math.sin(decRad))\r\n + (Math.cos(latRad) * Math.cos(decRad) * Math.cos(hourAngleRad))));\r\n } */\r\n\r\n /**\r\n * Return the Solar Azimuth for the\r\n * horizontal coordinate system at the given location at the given time. Not corrected for altitude. True south is 0\r\n * degrees.\r\n *\r\n * @param cal\r\n * time of calculation\r\n * @param latitude\r\n * latitude of location for calculation\r\n * @param lon\r\n * longitude of location for calculation\r\n * @return FIXME\r\n */\r\n\r\n /* public static getSolarAzimuth(date: Temporal.PlainDate, latitude: number, lon: number): number {\r\n const julianDay: number = NOAACalculator.getJulianDay(date);\r\n const julianCenturies: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\r\n const equationOfTime: number = NOAACalculator.getEquationOfTime(julianCenturies);\r\n\r\n let longitude: number = (date.hour + 12) + (date.minute + equationOfTime + date.second / 60) / 60;\r\n\r\n longitude = -(longitude * 360 / 24) % 360;\r\n const hourAngleRad: number = MathUtils.degreesToRadians(lon - longitude);\r\n const declination: number = NOAACalculator.getSunDeclination(julianCenturies);\r\n const decRad: number = MathUtils.degreesToRadians(declination);\r\n const latRad: number = MathUtils.degreesToRadians(latitude);\r\n\r\n return MathUtils.radiansToDegrees(Math.atan(Math.sin(hourAngleRad)\r\n / ((Math.cos(hourAngleRad) * Math.sin(latRad)) - (Math.tan(decRad) * Math.cos(latRad))))) + 180;\r\n } */\r\n\r\n /**\r\n * Return the Universal Coordinated Time (UTC)\r\n * of sunrise for the given day at the given location on earth\r\n *\r\n * @param julianDay\r\n * the Julian day\r\n * @param latitude\r\n * the latitude of observer in degrees\r\n * @param longitude\r\n * the longitude of observer in degrees\r\n * @param zenith\r\n * the zenith\r\n * @return the time in minutes from zero UTC\r\n */\r\n private static getSunriseUTC(julianDay: number, latitude: number, longitude: number, zenith: number): number {\r\n const julianCenturies: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\r\n // Find the time of solar noon at the location, and use that declination. This is better than start of the\r\n // Julian day\r\n\r\n const noonmin: number = NOAACalculator.getSolarNoonUTC(julianCenturies, longitude);\r\n const tnoon: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay + noonmin / 1440);\r\n\r\n // First pass to approximate sunrise (using solar noon)\r\n\r\n let eqTime: number = NOAACalculator.getEquationOfTime(tnoon);\r\n let solarDec: number = NOAACalculator.getSunDeclination(tnoon);\r\n let hourAngle: number = NOAACalculator.getSunHourAngleAtSunrise(latitude, solarDec, zenith);\r\n\r\n let delta: number = longitude - MathUtils.radiansToDegrees(hourAngle);\r\n let timeDiff: number = 4 * delta; // in minutes of time\r\n let timeUTC: number = 720 + timeDiff - eqTime; // in minutes\r\n\r\n // Second pass includes fractional Julian Day in gamma calc\r\n\r\n const newt: number = NOAACalculator.getJulianCenturiesFromJulianDay(\r\n NOAACalculator.getJulianDayFromJulianCenturies(julianCenturies) + timeUTC / 1440);\r\n eqTime = NOAACalculator.getEquationOfTime(newt);\r\n solarDec = NOAACalculator.getSunDeclination(newt);\r\n hourAngle = NOAACalculator.getSunHourAngleAtSunrise(latitude, solarDec, zenith);\r\n delta = longitude - MathUtils.radiansToDegrees(hourAngle);\r\n timeDiff = 4 * delta;\r\n timeUTC = 720 + timeDiff - eqTime; // in minutes\r\n return timeUTC;\r\n }\r\n\r\n public getUTCNoon(calendar: Temporal.PlainDate, geoLocation: GeoLocation) {\r\n const julianDay = NOAACalculator.getJulianDay(calendar);\r\n const julianCenturies = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\t\t\r\n let noon = NOAACalculator.getSolarNoonUTC(julianCenturies, -geoLocation.getLongitude());\r\n noon = noon / 60;\r\n\r\n // ensure that the time is >= 0 and < 24\r\n while (noon < 0.0) {\r\n noon += 24.0;\r\n }\r\n while (noon >= 24.0) {\r\n noon -= 24.0;\r\n }\r\n return noon;\r\n }\r\n\r\n /**\r\n * Return the Universal Coordinated Time (UTC)\r\n * of solar noon for the given day at the given location\r\n * on earth.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @param longitude\r\n * the longitude of observer in degrees\r\n * @return the time in minutes from zero UTC\r\n */\r\n private static getSolarNoonUTC(julianCenturies: number, longitude: number): number {\r\n // First pass uses approximate solar noon to calculate eqtime\r\n const tnoon: number = NOAACalculator.getJulianCenturiesFromJulianDay(\r\n NOAACalculator.getJulianDayFromJulianCenturies(julianCenturies) + longitude / 360);\r\n let eqTime: number = NOAACalculator.getEquationOfTime(tnoon);\r\n const solNoonUTC: number = 720 + (longitude * 4) - eqTime; // min\r\n\r\n const newt: number = NOAACalculator.getJulianCenturiesFromJulianDay(\r\n NOAACalculator.getJulianDayFromJulianCenturies(julianCenturies) - 0.5 + solNoonUTC / 1440);\r\n\r\n eqTime = NOAACalculator.getEquationOfTime(newt);\r\n return 720 + (longitude * 4) - eqTime; // min\r\n }\r\n\r\n /**\r\n * Return the Universal Coordinated Time (UTC)\r\n * of sunset for the given day at the given location on earth\r\n *\r\n * @param julianDay\r\n * the Julian day\r\n * @param latitude\r\n * the latitude of observer in degrees\r\n * @param longitude\r\n * : longitude of observer in degrees\r\n * @param zenith\r\n * the zenith\r\n * @return the time in minutes from zero Universal Coordinated Time (UTC)\r\n */\r\n private static getSunsetUTC(julianDay: number, latitude: number, longitude: number, zenith: number): number {\r\n const julianCenturies: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\r\n // Find the time of solar noon at the location, and use that declination. This is better than start of the\r\n // Julian day\r\n\r\n const noonmin: number = NOAACalculator.getSolarNoonUTC(julianCenturies, longitude);\r\n const tnoon: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay + noonmin / 1440);\r\n\r\n // First calculates sunrise and approx length of day\r\n\r\n let eqTime: number = NOAACalculator.getEquationOfTime(tnoon);\r\n let solarDec: number = NOAACalculator.getSunDeclination(tnoon);\r\n let hourAngle: number = NOAACalculator.getSunHourAngleAtSunset(latitude, solarDec, zenith);\r\n\r\n let delta: number = longitude - MathUtils.radiansToDegrees(hourAngle);\r\n let timeDiff: number = 4 * delta;\r\n let timeUTC: number = 720 + timeDiff - eqTime;\r\n\r\n // Second pass includes fractional Julian Day in gamma calc\r\n\r\n const newt: number = NOAACalculator.getJulianCenturiesFromJulianDay(\r\n NOAACalculator.getJulianDayFromJulianCenturies(julianCenturies) + timeUTC / 1440);\r\n eqTime = NOAACalculator.getEquationOfTime(newt);\r\n solarDec = NOAACalculator.getSunDeclination(newt);\r\n hourAngle = NOAACalculator.getSunHourAngleAtSunset(latitude, solarDec, zenith);\r\n\r\n delta = longitude - MathUtils.radiansToDegrees(hourAngle);\r\n timeDiff = 4 * delta;\r\n timeUTC = 720 + timeDiff - eqTime; // in minutes\r\n return timeUTC;\r\n }\r\n}\r\n", "import { Big } from 'big.js';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\nimport { GeoLocation } from './util/GeoLocation.ts';\r\nimport { AstronomicalCalculator } from './util/AstronomicalCalculator.ts';\r\nimport { NOAACalculator } from './util/NOAACalculator.ts';\r\nimport { IllegalArgumentException, UnsupportedError } from './polyfills/errors.ts';\r\nimport { TimeZone } from './polyfills/Utils.ts';\r\n\r\n/**\r\n * A Java calendar that calculates astronomical times such as {@link #getSunrise() sunrise} and {@link #getSunset()\r\n * sunset} times. This class contains a {@link #getCalendar() Calendar} and can therefore use the standard Calendar\r\n * functionality to change dates etc... The calculation engine used to calculate the astronomical times can be changed\r\n * to a different implementation by implementing the abstract {@link AstronomicalCalculator} and setting it with the\r\n * {@link #setAstronomicalCalculator(AstronomicalCalculator)}. A number of different calculation engine implementations\r\n * are included in the util package.\r\n * Note: There are times when the algorithms can't calculate proper values for sunrise, sunset and twilight. This\r\n * is usually caused by trying to calculate times for areas either very far North or South, where sunrise / sunset never\r\n * happen on that date. This is common when calculating twilight with a deep dip below the horizon for locations as far\r\n * south of the North Pole as London, in the northern hemisphere. The sun never reaches this dip at certain times of the\r\n * year. When the calculations encounter this condition a null will be returned when a\r\n *
{@link java.util.Date}
is expected and {@link Long#MIN_VALUE} when a long
is expected. The\r\n * reason that Exception
s are not thrown in these cases is because the lack of a rise/set or twilight is\r\n * not an exception, but an expected condition in many parts of the world.\r\n *\r\n * Here is a simple example of how to use the API to calculate sunrise.\r\n * First create the Calendar for the location you would like to calculate sunrise or sunset times for:\r\n *\r\n * \r\n * String locationName = "Lakewood, NJ";\r\n * double latitude = 40.0828; // Lakewood, NJ\r\n * double longitude = -74.2094; // Lakewood, NJ\r\n * double elevation = 20; // optional elevation correction in Meters\r\n * // the String parameter in getTimeZone() has to be a valid timezone listed in\r\n * // {@link java.util.TimeZone#getAvailableIDs()}\r\n * TimeZone timeZone = TimeZone.getTimeZone("America/New_York");\r\n * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);\r\n * AstronomicalCalendar ac = new AstronomicalCalendar(location);\r\n *\r\n *\r\n * To get the time of sunrise, first set the date you want (if not set, the date will default to today):\r\n *\r\n *
\r\n * ac.getCalendar().set(Calendar.MONTH, Calendar.FEBRUARY);\r\n * ac.getCalendar().set(Calendar.DAY_OF_MONTH, 8);\r\n * Date sunrise = ac.getSunrise();\r\n *\r\n *\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2016\r\n */\r\nexport class AstronomicalCalendar {\r\n /**\r\n * 90° below the vertical. Used as a basis for most calculations since the location of the sun is 90° below\r\n * the horizon at sunrise and sunset.\r\n * Note : it is important to note that for sunrise and sunset the {@link AstronomicalCalculator#adjustZenith\r\n * adjusted zenith} is required to account for the radius of the sun and refraction. The adjusted zenith should not\r\n * be used for calculations above or below 90° since they are usually calculated as an offset to 90°.\r\n */\r\n public static readonly GEOMETRIC_ZENITH: number = 90;\r\n\r\n /** Sun's zenith at civil twilight (96°). */\r\n public static readonly CIVIL_ZENITH: number = 96;\r\n\r\n /** Sun's zenith at nautical twilight (102°). */\r\n public static readonly NAUTICAL_ZENITH: number = 102;\r\n\r\n /** Sun's zenith at astronomical twilight (108°). */\r\n public static readonly ASTRONOMICAL_ZENITH: number = 108;\r\n\r\n /** constant for nanoseconds in an hour (3,600,000) */\r\n public static readonly HOUR_NANOS: number = Temporal.Duration.from({ hours: 1 }).total('nanosecond');\r\n\r\n /**\r\n * The Java Calendar encapsulated by this class to track the current date used by the class\r\n */\r\n private date!: Temporal.PlainDate;\r\n\r\n /**\r\n * the {@link GeoLocation} used for calculations.\r\n */\r\n private geoLocation!: GeoLocation;\r\n\r\n /**\r\n * the internal {@link AstronomicalCalculator} used for calculating solar based times.\r\n */\r\n private astronomicalCalculator!: AstronomicalCalculator;\r\n\r\n /**\r\n * The getSunrise method Returns a
Date
representing the\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunrise time. The zenith used\r\n * for the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90° plus\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the\r\n * {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction\r\n * and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}.\r\n * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using.\r\n *\r\n * @return the Date
representing the exact sunrise time. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalculator#adjustZenith\r\n * @see #getSeaLevelSunrise()\r\n * @see AstronomicalCalendar#getUTCSunrise\r\n */\r\n public getSunrise(): Temporal.ZonedDateTime | null {\r\n const sunrise: number = this.getUTCSunrise(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunrise)) return null;\r\n return this.getDateFromTime(sunrise, true);\r\n }\r\n\r\n /**\r\n * A method that returns the sunrise without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation\r\n * adjustment}. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,\r\n * something that is not affected by elevation. This method returns sunrise calculated at sea level. This forms the\r\n * base for dawn calculations that are calculated as a dip below the horizon before sunrise.\r\n *\r\n * @return the Date
representing the exact sea-level sunrise time. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getSunrise\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunrise\r\n * @see #getSeaLevelSunset()\r\n */\r\n public getSeaLevelSunrise(): Temporal.ZonedDateTime | null {\r\n const sunrise: number = this.getUTCSeaLevelSunrise(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunrise)) return null;\r\n return this.getDateFromTime(sunrise, true);\r\n }\r\n\r\n /**\r\n * A method that returns the beginning of civil twilight\r\n\t * (dawn) using a zenith of {@link #CIVIL_ZENITH 96°}.\r\n\t * \r\n\t * @return The Date
of the beginning of civil twilight using a zenith of 96°. If the calculation\r\n\t * can't be computed, null will be returned. See detailed explanation on top of the page.\r\n\t * @see #CIVIL_ZENITH\r\n\t */\r\n public getBeginCivilTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(AstronomicalCalendar.CIVIL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the beginning of nautical twilight using a zenith of {@link\r\n * #NAUTICAL_ZENITH 102°}.\r\n * \r\n * @return The Date
of the beginning of nautical twilight using a zenith of 102°. If the\r\n * calculation can't be computed null will be returned. See detailed explanation on top of the page.\r\n * @see #NAUTICAL_ZENITH\r\n */\r\n public getBeginNauticalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(AstronomicalCalendar.NAUTICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the beginning of astronomical twilight using a zenith of\r\n\t * {@link #ASTRONOMICAL_ZENITH 108°}.\r\n *\r\n * @return The Date
of the beginning of astronomical twilight using a zenith of 108°. If the\r\n * calculation can't be computed, null will be returned. See detailed explanation on top of the page.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getBeginAstronomicalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(AstronomicalCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * The getSunset method Returns a Date
representing the\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunset time. The zenith used for\r\n * the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90° plus\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the\r\n * {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction\r\n * and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}.\r\n * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using. Note:\r\n * In certain cases the calculates sunset will occur before sunrise. This will typically happen when a timezone\r\n * other than the local timezone is used (calculating Los Angeles sunset using a GMT timezone for example). In this\r\n * case the sunset date will be incremented to the following date.\r\n *\r\n * @return the Date
representing the exact sunset time. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalculator#adjustZenith\r\n * @see #getSeaLevelSunset()\r\n * @see AstronomicalCalendar#getUTCSunset\r\n */\r\n public getSunset(): Temporal.ZonedDateTime | null {\r\n const sunset: number = this.getUTCSunset(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunset)) return null;\r\n return this.getDateFromTime(sunset, false);\r\n }\r\n\r\n /**\r\n * A method that returns the sunset without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation\r\n * adjustment}. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,\r\n * something that is not affected by elevation. This method returns sunset calculated at sea level. This forms the\r\n * base for dusk calculations that are calculated as a dip below the horizon after sunset.\r\n *\r\n * @return the Date
representing the exact sea-level sunset time. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getSunset\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunset 2see {@link #getSunset()}\r\n */\r\n public getSeaLevelSunset(): Temporal.ZonedDateTime | null {\r\n const sunset: number = this.getUTCSeaLevelSunset(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunset)) return null;\r\n return this.getDateFromTime(sunset, false);\r\n }\r\n\r\n /**\r\n * A method that returns the end of civil twilight\r\n\t * using a zenith of {@link #CIVIL_ZENITH 96°}.\r\n *\r\n * @return The Date
of the end of civil twilight using a zenith of {@link #CIVIL_ZENITH 96°}. If\r\n * the calculation can't be computed, null will be returned. See detailed explanation on top of the page.\r\n * @see #CIVIL_ZENITH\r\n */\r\n public getEndCivilTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(AstronomicalCalendar.CIVIL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}.\r\n *\r\n * @return The Date
of the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}\r\n * . If the calculation can't be computed, null will be returned. See detailed explanation on top of the\r\n * page.\r\n * @see #NAUTICAL_ZENITH\r\n */\r\n public getEndNauticalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(AstronomicalCalendar.NAUTICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH 108°}.\r\n *\r\n * @return the Date
of the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH\r\n * 108°}. If the calculation can't be computed, null will be returned. See detailed explanation on top\r\n * of the page.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getEndAstronomicalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(AstronomicalCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A utility method that returns the time of an offset by degrees below or above the horizon of\r\n * {@link #getSunrise() sunrise}. Note that the degree offset is from the vertical, so for a calculation of 14°\r\n * before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.\r\n *\r\n * @param offsetZenith\r\n * the degrees before {@link #getSunrise()} to use in the calculation. For time after sunrise use\r\n * negative numbers. Note that the degree offset is from the vertical, so for a calculation of 14°\r\n * before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a\r\n * parameter.\r\n * @return The {@link java.util.Date} of the offset after (or before) {@link #getSunrise()}. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does\r\n * not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * page.\r\n */\r\n public getSunriseOffsetByDegrees(offsetZenith: number): Temporal.ZonedDateTime | null {\r\n const dawn: number = this.getUTCSunrise(offsetZenith);\r\n if (Number.isNaN(dawn)) return null;\r\n return this.getDateFromTime(dawn, true);\r\n }\r\n\r\n /**\r\n * A utility method that returns the time of an offset by degrees below or above the horizon of {@link #getSunset()\r\n * sunset}. Note that the degree offset is from the vertical, so for a calculation of 14° after sunset, an\r\n * offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.\r\n *\r\n * @param offsetZenith\r\n * the degrees after {@link #getSunset()} to use in the calculation. For time before sunset use negative\r\n * numbers. Note that the degree offset is from the vertical, so for a calculation of 14° after\r\n * sunset, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.\r\n * @return The {@link java.util.Date}of the offset after (or before) {@link #getSunset()}. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * page.\r\n */\r\n public getSunsetOffsetByDegrees(offsetZenith: number): Temporal.ZonedDateTime | null {\r\n const sunset: number = this.getUTCSunset(offsetZenith);\r\n if (Number.isNaN(sunset)) return null;\r\n return this.getDateFromTime(sunset, false);\r\n }\r\n\r\n /**\r\n * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default\r\n * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.\r\n */\r\n\r\n /*\r\n constructor() {\r\n this(new GeoLocation());\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that takes in geolocation information as a\r\n * parameter. The default {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} used for solar\r\n * calculations is the the {@link NOAACalculator}.\r\n *\r\n * @param geoLocation\r\n * The location information used for calculating astronomical sun times.\r\n *\r\n * @see #setAstronomicalCalculator(AstronomicalCalculator) for changing the calculator class.\r\n */\r\n constructor(geoLocation: GeoLocation) {\r\n this.setDate(Temporal.Now.plainDateISO());\r\n this.setGeoLocation(geoLocation); // duplicate call\r\n this.setAstronomicalCalculator(new NOAACalculator());\r\n }\r\n\r\n /**\r\n * A method that returns the sunrise in UTC time without correction for time zone offset from GMT and without using\r\n * daylight savings time.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time after sunrise use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n */\r\n public getUTCSunrise(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunrise(this.getAdjustedDate(), this.getGeoLocation(), zenith, true);\r\n }\r\n\r\n /**\r\n * A method that returns the sunrise in UTC time without correction for time zone offset from GMT and without using\r\n * daylight savings time. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible\r\n * light, something that is not affected by elevation. This method returns UTC sunrise calculated at sea level. This\r\n * forms the base for dawn calculations that are calculated as a dip below the horizon before sunrise.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time after sunrise use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getUTCSunrise\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunset\r\n */\r\n public getUTCSeaLevelSunrise(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunrise(this.getAdjustedDate(), this.getGeoLocation(), zenith, false);\r\n }\r\n\r\n /**\r\n * A method that returns the sunset in UTC time without correction for time zone offset from GMT and without using\r\n * daylight savings time.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time after sunset use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunset\r\n */\r\n public getUTCSunset(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunset(this.getAdjustedDate(), this.getGeoLocation(), zenith, true);\r\n }\r\n\r\n /**\r\n * A method that returns the sunset in UTC time without correction for elevation, time zone offset from GMT and\r\n * without using daylight savings time. Non-sunrise and sunset calculations such as dawn and dusk, depend on the\r\n * amount of visible light, something that is not affected by elevation. This method returns UTC sunset calculated\r\n * at sea level. This forms the base for dusk calculations that are calculated as a dip below the horizon after\r\n * sunset.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time before sunset use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getUTCSunset\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunrise\r\n */\r\n public getUTCSeaLevelSunset(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunset(this.getAdjustedDate(), this.getGeoLocation(), zenith, false);\r\n }\r\n\r\n /**\r\n * A method that returns an {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted}\r\n * temporal (solar) hour. The day from {@link #getSunrise() sunrise} to {@link #getSunset() sunset} is split into 12\r\n * equal parts with each one being a temporal hour.\r\n *\r\n * @see #getSunrise()\r\n * @see #getSunset()\r\n * @see #getTemporalHour(Date, Date)\r\n *\r\n * @return the long
millisecond length of a temporal hour. If the calculation can't be computed,\r\n * {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the page.\r\n *\r\n * @see #getTemporalHour(Date, Date)\r\n */\r\n\r\n /*\r\n public getTemporalHour(): number {\r\n return this.getTemporalHour(this.getSeaLevelSunrise(), this.getSeaLevelSunset());\r\n }\r\n */\r\n\r\n /**\r\n * A utility method that will allow the calculation of a temporal (solar) hour based on the sunrise and sunset\r\n * passed as parameters to this method. An example of the use of this method would be the calculation of a\r\n * non-elevation adjusted temporal hour by passing in {@link #getSeaLevelSunrise() sea level sunrise} and\r\n * {@link #getSeaLevelSunset() sea level sunset} as parameters.\r\n *\r\n * @param startOfday\r\n * The start of the day.\r\n * @param endOfDay\r\n * The end of the day.\r\n *\r\n * @return the long
millisecond length of the temporal hour. If the calculation can't be computed a\r\n * {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the page.\r\n *\r\n * @see #getTemporalHour()\r\n */\r\n public getTemporalHour(startOfday: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise(), endOfDay: Temporal.ZonedDateTime | null = this.getSeaLevelSunset()) {\r\n if (startOfday === null || endOfDay === null) {\r\n return;\r\n }\r\n const intValue = startOfday.until(endOfDay).total({ unit: 'nanoseconds' }) / 12;\r\n return Temporal.Duration.from({ nanoseconds: Math.trunc(intValue) })\r\n }\r\n\r\n /**\r\n * A method that returns \"solar\" midnight, or the time when the sun is at its nadir.\r\n * Note: this method is experimental and might be removed.\r\n * \r\n * @return the Date
of Solar Midnight (chatzos layla). If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSolarMidnight(): Temporal.ZonedDateTime | null {\r\n const clonedCal = this.clone();\r\n clonedCal.setDate(this.getDate().add({ days: 1 }));\r\n return this.getSunTransit()!\r\n .add({nanoseconds: Math.trunc(this.getSunTransit()?.until(clonedCal.getSunTransit()!).total({ unit: \"nanoseconds\" })! / 2)});\r\n }\r\n\r\n /**\r\n * A method that returns sundial or solar noon. It occurs when the Sun is transiting the celestial meridian. In this class it is\r\n * calculated as halfway between the sunrise and sunset passed to this method. This time can be slightly off the\r\n * real transit time due to changes in declination (the lengthening or shortening day).\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating the sun's transit. This can be sea level sunrise, visual sunrise (or\r\n * any arbitrary start of day) passed to this method.\r\n * @param endOfDay\r\n * the end of day for calculating the sun's transit. This can be sea level sunset, visual sunset (or any\r\n * arbitrary end of day) passed to this method.\r\n *\r\n * @return the Date
representing Sun's transit. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, null will be returned. See detailed explanation on top of the page.\r\n */\r\n public getSunTransit(startOfDay?: Temporal.ZonedDateTime, endOfDay?: Temporal.ZonedDateTime): Temporal.ZonedDateTime | null {\r\n if (startOfDay) {\r\n if (!endOfDay)\r\n throw new IllegalArgumentException('No argument for the end of day provided');\r\n\r\n const temporalHour = this.getTemporalHour(startOfDay, endOfDay)!;\r\n let offsetTime = startOfDay;\r\n for (let index = 0; index < 6; index++) {\r\n offsetTime = offsetTime.add(temporalHour);\r\n }\r\n\r\n return offsetTime;\r\n }\r\n\r\n const noon = this.getAstronomicalCalculator().getUTCNoon(this.getAdjustedDate(), this.getGeoLocation());\r\n return this.getDateFromTime(noon, false); \r\n }\r\n\r\n /**\r\n * A method that returns a Date
from the time passed in as a parameter.\r\n *\r\n * @param time\r\n * The time to be set as the time for the Date
. The time expected is in the format: 18.75\r\n * for 6:45:00 PM.\r\n * @param isSunrise true if the time is sunrise, and false if it is sunset\r\n * @return The Date.\r\n */\r\n protected getDateFromTime(time: number, isSunrise: boolean): Temporal.ZonedDateTime | null {\r\n if (Number.isNaN(time)) {\r\n return null;\r\n }\r\n let calculatedTime: number = time;\r\n\r\n const adjustedDate: Temporal.PlainDate = this.getAdjustedDate();\r\n let cal = adjustedDate.toZonedDateTime(\"UTC\");\r\n\r\n const hours: number = Math.trunc(calculatedTime); // retain only the hours\r\n calculatedTime -= hours;\r\n const minutes: number = Math.trunc(calculatedTime *= 60); // retain only the minutes\r\n calculatedTime -= minutes;\r\n const seconds: number = Math.trunc(calculatedTime *= 60); // retain only the seconds\r\n calculatedTime -= seconds; // remaining milliseconds\r\n const milliseconds = Math.trunc(calculatedTime *= 1000)\r\n calculatedTime -= milliseconds;\r\n const microseconds = Math.trunc(calculatedTime *= 1000)\r\n calculatedTime -= microseconds; // remaining nanoseconds\r\n\r\n\r\n // Check if a date transition has occurred, or is about to occur - this indicates the date of the event is\r\n // actually not the target date, but the day prior or after\r\n const localTimeHours: number = Math.trunc(this.getGeoLocation().getLongitude() / 15);\r\n if (isSunrise && localTimeHours + hours > 18) {\r\n cal = cal.subtract({ days: 1 });\r\n } else if (!isSunrise && localTimeHours + hours < 6) {\r\n cal = cal.add({ days: 1 });\r\n }\r\n\r\n return cal.with({\r\n hour: hours,\r\n minute: minutes,\r\n second: seconds,\r\n millisecond: milliseconds,\r\n microsecond: microseconds,\r\n nanosecond: Math.trunc(calculatedTime * 1000)\r\n }).withTimeZone(this.geoLocation.getTimeZone());\r\n }\r\n\r\n /**\r\n * Returns the dip below the horizon before sunrise that matches the offset minutes on passed in as a parameter. For\r\n * example passing in 72 minutes for a calendar set to the equinox in Jerusalem returns a value close to 16.1°\r\n * Please note that this method is very slow and inefficient and should NEVER be used in a loop. TODO: Improve\r\n * efficiency.\r\n *\r\n * @param minutes\r\n * offset\r\n * @return the degrees below the horizon before sunrise that match the offset in minutes passed it as a parameter.\r\n * @see #getSunsetSolarDipFromOffset(double)\r\n */\r\n public getSunriseSolarDipFromOffset(minutes: number): number | null {\r\n if (Number.isNaN(minutes)) return null;\r\n\r\n let offsetByDegrees: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise();\r\n const offsetByTime: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise()?.subtract({ minutes })!;\r\n\r\n let degrees: Big = new Big(0);\r\n const incrementor: Big = new Big('0.0001');\r\n\r\n // If `minutes` is not `NaN` and `offsetByDegrees` is not null, `offsetByTime` should not be null\r\n while (offsetByDegrees === null || ((minutes < 0 && offsetByDegrees < offsetByTime!)\r\n || (minutes > 0 && offsetByDegrees > offsetByTime!))) {\r\n if (minutes > 0) {\r\n degrees = degrees.add(incrementor);\r\n } else {\r\n degrees = degrees.sub(incrementor);\r\n }\r\n\r\n offsetByDegrees = this.getSunriseOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + degrees.toNumber());\r\n }\r\n\r\n return degrees.toNumber();\r\n }\r\n\r\n /**\r\n * Returns the dip below the horizon after sunset that matches the offset minutes on passed in as a parameter. For\r\n * example passing in 72 minutes for a calendar set to the equinox in Jerusalem returns a value close to 16.1°\r\n * Please note that this method is very slow and inefficient and should NEVER be used in a loop. TODO: Improve\r\n * efficiency.\r\n *\r\n * @param minutes\r\n * offset\r\n * @return the degrees below the horizon after sunset that match the offset in minutes passed it as a parameter.\r\n * @see #getSunriseSolarDipFromOffset(double)\r\n */\r\n public getSunsetSolarDipFromOffset(minutes: number): number | null {\r\n if (Number.isNaN(minutes)) return null;\r\n\r\n let offsetByDegrees: Temporal.ZonedDateTime | null = this.getSeaLevelSunset();\r\n const offsetByTime: Temporal.ZonedDateTime | null = this.getSeaLevelSunset()?.add({ minutes })!\r\n\r\n let degrees: Big = new Big(0);\r\n const incrementor: Big = new Big('0.001');\r\n\r\n // If `minutes` is not `NaN` and `offsetByDegrees` is not null, `offsetByTime` should not be null\r\n while (offsetByDegrees == null || ((minutes > 0 && offsetByDegrees < offsetByTime!)\r\n || (minutes < 0 && offsetByDegrees > offsetByTime!))) {\r\n if (minutes > 0) {\r\n degrees = degrees.add(incrementor);\r\n } else {\r\n degrees = degrees.sub(incrementor);\r\n }\r\n\r\n offsetByDegrees = this.getSunsetOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + degrees.toNumber());\r\n }\r\n\r\n return degrees.toNumber();\r\n }\r\n\r\n /**\r\n * FIXME broken for czc.getRiseSetSolarDipFromOffset(-72, czc.getSunrise());\r\n * and broken in other was as well\r\n * @param minutes\r\n * @param riseSet\r\n * @return\r\n */\r\n /*\r\n public getRiseSetSolarDipFromOffset(minutes: number, riseSet: DateTime): number {\r\n let offsetByDegrees: DateTime | null = riseSet;\r\n const offsetByTime: DateTime | null = AstronomicalCalendar.getTimeOffset(riseSet, minutes * AstronomicalCalendar.MIUTE_MILLIS);\r\n\r\n let degrees: Big = new Big(0);\r\n const incrementor: Big = new Big('0.001');\r\n\r\n while (offsetByDegrees == null || ((minutes > 0 && offsetByDegrees < offsetByTime!)\r\n || (minutes < 0 && offsetByDegrees > offsetByTime!))) {\r\n if (minutes > 0) {\r\n degrees = degrees.add(incrementor);\r\n } else {\r\n degrees = degrees.sub(incrementor);\r\n }\r\n offsetByDegrees = this.getSunsetOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + degrees.toNumber());\r\n }\r\n return degrees.valueOf();\r\n }\r\n */\r\n\r\n /**\r\n\t * A method that returns local mean time (LMT) time\r\n\t * converted to regular clock time for the number of hours (0.0 to 23.999...) passed to this method. This time is\r\n\t * adjusted from standard time to account for the local latitude. The 360° of the globe divided by 24 calculates\r\n\t * to 15° per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... noon is at exactly 12:00pm.\r\n\t * Lakewood, N.J., with a longitude of -74.222, is 0.7906 away from the closest multiple of 15 at -75°. This is\r\n\t * multiplied by 4 clock minutes (per degree) to yield 3 minutes and 7 seconds for a noon time of 11:56:53am. This\r\n\t * method is not tied to the theoretical 15° time zones, but will adjust to the actual time zone and Daylight saving time to return LMT.\r\n\t * \r\n\t * @param hours\r\n\t * \t\t\tthe hour (such as 12.0 for noon and 0.0 for midnight) to calculate as LMT. Valid values are in the range of\r\n\t * \t\t\t0.0 to 23.999.... An IllegalArgumentException will be thrown if the value does not fit in the expected range.\r\n\t * @return the Date representing the local mean time (LMT) for the number of hours passed in. In Lakewood, NJ, passing 12\r\n\t * (noon) will return 11:56:50am.\r\n\t * @see GeoLocation#getLocalMeanTimeOffset()\r\n\t */\r\n\tpublic getLocalMeanTime(hours:number): Temporal.ZonedDateTime | null {\r\n\t\tif(hours < 0 || hours >= 24) {\r\n\t\t\tthrow new IllegalArgumentException(\"Hours must between 0 and 23.9999...\");\r\n\t\t}\r\n \r\n const geoLocation: GeoLocation = this.getGeoLocation();\r\n const rawOffsetHours = TimeZone.getRawOffset(geoLocation.getTimeZone()) / AstronomicalCalendar.HOUR_NANOS;\r\n return this.getDateFromTime(hours - rawOffsetHours, true)?.subtract({ nanoseconds: geoLocation.getLocalMeanTimeOffset() })!;\r\n\t}\r\n\r\n /**\r\n * Adjusts the Calendar
to deal with edge cases where the location crosses the antimeridian.\r\n *\r\n * @see GeoLocation#getAntimeridianAdjustment()\r\n * @return the adjusted Calendar\r\n */\r\n private getAdjustedDate(): Temporal.PlainDate {\r\n const offset: -1 | 0 | 1 = this.getGeoLocation().getAntimeridianAdjustment();\r\n if (offset === 0) return this.getDate();\r\n return this.getDate().add({ days: offset });\r\n }\r\n\r\n /**\r\n * @return an XML formatted representation of the class. It returns the default output of the\r\n * {@link ZmanimFormatter#toXML(AstronomicalCalendar) toXML} method.\r\n * @see ZmanimFormatter#toXML(AstronomicalCalendar)\r\n * @see java.lang.Object#toString()\r\n * @deprecated (This depends on a circular dependency).\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toString(): void {\r\n throw new UnsupportedError('This method is unsupported, due to the fact that it depends on a circular dependency.');\r\n }\r\n\r\n /**\r\n * @return a JSON formatted representation of the class. It returns the default output of the\r\n * {@link ZmanimFormatter#toJSON(AstronomicalCalendar) toJSON} method.\r\n * @see ZmanimFormatter#toJSON(AstronomicalCalendar)\r\n * @see java.lang.Object#toString()\r\n * @deprecated This depends on a circular dependency. Use ZmanimFormatter.toJSON(astronomicalCalendar)instead.\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toJSON(): void {\r\n throw new UnsupportedError('This method is unsupported, due to the fact that it depends on a circular dependency. '\r\n + 'Use `ZmanimFormatter.toJSON(astronomicalCalendar)` instead.');\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#equals(Object)\r\n */\r\n public equals(object: object): boolean {\r\n if (this === object) {\r\n return true;\r\n }\r\n if (!(object instanceof AstronomicalCalendar)) {\r\n return false;\r\n }\r\n const aCal: AstronomicalCalendar = object as AstronomicalCalendar;\r\n return this.getDate().equals(aCal.getDate()) && this.getGeoLocation().equals(aCal.getGeoLocation())\r\n && this.getAstronomicalCalculator() === aCal.getAstronomicalCalculator();\r\n }\r\n\r\n /**\r\n * A method that returns the currently set {@link GeoLocation} which contains location information used for the\r\n * astronomical calculations.\r\n *\r\n * @return Returns the geoLocation.\r\n */\r\n public getGeoLocation(): GeoLocation {\r\n return this.geoLocation;\r\n }\r\n\r\n /**\r\n * Sets the {@link GeoLocation}
Object
to be used for astronomical calculations.\r\n *\r\n * @param geoLocation\r\n * The geoLocation to set.\r\n */\r\n public setGeoLocation(geoLocation: GeoLocation): void {\r\n this.geoLocation = geoLocation;\r\n }\r\n\r\n /**\r\n * A method that returns the currently set AstronomicalCalculator.\r\n *\r\n * @return Returns the astronomicalCalculator.\r\n * @see #setAstronomicalCalculator(AstronomicalCalculator)\r\n */\r\n public getAstronomicalCalculator(): AstronomicalCalculator {\r\n return this.astronomicalCalculator;\r\n }\r\n\r\n /**\r\n * A method to set the {@link AstronomicalCalculator} used for astronomical calculations. The Zmanim package ships\r\n * with a number of different implementations of the abstract
{@link AstronomicalCalculator} based on\r\n * different algorithms, including the default {@link com.kosherjava.zmanim.util.NOAACalculator} based on NOAA's implementation of Jean Meeus's algorithms as well as {@link\r\n * com.kosherjava.zmanim.util.SunTimesCalculator} based on the US\r\n * Naval Observatory's algorithm,. This allows easy runtime switching and comparison of different algorithms.\r\n *\r\n * @param astronomicalCalculator\r\n * The astronomicalCalculator to set.\r\n */\r\n public setAstronomicalCalculator(astronomicalCalculator: AstronomicalCalculator): void {\r\n this.astronomicalCalculator = astronomicalCalculator;\r\n }\r\n\r\n /**\r\n * returns the Calendar object encapsulated in this class.\r\n *\r\n * @return Returns the calendar.\r\n */\r\n public getDate(): Temporal.PlainDate {\r\n return this.date;\r\n }\r\n\r\n /**\r\n * @param calendar\r\n * The calendar to set.\r\n */\r\n public setDate(date: Temporal.PlainDate | Date | string | number): void {\r\n if (date instanceof Temporal.PlainDate) {\r\n this.date = date;\r\n } else if (date instanceof Date) {\r\n this.date = Temporal.Instant.fromEpochMilliseconds(date.valueOf()).toZonedDateTimeISO(this.geoLocation.getTimeZone()).toPlainDate();\r\n } else if (typeof date === 'string') {\r\n this.date = Temporal.PlainDate.from(date);\r\n }\r\n }\r\n\r\n /**\r\n * A method that creates a deep copy of the object.\r\n * Note: If the {@link java.util.TimeZone} in the cloned {@link GeoLocation} will\r\n * be changed from the original, it is critical that\r\n * {@link AstronomicalCalendar#getCalendar()}.\r\n * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} be called in order for the\r\n * AstronomicalCalendar to output times in the expected offset after being cloned.\r\n *\r\n * @see java.lang.Object#clone()\r\n * @since 1.1\r\n */\r\n public clone(): AstronomicalCalendar {\r\n const clonedCalendar: AstronomicalCalendar = new AstronomicalCalendar(this.geoLocation);\r\n clonedCalendar.setDate(this.date);\r\n clonedCalendar.setAstronomicalCalculator(this.astronomicalCalculator);\r\n\r\n return clonedCalendar;\r\n }\r\n\r\n // eslint-disable-next-line class-methods-use-this\r\n public getClassName() {\r\n return 'com.kosherjava.zmanim.AstronomicalCalendar';\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar } from '../polyfills/Utils.ts';\r\nimport { IllegalArgumentException } from '../polyfills/errors.ts';\r\n\r\n/**\r\n * The JewishDate is the base calendar class, that supports maintenance of a {@link java.util.GregorianCalendar}\r\n * instance along with the corresponding Jewish date. This class can use the standard Java Date and Calendar\r\n * classes for setting and maintaining the dates, but it does not subclass these classes or use them internally\r\n * in any calculations. This class also does not have a concept of a time (which the Date class does). Please\r\n * note that the calendar does not currently support dates prior to 1/1/1 Gregorian. Also keep in mind that the\r\n * Gregorian calendar started on October 15, 1582, so any calculations prior to that are suspect (at least from\r\n * a Gregorian perspective). While 1/1/1 Gregorian and forward are technically supported, any calculations prior to Hillel II's (Hakatan's) calendar (4119 in the Jewish Calendar / 359\r\n * CE Julian as recorded by Rav Hai Gaon) would be just an\r\n * approximation.\r\n *\r\n * This open source Java code was written by Avrom Finkelstien from his C++\r\n * code. It was refactored to fit the KosherJava Zmanim API with simplification of the code, enhancements and some bug\r\n * fixing.\r\n *\r\n * Some of Avrom's original C++ code was translated from C/C++\r\n * code in Calendrical Calculations by Nachum Dershowitz and Edward M.\r\n * Reingold, Software-- Practice & Experience, vol. 20, no. 9 (September, 1990), pp. 899- 928. Any method with the mark\r\n * \"ND+ER\" indicates that the method was taken from this source with minor modifications.\r\n *\r\n * If you are looking for a class that implements a Jewish calendar version of the Calendar class, one is available from\r\n * the ICU (International Components for Unicode) project, formerly part of\r\n * IBM's DeveloperWorks.\r\n *\r\n * @see JewishCalendar\r\n * @see HebrewDateFormatter\r\n * @see java.util.Date\r\n * @see java.util.Calendar\r\n * @author © Avrom Finkelstien 2002\r\n * @author © Eliyahu Hershfeld 2011 - 2015\r\n */\r\nexport class JewishDate {\r\n /**\r\n * Value of the month field indicating Nissan, the first numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 7th (or 8th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly NISSAN: number = 1;\r\n\r\n /**\r\n * Value of the month field indicating Iyar, the second numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 8th (or 9th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly IYAR: number = 2;\r\n\r\n /**\r\n * Value of the month field indicating Sivan, the third numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 9th (or 10th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly SIVAN: number = 3;\r\n\r\n /**\r\n * Value of the month field indicating Tammuz, the fourth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 10th (or 11th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly TAMMUZ: number = 4;\r\n\r\n /**\r\n * Value of the month field indicating Av, the fifth numeric month of the year in the Jewish calendar. With the year\r\n * starting at {@link #TISHREI}, it would actually be the 11th (or 12th in a {@link #isJewishLeapYear() leap year})\r\n * month of the year.\r\n */\r\n public static readonly AV: number = 5;\r\n\r\n /**\r\n * Value of the month field indicating Elul, the sixth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 12th (or 13th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly ELUL: number = 6;\r\n\r\n /**\r\n * Value of the month field indicating Tishrei, the seventh numeric month of the year in the Jewish calendar. With\r\n * the year starting at this month, it would actually be the 1st month of the year.\r\n */\r\n public static readonly TISHREI: number = 7;\r\n\r\n /**\r\n * Value of the month field indicating Cheshvan/marcheshvan, the eighth numeric month of the year in the Jewish\r\n * calendar. With the year starting at {@link #TISHREI}, it would actually be the 2nd month of the year.\r\n */\r\n public static readonly CHESHVAN: number = 8;\r\n\r\n /**\r\n * Value of the month field indicating Kislev, the ninth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 3rd month of the year.\r\n */\r\n public static readonly KISLEV: number = 9;\r\n\r\n /**\r\n * Value of the month field indicating Teves, the tenth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 4th month of the year.\r\n */\r\n public static readonly TEVES: number = 10;\r\n\r\n /**\r\n * Value of the month field indicating Shevat, the eleventh numeric month of the year in the Jewish calendar. With\r\n * the year starting at {@link #TISHREI}, it would actually be the 5th month of the year.\r\n */\r\n public static readonly SHEVAT: number = 11;\r\n\r\n /**\r\n * Value of the month field indicating Adar (or Adar I in a {@link #isJewishLeapYear() leap year}), the twelfth\r\n * numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually\r\n * be the 6th month of the year.\r\n */\r\n public static readonly ADAR: number = 12;\r\n\r\n /**\r\n * Value of the month field indicating Adar II, the leap (intercalary or embolismic) thirteenth (Undecimber) numeric\r\n * month of the year added in Jewish {@link #isJewishLeapYear() leap year}). The leap years are years 3, 6, 8, 11,\r\n * 14, 17 and 19 of a 19 year cycle. With the year starting at {@link #TISHREI}, it would actually be the 7th month\r\n * of the year.\r\n */\r\n public static readonly ADAR_II: number = 13;\r\n\r\n /**\r\n * the Jewish epoch using the RD (Rata Die/Fixed Date or Reingold Dershowitz) day used in Calendrical Calculations.\r\n * Day 1 is January 1, 0001 Gregorian\r\n */\r\n private static readonly JEWISH_EPOCH: number = -1373429;\r\n\r\n /** The number of chalakim (18) in a minute. */\r\n private static readonly CHALAKIM_PER_MINUTE: number = 18;\r\n\r\n /** The number of chalakim (1080) in an hour. */\r\n private static readonly CHALAKIM_PER_HOUR: number = 1080;\r\n\r\n /** The number of chalakim (25,920) in a 24 hour day. */\r\n private static readonly CHALAKIM_PER_DAY: number = 25920; // 24 * 1080\r\n\r\n /** The number of chalakim in an average Jewish month. A month has 29 days, 12 hours and 793\r\n * chalakim (44 minutes and 3.3 seconds) for a total of 765,433 chalakim */\r\n private static readonly CHALAKIM_PER_MONTH: number = 765433; // (29 * 24 + 12) * 1080 + 793\r\n\r\n /**\r\n * Days from the beginning of Sunday till molad BaHaRaD. Calculated as 1 day, 5 hours and 204 chalakim = (24 + 5) *\r\n * 1080 + 204 = 31524\r\n */\r\n private static readonly CHALAKIM_MOLAD_TOHU: number = 31524;\r\n\r\n /**\r\n * A short year where both {@link #CHESHVAN} and {@link #KISLEV} are 29 days.\r\n *\r\n * @see #getCheshvanKislevKviah()\r\n * @see HebrewDateFormatter#getFormattedKviah(int)\r\n */\r\n public static readonly CHASERIM: number = 0;\r\n\r\n /**\r\n * An ordered year where {@link #CHESHVAN} is 29 days and {@link #KISLEV} is 30 days.\r\n *\r\n * @see #getCheshvanKislevKviah()\r\n * @see HebrewDateFormatter#getFormattedKviah(int)\r\n */\r\n public static readonly KESIDRAN: number = 1;\r\n\r\n /**\r\n * A long year where both {@link #CHESHVAN} and {@link #KISLEV} are 30 days.\r\n *\r\n * @see #getCheshvanKislevKviah()\r\n * @see HebrewDateFormatter#getFormattedKviah(int)\r\n */\r\n public static readonly SHELAIMIM: number = 2;\r\n\r\n private date: Temporal.PlainDate;\r\n\r\n /** the internal count of molad hours. */\r\n private moladHours!: number;\r\n\r\n /** the internal count of molad minutes. */\r\n private moladMinutes!: number;\r\n\r\n /** the internal count of molad chalakim. */\r\n private moladChalakim!: number;\r\n\r\n /**\r\n * Returns the molad hours. Only a JewishDate object populated with {@link #getMolad()},\r\n * {@link #setJewishDate(int, int, int, int, int, int)} or {@link #setMoladHours(int)} will have this field\r\n * populated. A regular JewishDate object will have this field set to 0.\r\n *\r\n * @return the molad hours\r\n * @see #setMoladHours(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n */\r\n public getMoladHours(): number {\r\n return this.moladHours;\r\n }\r\n\r\n /**\r\n * Sets the molad hours.\r\n *\r\n * @param moladHours\r\n * the molad hours to set\r\n * @see #getMoladHours()\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n *\r\n */\r\n public setMoladHours(moladHours: number): void {\r\n this.moladHours = moladHours;\r\n }\r\n\r\n /**\r\n * Returns the molad minutes. Only an object populated with {@link #getMolad()},\r\n * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladMinutes(int)} will have these fields\r\n * populated. A regular JewishDate object will have this field set to 0.\r\n *\r\n * @return the molad minutes\r\n * @see #setMoladMinutes(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n */\r\n public getMoladMinutes(): number {\r\n return this.moladMinutes;\r\n }\r\n\r\n /**\r\n * Sets the molad minutes. The expectation is that the traditional minute-less chalakim will be broken out to\r\n * minutes and {@link #setMoladChalakim(int) chalakim/parts} , so 793 (TaShTZaG) parts would have the minutes set to\r\n * 44 and chalakim to 1.\r\n *\r\n * @param moladMinutes\r\n * the molad minutes to set\r\n * @see #getMoladMinutes()\r\n * @see #setMoladChalakim(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n *\r\n */\r\n public setMoladMinutes(moladMinutes: number): void {\r\n this.moladMinutes = moladMinutes;\r\n }\r\n\r\n /**\r\n * Sets the molad chalakim/parts. The expectation is that the traditional minute-less chalakim will be broken out to\r\n * {@link #setMoladMinutes(int) minutes} and chalakim, so 793 (TaShTZaG) parts would have the minutes set to 44 and\r\n * chalakim to 1.\r\n *\r\n * @param moladChalakim\r\n * the molad chalakim/parts to set\r\n * @see #getMoladChalakim()\r\n * @see #setMoladMinutes(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n *\r\n */\r\n public setMoladChalakim(moladChalakim: number): void {\r\n this.moladChalakim = moladChalakim;\r\n }\r\n\r\n /**\r\n * Returns the molad chalakim/parts. Only an object populated with {@link #getMolad()},\r\n * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladChalakim(int)} will have these fields\r\n * populated. A regular JewishDate object will have this field set to 0.\r\n *\r\n * @return the molad chalakim/parts\r\n * @see #setMoladChalakim(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n */\r\n public getMoladChalakim(): number {\r\n return this.moladChalakim;\r\n }\r\n\r\n /**\r\n * Returns the last day in a gregorian month\r\n *\r\n * @param month\r\n * the Gregorian month\r\n * @return the last day of the Gregorian month\r\n */\r\n public getLastDayOfGregorianMonth(month: number): number {\r\n return this.date.with({ month }).daysInMonth;\r\n }\r\n\r\n /**\r\n * Returns the number of days in a given month in a given month and year.\r\n *\r\n * @param month\r\n * the month. As with other cases in this class, this is 1-based, not zero-based.\r\n * @param year\r\n * the year (only impacts February)\r\n * @return the number of days in the month in the given year\r\n */\r\n private static getLastDayOfGregorianMonth(month: number, year: number): number {\r\n switch (month) {\r\n case 2:\r\n if ((year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0)) {\r\n return 29;\r\n }\r\n return 28;\r\n case 4:\r\n case 6:\r\n case 9:\r\n case 11:\r\n return 30;\r\n default:\r\n return 31;\r\n }\r\n }\r\n\r\n /**\r\n * Computes the Gregorian date from the absolute date. ND+ER\r\n * @param absDate - the absolute date\r\n */\r\n private absDateToDate(absDate: number): void {\r\n let year: number = Math.trunc(absDate / 366); // Search forward year by year from approximate year\r\n while (absDate >= JewishDate.gregorianDateToAbsDate(year + 1, 1, 1)) {\r\n year++;\r\n }\r\n\r\n let month: number = 1; // Search forward month by month from January\r\n while (absDate > JewishDate.gregorianDateToAbsDate(year, month, JewishDate.getLastDayOfGregorianMonth(month, year))) {\r\n month++;\r\n }\r\n\r\n const dayOfMonth: number = absDate - JewishDate.gregorianDateToAbsDate(year, month, 1) + 1;\r\n this.setInternalGregorianDate(year, month, dayOfMonth);\r\n }\r\n\r\n /**\r\n * Computes the absolute date from a Gregorian date. ND+ER\r\n *\r\n * @param year\r\n * the Gregorian year\r\n * @param month\r\n * the Gregorian month. Unlike the Java Calendar where January has the value of 0,This expects a 1 for\r\n * January\r\n * @param dayOfMonth\r\n * the day of the month (1st, 2nd, etc...)\r\n * @return the absolute Gregorian day\r\n */\r\n private static gregorianDateToAbsDate(year: number, month: number, dayOfMonth: number): number {\r\n let absDate: number = dayOfMonth;\r\n for (let m: number = month - 1; m > 0; m--) {\r\n absDate += JewishDate.getLastDayOfGregorianMonth(m, year); // days in prior months of the year\r\n }\r\n return (absDate // days this year\r\n + 365 * (year - 1) // days in previous years ignoring leap days\r\n + Math.trunc((year - 1) / 4) // Julian leap days before this year\r\n - Math.trunc((year - 1) / 100) // minus prior century years\r\n + Math.trunc((year - 1) / 400)); // plus prior years divisible by 400\r\n }\r\n\r\n /**\r\n * Returns if the year is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19 year cycle are leap years.\r\n *\r\n * @param year\r\n * the Jewish year.\r\n * @return true if it is a leap year\r\n * @see #isJewishLeapYear()\r\n */\r\n private static isJewishLeapYear(year: number): boolean {\r\n return ((7 * year) + 1) % 19 < 7;\r\n }\r\n\r\n /**\r\n * Returns if the year the calendar is set to is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19 year\r\n * cycle are leap years.\r\n *\r\n * @return true if it is a leap year\r\n * @see #isJewishLeapYear(int)\r\n */\r\n public isJewishLeapYear(): boolean {\r\n return JewishDate.isJewishLeapYear(this.getJewishYear());\r\n }\r\n\r\n /**\r\n * Returns the last month of a given Jewish year. This will be 12 on a non {@link #isJewishLeapYear(int) leap year}\r\n * or 13 on a leap year.\r\n *\r\n * @param year\r\n * the Jewish year.\r\n * @return 12 on a non leap year or 13 on a leap year\r\n * @see #isJewishLeapYear(int)\r\n */\r\n private static getLastMonthOfJewishYear(year: number): number {\r\n return JewishDate.isJewishLeapYear(year) ? JewishDate.ADAR_II : JewishDate.ADAR;\r\n }\r\n\r\n /**\r\n * Returns the number of days elapsed from the Sunday prior to the start of the Jewish calendar to the mean\r\n * conjunction of Tishri of the Jewish year.\r\n *\r\n * @param year\r\n * the Jewish year\r\n * @return the number of days elapsed from prior to the molad Tohu BaHaRaD (Be = Monday, Ha= 5 hours and Rad =204\r\n * chalakim/parts) prior to the start of the Jewish calendar, to the mean conjunction of Tishri of the\r\n * Jewish year. BeHaRaD is 23:11:20 on Sunday night(5 hours 204/1080 chalakim after sunset on Sunday\r\n * evening).\r\n */\r\n public static getJewishCalendarElapsedDays(year: number): number {\r\n const chalakimSince: number = JewishDate.getChalakimSinceMoladTohu(year, JewishDate.TISHREI);\r\n const moladDay: number = Math.trunc(chalakimSince / JewishDate.CHALAKIM_PER_DAY);\r\n const moladParts: number = Math.trunc(chalakimSince - moladDay * JewishDate.CHALAKIM_PER_DAY);\r\n // delay Rosh Hashana for the 4 dechiyos\r\n return JewishDate.addDechiyos(year, moladDay, moladParts);\r\n }\r\n\r\n // private static int getJewishCalendarElapsedDaysOLD(int year) {\r\n // // Jewish lunar month = 29 days, 12 hours and 793 chalakim\r\n // // Molad Tohu = BeHaRaD - Monday, 5 hours (11 PM) and 204 chalakim\r\n // final int chalakimTashTZag = 793; // chalakim in a lunar month\r\n // final int chalakimTohuRaD = 204; // chalakim from original molad Tohu BeHaRaD\r\n // final int hoursTohuHa = 5; // hours from original molad Tohu BeHaRaD\r\n // final int dayTohu = 1; // Monday (0 based)\r\n //\r\n // int monthsElapsed = (235 * ((year - 1) / 19)) // Months in complete 19 year lunar (Metonic) cycles so far\r\n // + (12 * ((year - 1) % 19)) // Regular months in this cycle\r\n // + ((7 * ((year - 1) % 19) + 1) / 19); // Leap months this cycle\r\n // // start with Molad Tohu BeHaRaD\r\n // // start with RaD of BeHaRaD and add TaShTzaG (793) chalakim plus elapsed chalakim\r\n // int partsElapsed = chalakimTohuRaD + chalakimTashTZag * (monthsElapsed % 1080);\r\n // // start with Ha hours of BeHaRaD, add 12 hour remainder of lunar month add hours elapsed\r\n // int hoursElapsed = hoursTohuHa + 12 * monthsElapsed + 793 * (monthsElapsed / 1080) + partsElapsed / 1080;\r\n // // start with Monday of BeHaRaD = 1 (0 based), add 29 days of the lunar months elapsed\r\n // int conjunctionDay = dayTohu + 29 * monthsElapsed + hoursElapsed / 24;\r\n // int conjunctionParts = 1080 * (hoursElapsed % 24) + partsElapsed % 1080;\r\n // return addDechiyos(year, conjunctionDay, conjunctionParts);\r\n // }\r\n\r\n /**\r\n * Adds the 4 dechiyos for molad Tishrei. These are:\r\n * Date
to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the date would fall prior to the January 1, 1 AD\r\n */\r\n /*\r\n public JewishDate(date: Date) {\r\n this.setDate(date);\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that initializes the date to the {@link java.util.Calendar Calendar} paremeter.\r\n *\r\n * @param calendar\r\n * the Calendar
to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC}\r\n */\r\n\r\n /*\r\n public JewishDate(calendar: GregorianCalendar) {\r\n this.setDate(calendar);\r\n }\r\n */\r\n\r\n /**\r\n * Sets the date based on a {@link java.util.Calendar Calendar} object. Modifies the Jewish date as well.\r\n *\r\n * @param date\r\n * the Calendar
to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC}\r\n */\r\n public setDate(date: Temporal.PlainDate): void {\r\n if (date.year < 1) {\r\n throw new IllegalArgumentException(`Dates with a BC era are not supported. The year ${date.year} is invalid.`);\r\n }\r\n\r\n this.date = date;\r\n }\r\n\r\n /**\r\n * Sets the date based on a {@link java.util.Date Date} object. Modifies the Jewish date as well.\r\n *\r\n * @param date\r\n * the Date
to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the date would fall prior to the year 1 AD\r\n */\r\n\r\n /*\r\n public setDate(date: Date): void {\r\n const cal: GregorianCalendar = new GregorianCalendar();\r\n cal.setTime(date);\r\n this.setDate(cal);\r\n }\r\n */\r\n\r\n /**\r\n * Sets the Gregorian Date, and updates the Jewish date accordingly. Like the Java Calendar A value of 0 is expected\r\n * for January.\r\n *\r\n * @param year\r\n * the Gregorian year\r\n * @param month\r\n * the Gregorian month. Like the Java Calendar, this class expects 0 for January\r\n * @param dayOfMonth\r\n * the Gregorian day of month. If this is > the number of days in the month/year, the last valid date of\r\n * the month will be set\r\n * @throws IllegalArgumentException\r\n * if a year of < 1, a month < 0 or > 11 or a day of month < 1 is passed in\r\n */\r\n public setGregorianDate(year: number, month: number, dayOfMonth: number): void {\r\n JewishDate.validateGregorianDate(year, month, dayOfMonth);\r\n this.setInternalGregorianDate(year, month + 1, dayOfMonth);\r\n }\r\n\r\n /**\r\n * Sets the hidden internal representation of the Gregorian date , and updates the Jewish date accordingly. While\r\n * public getters and setters have 0 based months matching the Java Calendar classes, This class internally\r\n * represents the Gregorian month starting at 1. When this is called it will not adjust the month to match the Java\r\n * Calendar classes.\r\n *\r\n * @param year - the year\r\n * @param month - the month\r\n * @param dayOfMonth - the day of month\r\n */\r\n private setInternalGregorianDate(year: number, month: number, dayOfMonth: number): void {\r\n // make sure date is a valid date for the given month, if not, set to last day of month\r\n if (dayOfMonth > JewishDate.getLastDayOfGregorianMonth(month, year)) {\r\n dayOfMonth = JewishDate.getLastDayOfGregorianMonth(month, year);\r\n }\r\n\r\n this.date = new Temporal.PlainDate(year, month, dayOfMonth);\r\n }\r\n\r\n /**\r\n * Sets the Jewish Date and updates the Gregorian date accordingly.\r\n *\r\n * @param year\r\n * the Jewish year. The year can't be negative\r\n * @param month\r\n * the Jewish month starting with Nisan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for\r\n * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar\r\n * II) to avoid any confusion.\r\n * @param dayOfMonth\r\n * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only\r\n * has 29 days, the day will be set as 29.\r\n * @throws IllegalArgumentException\r\n * if a A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a\r\n * leap year) or the day of month is < 1 or > 30 is passed in\r\n */\r\n\r\n /*\r\n public setJewishDate(year: number, month: number, dayOfMonth: number): void {\r\n this.setJewishDate(year, month, dayOfMonth, 0, 0, 0);\r\n }\r\n */\r\n\r\n /**\r\n * Sets the Jewish Date and updates the Gregorian date accordingly.\r\n *\r\n * @param year\r\n * the Jewish year. The year can't be negative\r\n * @param month\r\n * the Jewish month starting with Nisan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for\r\n * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar\r\n * II) to avoid any confusion.\r\n * @param dayOfMonth\r\n * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only\r\n * has 29 days, the day will be set as 29.\r\n *\r\n * @param hours\r\n * the hour of the day. Used for Molad calculations\r\n * @param minutes\r\n * the minutes. Used for Molad calculations\r\n * @param chalakim\r\n * the chalakim/parts. Used for Molad calculations. The chalakim should not exceed 17. Minutes should be\r\n * used for larger numbers.\r\n *\r\n * @throws IllegalArgumentException\r\n * if a A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a\r\n * leap year), the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 > 59 or chalakim < 0 >\r\n * 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the chalakim into minutes (18\r\n * chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG).\r\n */\r\n public setJewishDate(year: number, month: number, dayOfMonth: number, hours: number, minutes: number, chalakim: number): void;\r\n public setJewishDate(year: number, month: number, dayOfMonth: number): void;\r\n public setJewishDate(year: number, month: number, dayOfMonth: number, hours: number = 0, minutes: number = 0, chalakim: number = 0): void {\r\n JewishDate.validateJewishDate(year, month, dayOfMonth, hours, minutes, chalakim);\r\n\r\n // if 30 is passed for a month that only has 29 days (for example by rolling the month from a month that had 30\r\n // days to a month that only has 29) set the date to 29th\r\n if (dayOfMonth > JewishDate.getDaysInJewishMonth(month, year)) {\r\n dayOfMonth = JewishDate.getDaysInJewishMonth(month, year);\r\n }\r\n\r\n let fixedMonth = month - 6;\r\n if (fixedMonth < 1) {\r\n fixedMonth += Temporal.PlainDate.from({ year, month, day: dayOfMonth, calendar: \"hebrew\" }).monthsInYear;\r\n }\r\n\r\n this.date = Temporal.PlainDate.from({ year, month: fixedMonth, day: dayOfMonth, calendar: \"hebrew\" }).withCalendar(\"iso8601\")\r\n }\r\n\r\n /**\r\n * Returns this object's date as a {@link java.util.Calendar} object.\r\n *\r\n * @return The {@link java.util.Calendar}\r\n */\r\n public getDate(): Temporal.PlainDate {\r\n return this.date;\r\n }\r\n\r\n /**\r\n * Resets this date to the current system date.\r\n */\r\n public resetDate(): void {\r\n this.setDate(Temporal.Now.plainDateISO());\r\n }\r\n\r\n /**\r\n * Returns a string containing the Jewish date in the form, \"day Month, year\" e.g. \"21 Shevat, 5729\". For more\r\n * complex formatting, use the formatter classes.\r\n *\r\n * This functionality is duplicated from {@link HebrewDateFormatter} to avoid circular dependencies.\r\n *\r\n * @return the Jewish date in the form \"day Month, year\" e.g. \"21 Shevat, 5729\"\r\n * @see HebrewDateFormatter#format(JewishDate)\r\n */\r\n public toString(): string {\r\n const transliteratedMonths: string[] = ['Nissan', 'Iyar', 'Sivan', 'Tammuz', 'Av', 'Elul', 'Tishrei', 'Cheshvan',\r\n 'Kislev', 'Teves', 'Shevat', 'Adar', 'Adar II', 'Adar I'];\r\n\r\n let formattedMonth: string;\r\n if (this.isJewishLeapYear() && this.getJewishMonth() === JewishDate.ADAR) {\r\n formattedMonth = transliteratedMonths[13]; // return Adar I, not Adar in a leap year\r\n } else {\r\n formattedMonth = transliteratedMonths[this.getJewishMonth() - 1];\r\n }\r\n\r\n return `${this.getJewishDayOfMonth()} ${formattedMonth}, ${this.getJewishYear()}`;\r\n }\r\n\r\n /**\r\n * Rolls the date, month or year forward by the amount passed in. It modifies both the Gregorian and Jewish dates\r\n * accordingly. If manipulation beyond the fields supported here is required, use the {@link Calendar} class\r\n * {@link Calendar#add(int, int)} or {@link Calendar#roll(int, int)} methods in the following manner.\r\n *\r\n * \r\n * \r\n * Calendar cal = jewishDate.getTime(); // get a java.util.Calendar representation of the JewishDate\r\n * cal.add(Calendar.MONTH, 3); // add 3 Gregorian months\r\n * jewishDate.setDate(cal); // set the updated calendar back to this class\r\n *
\r\n *
\r\n *\r\n * @param field the calendar field to be forwarded. The must be {@link Calendar#DATE}, {@link Calendar#MONTH} or {@link Calendar#YEAR}\r\n * @param amount the positive amount to move forward\r\n * @throws IllegalArgumentException if the field is anything besides {@link Calendar#DATE}, {@link Calendar#MONTH}\r\n * or {@link Calendar#YEAR} or if the amount is less than 1\r\n *\r\n * @see #back()\r\n * @see Calendar#add(int, int)\r\n * @see Calendar#roll(int, int)\r\n */\r\n public forward(field: number, amount: number): void {\r\n if (![Calendar.DATE, Calendar.MONTH, Calendar.YEAR].includes(field)) {\r\n throw new IllegalArgumentException('Unsupported field was passed to Forward. Only Calendar.DATE, Calendar.MONTH or Calendar.YEAR are supported.');\r\n }\r\n if (amount < 1) {\r\n throw new IllegalArgumentException('JewishDate.forward() does not support amounts less than 1. See JewishDate.back()');\r\n }\r\n if (field === Calendar.DATE) {\r\n this.date = this.date.add({ days: amount })\r\n } else if (field === Calendar.MONTH) {\r\n this.date = this.date.add({ months: amount })\r\n } else if (field === Calendar.YEAR) {\r\n this.date = this.date.add({ years: amount })\r\n }\r\n }\r\n\r\n /**\r\n * Rolls the date back by 1 day. It modifies both the Gregorian and Jewish dates accordingly. The API does not\r\n * currently offer the ability to forward more than one day t a time, or to forward by month or year. If such\r\n * manipulation is required use the {@link Calendar} class {@link Calendar#add(int, int)} or\r\n * {@link Calendar#roll(int, int)} methods in the following manner.\r\n *\r\n * \r\n * \r\n * Calendar cal = jewishDate.getTime(); // get a java.util.Calendar representation of the JewishDate\r\n * cal.add(Calendar.MONTH, -3); // subtract 3 Gregorian months\r\n * jewishDate.setDate(cal); // set the updated calendar back to this class\r\n *
\r\n *
\r\n *\r\n * @see #back()\r\n * @see Calendar#add(int, int)\r\n * @see Calendar#roll(int, int)\r\n */\r\n public back(): void {\r\n this.date = this.date.subtract({ days: 1 })\r\n }\r\n\r\n /**\r\n * Indicates whether some other object is \"equal to\" this one.\r\n * @see Object#equals(Object)\r\n */\r\n public equals(object: JewishDate): boolean {\r\n return (object instanceof JewishDate && Temporal.PlainDate.compare(this.date, object.getDate()) == 0);\r\n }\r\n\r\n /**\r\n * Compares two dates as per the compareTo() method in the Comparable interface. Returns a value less than 0 if this\r\n * date is \"less than\" (before) the date, greater than 0 if this date is \"greater than\" (after) the date, or 0 if\r\n * they are equal.\r\n */\r\n public compareTo(jewishDate: JewishDate): number {\r\n return Temporal.PlainDate.compare(this.date, jewishDate.getDate());\r\n }\r\n\r\n /**\r\n * Returns the Gregorian month (between 0-11).\r\n *\r\n * @return the Gregorian month (between 0-11). Like the java.util.Calendar, months are 0 based.\r\n */\r\n public getGregorianMonth(): number {\r\n return this.date.withCalendar(\"iso8601\").month - 1;\r\n }\r\n\r\n /**\r\n * Returns the Gregorian day of the month.\r\n *\r\n * @return the Gregorian day of the mont\r\n */\r\n public getGregorianDayOfMonth(): number {\r\n return this.date.withCalendar(\"iso8601\").day;\r\n }\r\n\r\n /**\r\n * Returns the Gregotian year.\r\n *\r\n * @return the Gregorian year\r\n */\r\n public getGregorianYear(): number {\r\n return this.date.withCalendar(\"iso8601\").year;\r\n }\r\n\r\n /**\r\n * Returns the Jewish month 1-12 (or 13 years in a leap year). The month count starts with 1 for Nisan and goes to\r\n * 13 for Adar II\r\n *\r\n * @return the Jewish month from 1 to 12 (or 13 years in a leap year). The month count starts with 1 for Nisan and\r\n * goes to 13 for Adar II\r\n */\r\n public getJewishMonth(): number {\r\n let hebCal = this.date.withCalendar(\"hebrew\");\r\n\r\n let cutOffNum = 6;\r\n if (hebCal.monthsInYear == 13)\r\n ++cutOffNum;\r\n\r\n if (hebCal.month <= cutOffNum)\r\n return hebCal.month + 6;\r\n else\r\n return hebCal.month - cutOffNum;\r\n }\r\n\r\n /**\r\n * Returns the Jewish day of month.\r\n *\r\n * @return the Jewish day of the month\r\n */\r\n public getJewishDayOfMonth(): number {\r\n return this.date.withCalendar(\"hebrew\").day;\r\n }\r\n\r\n /**\r\n * Returns the Jewish year.\r\n *\r\n * @return the Jewish year\r\n */\r\n public getJewishYear(): number {\r\n return this.date.withCalendar(\"hebrew\").year;\r\n }\r\n\r\n /**\r\n * Returns the day of the week as a number between 1-7.\r\n *\r\n * @return the day of the week as a number between 1-7.\r\n */\r\n public getDayOfWeek(): number {\r\n let dayOfWeek = this.date.dayOfWeek + 1;\r\n if (dayOfWeek == 8)\r\n dayOfWeek = 1\r\n return dayOfWeek;\r\n }\r\n\r\n /**\r\n * Sets the Gregorian month.\r\n *\r\n * @param month\r\n * the Gregorian month\r\n *\r\n * @throws IllegalArgumentException\r\n * if a month < 0 or > 11 is passed in\r\n */\r\n public setGregorianMonth(month: number): void {\r\n JewishDate.validateGregorianMonth(month);\r\n this.date = this.date.withCalendar(\"iso8601\").with({ month: month + 1 })\r\n }\r\n\r\n /**\r\n * sets the Gregorian year.\r\n *\r\n * @param year\r\n * the Gregorian year.\r\n * @throws IllegalArgumentException\r\n * if a year of < 1 is passed in\r\n */\r\n public setGregorianYear(year: number): void {\r\n JewishDate.validateGregorianYear(year);\r\n this.date = this.date.withCalendar(\"iso8601\").with({ year })\r\n }\r\n\r\n /**\r\n * sets the Gregorian Day of month.\r\n *\r\n * @param dayOfMonth\r\n * the Gregorian Day of month.\r\n * @throws IllegalArgumentException\r\n * if the day of month of < 1 is passed in\r\n */\r\n public setGregorianDayOfMonth(dayOfMonth: number): void {\r\n JewishDate.validateGregorianDayOfMonth(dayOfMonth);\r\n this.date = this.date.withCalendar(\"iso8601\").with({ day: dayOfMonth })\r\n }\r\n\r\n /**\r\n * sets the Jewish month.\r\n *\r\n * @param month\r\n * the Jewish month from 1 to 12 (or 13 years in a leap year). The month count starts with 1 for Nisan\r\n * and goes to 13 for Adar II\r\n * @throws IllegalArgumentException\r\n * if a month < 1 or > 12 (or 13 on a leap year) is passed in\r\n */\r\n public setJewishMonth(month: number): void {\r\n const hebrewCalendar = this.date.withCalendar(\"hebrew\")\r\n this.setJewishDate(hebrewCalendar.year, month, hebrewCalendar.day);\r\n }\r\n\r\n /**\r\n * sets the Jewish year.\r\n *\r\n * @param year\r\n * the Jewish year\r\n * @throws IllegalArgumentException\r\n * if a year of < 3761 is passed in. The same will happen if the year is 3761 and the month and day\r\n * previously set are < 18 Teves (preior to Jan 1, 1 AD)\r\n */\r\n public setJewishYear(year: number): void {\r\n const hebrewCalendar = this.date.withCalendar(\"hebrew\")\r\n this.setJewishDate(year, this.getJewishMonth(), hebrewCalendar.day);\r\n\r\n this.date = this.date.withCalendar(\"hebrew\").with({ year }).withCalendar(\"iso8601\");\r\n }\r\n\r\n /**\r\n * sets the Jewish day of month.\r\n *\r\n * @param dayOfMonth\r\n * the Jewish day of month\r\n * @throws IllegalArgumentException\r\n * if the day of month is < 1 or > 30 is passed in\r\n */\r\n public setJewishDayOfMonth(dayOfMonth: number): void {\r\n this.date = this.date.withCalendar(\"hebrew\").with({ day: dayOfMonth }).withCalendar(\"iso8601\");\r\n }\r\n\r\n /**\r\n * A method that creates a deep copy of the object.\r\n *\r\n * @see Object#clone()\r\n */\r\n public clone(): JewishDate {\r\n const clone: JewishDate = new JewishDate(this.date);\r\n clone.setMoladHours(this.moladHours);\r\n clone.setMoladMinutes(this.moladMinutes);\r\n clone.setMoladChalakim(this.moladChalakim);\r\n\r\n return clone;\r\n }\r\n}\r\n", "/**\r\n * An Object representing a daf (page) in the Daf Yomi cycle.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport abstract class Daf {\r\n /**\r\n * {@link #getMasechtaNumber()} and {@link #setMasechtaNumber(int)}.\r\n */\r\n private masechtaNumber: number;\r\n\r\n /**\r\n * See {@link #getDaf()} and {@link #setDaf(int)}.\r\n */\r\n private daf: number;\r\n\r\n /**\r\n * Gets the masechta number of the currently set Daf.\r\n * @return the masechtaNumber\r\n * @see #setMasechtaNumber(int)\r\n */\r\n public getMasechtaNumber(): number {\r\n return this.masechtaNumber;\r\n }\r\n\r\n /**\r\n * Set the masechta number in the order of the Daf Yomi.\r\n *\r\n * @param masechtaNumber\r\n * the masechta number in the order of the Daf Yomi to set.\r\n */\r\n public setMasechtaNumber(masechtaNumber: number): void {\r\n this.masechtaNumber = masechtaNumber;\r\n }\r\n\r\n /**\r\n * Constructor that creates a Daf setting the {@link #setMasechtaNumber(int) masechta number} and\r\n\t * {@link #setDaf(int) daf number}.\r\n\t * \r\n\t * @param masechtaNumber the masechta number in the order of the Daf Yomi to set as the current masechta.\r\n\t * @param daf the daf (page) number to set.\r\n */\r\n constructor(masechtaNumber: number, daf: number) {\r\n this.masechtaNumber = masechtaNumber;\r\n this.daf = daf;\r\n }\r\n\r\n /**\r\n * Returns the daf (page) number of the Daf Yomi.\r\n\t * @return the daf (page) number of the Daf Yomi.\r\n */\r\n public getDaf(): number {\r\n return this.daf;\r\n }\r\n\r\n /**\r\n * Sets the daf (page) number of the Daf Yomi.\r\n\t * @param daf the daf (page) number.\r\n */\r\n public setDaf(daf: number): void {\r\n this.daf = daf;\r\n }\r\n\r\n /**\r\n * Returns the transliterated name of the masechta (tractate) of the Daf Yomi.\r\n\t * \r\n\t * @return the transliterated name of the masechta (tractate) of the Daf Yomi such as Berachos.\r\n * @see #setMasechtaTransliterated(String[])\r\n */\r\n public abstract getMasechtaTransliterated(): string;\r\n\r\n /**\r\n * Returns the masechta (tractate) of the Daf Yomi in Hebrew.\r\n *\r\n * @return the masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n */\r\n public abstract getMasechta(): string;\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar } from '../../polyfills/Utils.ts';\r\nimport { Daf } from './Daf.ts';\r\nimport { IllegalArgumentException } from '../../polyfills/errors.ts';\r\nimport { JewishDate } from '../JewishDate.ts';\r\n\r\n/**\r\n * This class calculates the Daf Yomi Bavli page (daf) for a given date. To calculate Daf Yomi Yerushalmi\r\n * use the {@link YerushalmiYomiCalculator}. The library may cover Mishna Yomi etc. at some point in the future.\r\n *\r\n * @author © Bob Newell (original C code)\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n * @version 0.0.1\r\n */\r\nexport class YomiCalculator {\r\n /**\r\n * The start date of the first Daf Yomi Bavli cycle of September 11, 1923 / Rosh Hashana 5684.\r\n */\r\n private static readonly dafYomiStartDate: Temporal.PlainDate = Temporal.PlainDate.from({\r\n year: 1923,\r\n month: Calendar.SEPTEMBER + 1,\r\n day: 11,\r\n });\r\n\r\n /** The start date of the first Daf Yomi Bavli cycle in the Julian calendar. Used internally for claculations. */\r\n private static readonly dafYomiJulianStartDay: number = YomiCalculator.getJulianDay(YomiCalculator.dafYomiStartDate);\r\n\r\n /**\r\n * The date that the pagination for the Daf Yomi Maseches Shekalim changed to use the commonly used Vilna\r\n * Shas pagination from the no longer commonly available Zhitomir / Slavuta Shas used by Rabbi Meir Shapiro.\r\n */\r\n private static readonly shekalimChangeDate: Temporal.PlainDate = Temporal.PlainDate.from({ year: 1975, month: Calendar.JUNE + 1, day: 24 });\r\n\r\n /** The Julian date that the cycle for Shekalim changed.\r\n * @see #getDafYomiBavli(JewishCalendar) for details.\r\n */\r\n private static readonly shekalimJulianChangeDay: number = YomiCalculator.getJulianDay(YomiCalculator.shekalimChangeDate);\r\n\r\n /**\r\n * Returns the Daf Yomi Bavli {@link DafBavliYomi} for a given date. The first Daf Yomi cycle\r\n * started on Rosh Hashana 5684 (September 11, 1923) and calculations prior to this date will result in an\r\n * IllegalArgumentException thrown. For historical calculations (supported by this method), it is important to note\r\n * that a change in length of the cycle was instituted starting in the eighth Daf Yomi cycle beginning on June 24,\r\n * 1975. The Daf Yomi Bavli cycle has a single masechta of the Talmud Yerushalmi - Shekalim as part of the cycle.\r\n * Unlike the Bavli where the number of daf per masechta was standardized since the original Bomberg Edition published from 1520 - 1523, there is no\r\n * uniform page length in the Yerushalmi. The early cycles had the Yerushalmi Shekalim length of 13 days following the\r\n * Slavuta/Zhytomyr\r\n * Shas used by Rabbi Meir Shapiro. With the start of the eighth Daf Yomi\r\n * cycle beginning on June 24, 1975 the length of the Yerushalmi Shekalim was changed from 13 to 22 daf to follow\r\n * the Vilna Shas that is in common use today.\r\n *\r\n * @param calendar\r\n * the calendar date for calculation\r\n * @return the {@link DafBavliYomi}.\r\n *\r\n * @throws IllegalArgumentException\r\n * if the date is prior to the September 11, 1923 start date of the first Daf Yomi cycle\r\n */\r\n public static getDafYomiBavli(calendar: JewishDate): DafBavliYomi {\r\n /*\r\n * The number of daf per masechta. Since the number of blatt in Shekalim changed on the 8th Daf Yomi cycle\r\n * beginning on June 24, 1975 from 13 to 22, the actual calculation for blattPerMasechta[4] will later be\r\n * adjusted based on the cycle.\r\n */\r\n const blattPerMasechta: number[] = [64, 157, 105, 121, 22, 88, 56, 40, 35, 31, 32, 29, 27, 122, 112, 91, 66, 49, 90, 82,\r\n 119, 119, 176, 113, 24, 49, 76, 14, 120, 110, 142, 61, 34, 34, 28, 22, 4, 9, 5, 73];\r\n\r\n const date: Temporal.PlainDate = calendar.getDate();\r\n\r\n let dafYomi: DafBavliYomi;\r\n const julianDay: number = this.getJulianDay(date);\r\n let cycleNo: number = 0;\r\n let dafNo: number = 0;\r\n if (Temporal.PlainDate.compare(date,YomiCalculator.dafYomiStartDate) == -1) {\r\n // TODO: should we return a null or throw an IllegalArgumentException?\r\n throw new IllegalArgumentException(`${calendar} is prior to organized Daf Yomi Bavli cycles that started on ${YomiCalculator.dafYomiStartDate}`);\r\n }\r\n if (Temporal.PlainDate.compare(date, YomiCalculator.shekalimChangeDate) == 1) {\r\n cycleNo = 8 + ((julianDay - YomiCalculator.shekalimJulianChangeDay) / 2711);\r\n dafNo = ((julianDay - YomiCalculator.shekalimJulianChangeDay) % 2711);\r\n } else {\r\n cycleNo = 1 + ((julianDay - YomiCalculator.dafYomiJulianStartDay) / 2702);\r\n dafNo = ((julianDay - YomiCalculator.dafYomiJulianStartDay) % 2702);\r\n }\r\n\r\n let total: number = 0;\r\n let masechta: number = -1;\r\n let blatt: number = 0;\r\n\r\n /* Fix Shekalim for old cycles. */\r\n if (cycleNo <= 7) {\r\n blattPerMasechta[4] = 13;\r\n } else {\r\n blattPerMasechta[4] = 22; // correct any change that may have been changed from a prior calculation\r\n }\r\n /* Finally find the daf. */\r\n // eslint-disable-next-line no-restricted-syntax\r\n for (const blattInMasechta of blattPerMasechta) {\r\n masechta++;\r\n total = total + blattInMasechta - 1;\r\n if (dafNo < total) {\r\n blatt = 1 + blattInMasechta - (total - dafNo);\r\n /* Fiddle with the weird ones near the end. */\r\n if (masechta === 36) {\r\n blatt += 21;\r\n } else if (masechta === 37) {\r\n blatt += 24;\r\n } else if (masechta === 38) {\r\n blatt += 32;\r\n }\r\n dafYomi = new DafBavliYomi(masechta, blatt);\r\n break;\r\n }\r\n }\r\n\r\n return dafYomi!;\r\n }\r\n\r\n /**\r\n * Return the Julian day from a Java Date.\r\n *\r\n * @param date\r\n * The Java Date\r\n * @return the Julian day number corresponding to the date\r\n */\r\n private static getJulianDay(date: Temporal.PlainDate): number {\r\n let { year, month } = date;\r\n const { day } = date;\r\n\r\n if (month <= 2) {\r\n year -= 1;\r\n month += 12;\r\n }\r\n\r\n const a: number = Math.trunc(year / 100);\r\n const b: number = 2 - a + Math.trunc(a / 4);\r\n return Math.trunc(Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + b - 1524.5);\r\n }\r\n}\r\n\r\n/**\r\n * An Object representing a daf (page) in the Daf Yomi cycle.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport class DafBavliYomi extends Daf {\r\n /**\r\n * See {@link #getMasechtaTransliterated()} and {@link #setMasechtaTransliterated(String[])}.\r\n */\r\n private static masechtosBavliTransliterated: string[] = ['Berachos', 'Shabbos', 'Eruvin', 'Pesachim', 'Shekalim',\r\n 'Yoma', 'Sukkah', 'Beitzah', 'Rosh Hashana', 'Taanis', 'Megillah', 'Moed Katan', 'Chagigah', 'Yevamos',\r\n 'Kesubos', 'Nedarim', 'Nazir', 'Sotah', 'Gitin', 'Kiddushin', 'Bava Kamma', 'Bava Metzia', 'Bava Basra',\r\n 'Sanhedrin', 'Makkos', 'Shevuos', 'Avodah Zarah', 'Horiyos', 'Zevachim', 'Menachos', 'Chullin', 'Bechoros',\r\n 'Arachin', 'Temurah', 'Kerisos', 'Meilah', 'Kinnim', 'Tamid', 'Midos', 'Niddah'];\r\n\r\n /**\r\n * See {@link #getMasechta()}.\r\n */\r\n private static readonly masechtosBavli: string[] = ['\\u05D1\\u05E8\\u05DB\\u05D5\\u05EA', '\\u05E9\\u05D1\\u05EA',\r\n '\\u05E2\\u05D9\\u05E8\\u05D5\\u05D1\\u05D9\\u05DF', '\\u05E4\\u05E1\\u05D7\\u05D9\\u05DD',\r\n '\\u05E9\\u05E7\\u05DC\\u05D9\\u05DD', '\\u05D9\\u05D5\\u05DE\\u05D0', '\\u05E1\\u05D5\\u05DB\\u05D4',\r\n '\\u05D1\\u05D9\\u05E6\\u05D4', '\\u05E8\\u05D0\\u05E9 \\u05D4\\u05E9\\u05E0\\u05D4',\r\n '\\u05EA\\u05E2\\u05E0\\u05D9\\u05EA', '\\u05DE\\u05D2\\u05D9\\u05DC\\u05D4',\r\n '\\u05DE\\u05D5\\u05E2\\u05D3 \\u05E7\\u05D8\\u05DF', '\\u05D7\\u05D2\\u05D9\\u05D2\\u05D4',\r\n '\\u05D9\\u05D1\\u05DE\\u05D5\\u05EA', '\\u05DB\\u05EA\\u05D5\\u05D1\\u05D5\\u05EA', '\\u05E0\\u05D3\\u05E8\\u05D9\\u05DD',\r\n '\\u05E0\\u05D6\\u05D9\\u05E8', '\\u05E1\\u05D5\\u05D8\\u05D4', '\\u05D2\\u05D9\\u05D8\\u05D9\\u05DF',\r\n '\\u05E7\\u05D9\\u05D3\\u05D5\\u05E9\\u05D9\\u05DF', '\\u05D1\\u05D1\\u05D0 \\u05E7\\u05DE\\u05D0',\r\n '\\u05D1\\u05D1\\u05D0 \\u05DE\\u05E6\\u05D9\\u05E2\\u05D0', '\\u05D1\\u05D1\\u05D0 \\u05D1\\u05EA\\u05E8\\u05D0',\r\n '\\u05E1\\u05E0\\u05D4\\u05D3\\u05E8\\u05D9\\u05DF', '\\u05DE\\u05DB\\u05D5\\u05EA',\r\n '\\u05E9\\u05D1\\u05D5\\u05E2\\u05D5\\u05EA', '\\u05E2\\u05D1\\u05D5\\u05D3\\u05D4 \\u05D6\\u05E8\\u05D4',\r\n '\\u05D4\\u05D5\\u05E8\\u05D9\\u05D5\\u05EA', '\\u05D6\\u05D1\\u05D7\\u05D9\\u05DD', '\\u05DE\\u05E0\\u05D7\\u05D5\\u05EA',\r\n '\\u05D7\\u05D5\\u05DC\\u05D9\\u05DF', '\\u05D1\\u05DB\\u05D5\\u05E8\\u05D5\\u05EA', '\\u05E2\\u05E8\\u05DB\\u05D9\\u05DF',\r\n '\\u05EA\\u05DE\\u05D5\\u05E8\\u05D4', '\\u05DB\\u05E8\\u05D9\\u05EA\\u05D5\\u05EA', '\\u05DE\\u05E2\\u05D9\\u05DC\\u05D4',\r\n '\\u05E7\\u05D9\\u05E0\\u05D9\\u05DD', '\\u05EA\\u05DE\\u05D9\\u05D3', '\\u05DE\\u05D9\\u05D3\\u05D5\\u05EA',\r\n '\\u05E0\\u05D3\\u05D4'];\r\n\r\n /**\r\n * Returns the transliterated name of the masechta (tractate) of the Daf Yomi. The list of mashechtos\r\n\t * is: Berachos, Shabbos, Eruvin, Pesachim, Shekalim, Yoma, Sukkah, Beitzah, Rosh Hashana, Taanis, Megillah, Moed Katan,\r\n\t * Chagigah, Yevamos, Kesubos, Nedarim, Nazir, Sotah, Gitin, Kiddushin, Bava Kamma, Bava Metzia, Bava Basra, Sanhedrin,\r\n\t * Makkos, Shevuos, Avodah Zarah, Horiyos, Zevachim, Menachos, Chullin, Bechoros, Arachin, Temurah, Kerisos, Meilah,\r\n\t * Kinnim, Tamid, Midos and Niddah.\r\n\t * \r\n\t * @return the transliterated name of the masechta (tractate) of the Daf Yomi such as Berachos.\r\n * @see #setMasechtaTransliterated(String[])\r\n */\r\n public getMasechtaTransliterated(): string {\r\n return DafBavliYomi.masechtosBavliTransliterated[this.getMasechtaNumber()];\r\n }\r\n\r\n /**\r\n * Setter method to allow overriding of the default list of masechtos transliterated into into Latin chars.\r\n\t * The default values use Ashkenazi American English transliteration.\r\n\t * \r\n\t * @param masechtosBavliTransliterated the list of transliterated Bavli masechtos to set.\r\n * @see #getMasechtaTransliterated()\r\n */\r\n public static setMasechtaTransliterated(masechtosBavliTransliterated: string[]): void {\r\n DafBavliYomi.masechtosBavliTransliterated = masechtosBavliTransliterated;\r\n }\r\n\r\n /**\r\n * Returns the masechta (tractate) of the Daf Yomi in Hebrew. The list is in the following format[\"ברכות\",\r\n * \"שבת\", \"עירובין\",\r\n * \"פסחים\", \"שקלים\", \"יומא\",\r\n * \"סוכה\", \"ביצה\", \"ראש השנה\",\r\n * \"תענית\", \"מגילה\", \"מועד\r\n * קטן\", \"חגיגה\", \"יבמות\",\r\n * \"כתובות\", \"נדרים\",\"נזיר\",\r\n * \"סוטה\", \"גיטין\", \"קידושין\",\r\n * \"בבא קמא\", \"בבא מציעא\",\r\n * \"בבא בתרא\", \"סנהדרין\",\r\n * \"מכות\", \"שבועות\", \"עבודה\r\n * זרה\", \"הוריות\", \"זבחים\",\r\n * \"מנחות\", \"חולין\", \"בכורות\",\r\n * \"ערכין\", \"תמורה\", \"כריתות\",\r\n * \"מעילה\", \"קינים\", \"תמיד\",\r\n * \"מידות\", \"נדה\"]
.\r\n *\r\n * @return the masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n */\r\n public getMasechta(): string {\r\n return DafBavliYomi.masechtosBavli[this.getMasechtaNumber()];\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar } from '../../polyfills/Utils.ts';\r\nimport { Daf } from './Daf.ts';\r\nimport { IllegalArgumentException } from '../../polyfills/errors.ts';\r\nimport { JewishDate } from '../JewishDate.ts';\r\n\r\n/**\r\n * This class calculates the Talmud Yerusalmi Daf Yomi page ({@link DafYomiYerushalmi}) for the a given date.\r\n *\r\n * @author © elihaidv\r\n * @author © Eliyahu Hershfeld 2017 - 2019\r\n */\r\nexport class YerushalmiYomiCalculator {\r\n /**\r\n * The start date of the first Daf Yomi Yerushalmi cycle of February 2, 1980 / 15 Shevat, 5740.\r\n */\r\n private static readonly DAF_YOMI_START_DAY: Temporal.PlainDate = Temporal.PlainDate.from({\r\n year: 1980,\r\n month: Calendar.FEBRUARY + 1,\r\n day: 2,\r\n });\r\n\r\n /** The number of pages in the Talmud Yerushalmi. */\r\n private static readonly WHOLE_SHAS_DAFS: number = 1554;\r\n\r\n /** The number of pages per masechta (tractate). */\r\n private static readonly BLATT_PER_MASECHTA: number[] = [68, 37, 34, 44, 31, 59, 26, 33, 28, 20, 13, 92, 65, 71, 22,\r\n 22, 42, 26, 26, 33, 34, 22, 19, 85, 72, 47, 40, 47, 54, 48, 44, 37, 34, 44, 9, 57, 37, 19, 13];\r\n\r\n /**\r\n * Returns the Daf Yomi\r\n * Yerusalmi page ({@link DafYomiYerushalmi}) for a given date.\r\n * The first Daf Yomi cycle started on 15 Shevat (Tu Bishvat) 5740 (February, 2, 1980) and calculations\r\n * prior to this date will result in an IllegalArgumentException thrown. A null will be returned on Tisha B'Av or\r\n * Yom Kippur.\r\n *\r\n * @param jewishCalendar\r\n * the calendar date for calculation\r\n * @return the {@link DafYomiYerushalmi} or null if the date is on Tisha B'Av or Yom Kippur.\r\n *\r\n * @throws IllegalArgumentException\r\n * if the date is prior to the February 2, 1980, the start date of the first Daf Yomi Yerushalmi cycle\r\n */\r\n public static getDafYomiYerushalmi(jewishCalendar: JewishDate) {\r\n let nextCycle: Temporal.PlainDate = YerushalmiYomiCalculator.DAF_YOMI_START_DAY;\r\n let prevCycle: Temporal.PlainDate = YerushalmiYomiCalculator.DAF_YOMI_START_DAY;\r\n const requested: Temporal.PlainDate = jewishCalendar.getDate();\r\n let masechta: number = 0;\r\n let dafYomi: DafYomiYerushalmi;\r\n\r\n const hebrewDate = jewishCalendar.getDate().withCalendar(\"hebrew\");\r\n if (hebrewDate.month == 1 && hebrewDate.day == 10) {\r\n return null;\r\n }\r\n\r\n if (jewishCalendar.getJewishMonth() == JewishDate.AV) {\r\n if ((hebrewDate.day == 9 && hebrewDate.dayOfWeek !== 6) || (hebrewDate.day == 10 && hebrewDate.dayOfWeek == 7))\r\n return null;\r\n }\r\n\r\n if (Temporal.PlainDate.compare(requested, YerushalmiYomiCalculator.DAF_YOMI_START_DAY) == -1) {\r\n throw new IllegalArgumentException(`${requested} is prior to organized Daf Yomi Yerushalmi cycles that started on ${YerushalmiYomiCalculator.DAF_YOMI_START_DAY}`);\r\n }\r\n\r\n // Start to calculate current cycle. Initialize the start day\r\n // nextCycle = YerushalmiYomiCalculator.DAF_YOMI_START_DAY;\r\n\r\n // Go cycle by cycle, until we get the next cycle\r\n while (Temporal.PlainDate.compare(nextCycle, requested) == -1) {\r\n prevCycle = nextCycle;\r\n\r\n // Adds the number of whole shas dafs, and then the number of days that not have daf.\r\n nextCycle = nextCycle.add({ days: YerushalmiYomiCalculator.WHOLE_SHAS_DAFS });\r\n // This needs to be a separate step\r\n nextCycle = nextCycle.add({ days: YerushalmiYomiCalculator.getNumOfSpecialDays(prevCycle, nextCycle) });\r\n }\r\n\r\n // Get the number of days from cycle start until request.\r\n const dafNo: number = requested.since(prevCycle).total({ unit: 'days' });\r\n\r\n // Get the number of special days to subtract\r\n const specialDays: number = YerushalmiYomiCalculator.getNumOfSpecialDays(prevCycle, requested);\r\n let total: number = dafNo - specialDays;\r\n\r\n // Finally find the daf.\r\n for (let i: number = 0; i < YerushalmiYomiCalculator.BLATT_PER_MASECHTA.length; i++) {\r\n if (total <= YerushalmiYomiCalculator.BLATT_PER_MASECHTA[i]) {\r\n dafYomi = new DafYomiYerushalmi(masechta, total + 1);\r\n break;\r\n }\r\n total -= YerushalmiYomiCalculator.BLATT_PER_MASECHTA[i];\r\n masechta++;\r\n }\r\n\r\n return dafYomi!;\r\n }\r\n\r\n /**\r\n * Return the number of special days (Yom Kippur and Tisha B'Av) on which there is no daf, between the two given dates\r\n *\r\n * @param start - start date to calculate\r\n * @param end - end date to calculate\r\n * @return the number of special days\r\n */\r\n private static getNumOfSpecialDays(start: Temporal.PlainDate, end: Temporal.PlainDate): number {\r\n // Find the start and end Jewish years\r\n const jewishStartYear: number = new JewishDate(start).getJewishYear();\r\n const jewishEndYear: number = new JewishDate(end).getJewishYear();\r\n\r\n // Value to return\r\n let specialDays: number = 0;\r\n\r\n // Instant of special dates\r\n const yomKippur: JewishDate = new JewishDate(jewishStartYear, 7, 10);\r\n const tishaBeav: JewishDate = new JewishDate(jewishStartYear, 5, 9);\r\n\r\n // Go over the years and find special dates\r\n for (let i: number = jewishStartYear; i <= jewishEndYear; i++) {\r\n yomKippur.setJewishYear(i);\r\n tishaBeav.setJewishYear(i);\r\n\r\n if (rangeDates(start, yomKippur.getDate(), end)) specialDays++;\r\n if (rangeDates(start, tishaBeav.getDate(), end)) specialDays++;\r\n }\r\n\r\n return specialDays;\r\n }\r\n}\r\n\r\n/**\r\n * An Object representing a daf (page) in the Daf Yomi cycle.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport class DafYomiYerushalmi extends Daf {\r\n /**\r\n * See {@link #getYerushalmiMasechtaTransliterated()}.\r\n */\r\n private static masechtosYerushalmiTransliterated: string[] = ['Berachos', \"Pe'ah\", 'Demai', 'Kilayim', \"Shevi'is\",\r\n 'Terumos', \"Ma'asros\", \"Ma'aser Sheni\", 'Chalah', 'Orlah', 'Bikurim', 'Shabbos', 'Eruvin', 'Pesachim',\r\n 'Beitzah', 'Rosh Hashanah', 'Yoma', 'Sukah', \"Ta'anis\", 'Shekalim', 'Megilah', 'Chagigah', 'Moed Katan',\r\n 'Yevamos', 'Kesuvos', 'Sotah', 'Nedarim', 'Nazir', 'Gitin', 'Kidushin', 'Bava Kama', 'Bava Metzia',\r\n 'Bava Basra', 'Sanhedrin', 'Makos', 'Shevuos', 'Avodah Zarah', 'Horayos', 'Nidah', 'No Daf Today' ];\r\n\r\n /**\r\n * See {@link #getYerushalmiMasechta()}.\r\n */\r\n private static readonly masechtosYerushalmi: string[] = ['\\u05d1\\u05e8\\u05db\\u05d5\\u05ea', '\\u05e4\\u05d9\\u05d0\\u05d4',\r\n '\\u05d3\\u05de\\u05d0\\u05d9', '\\u05db\\u05dc\\u05d0\\u05d9\\u05d9\\u05dd', '\\u05e9\\u05d1\\u05d9\\u05e2\\u05d9\\u05ea',\r\n '\\u05ea\\u05e8\\u05d5\\u05de\\u05d5\\u05ea', '\\u05de\\u05e2\\u05e9\\u05e8\\u05d5\\u05ea', '\\u05de\\u05e2\\u05e9\\u05e8 \\u05e9\\u05e0\\u05d9',\r\n '\\u05d7\\u05dc\\u05d4', '\\u05e2\\u05d5\\u05e8\\u05dc\\u05d4', '\\u05d1\\u05d9\\u05db\\u05d5\\u05e8\\u05d9\\u05dd',\r\n '\\u05e9\\u05d1\\u05ea', '\\u05e2\\u05d9\\u05e8\\u05d5\\u05d1\\u05d9\\u05df', '\\u05e4\\u05e1\\u05d7\\u05d9\\u05dd',\r\n '\\u05d1\\u05d9\\u05e6\\u05d4', '\\u05e8\\u05d0\\u05e9 \\u05d4\\u05e9\\u05e0\\u05d4', '\\u05d9\\u05d5\\u05de\\u05d0',\r\n '\\u05e1\\u05d5\\u05db\\u05d4', '\\u05ea\\u05e2\\u05e0\\u05d9\\u05ea', '\\u05e9\\u05e7\\u05dc\\u05d9\\u05dd', '\\u05de\\u05d2\\u05d9\\u05dc\\u05d4',\r\n '\\u05d7\\u05d2\\u05d9\\u05d2\\u05d4', '\\u05de\\u05d5\\u05e2\\u05d3 \\u05e7\\u05d8\\u05df', '\\u05d9\\u05d1\\u05de\\u05d5\\u05ea',\r\n '\\u05db\\u05ea\\u05d5\\u05d1\\u05d5\\u05ea', '\\u05e1\\u05d5\\u05d8\\u05d4', '\\u05e0\\u05d3\\u05e8\\u05d9\\u05dd', '\\u05e0\\u05d6\\u05d9\\u05e8',\r\n '\\u05d2\\u05d9\\u05d8\\u05d9\\u05df', '\\u05e7\\u05d9\\u05d3\\u05d5\\u05e9\\u05d9\\u05df', '\\u05d1\\u05d1\\u05d0 \\u05e7\\u05de\\u05d0',\r\n '\\u05d1\\u05d1\\u05d0 \\u05de\\u05e6\\u05d9\\u05e2\\u05d0', '\\u05d1\\u05d1\\u05d0 \\u05d1\\u05ea\\u05e8\\u05d0',\r\n '\\u05e9\\u05d1\\u05d5\\u05e2\\u05d5\\u05ea', '\\u05de\\u05db\\u05d5\\u05ea', '\\u05e1\\u05e0\\u05d4\\u05d3\\u05e8\\u05d9\\u05df',\r\n '\\u05e2\\u05d1\\u05d5\\u05d3\\u05d4 \\u05d6\\u05e8\\u05d4', '\\u05d4\\u05d5\\u05e8\\u05d9\\u05d5\\u05ea', '\\u05e0\\u05d9\\u05d3\\u05d4',\r\n '\\u05d0\\u05d9\\u05df \\u05d3\\u05e3 \\u05d4\\u05d9\\u05d5\\u05dd'];\r\n\r\n /**\r\n * Returns the transliterated name of the masechta (tractate) of the Daf Yomi in Yerushalmi. The list of\r\n\t * mashechtos is:\r\n\t * Berachos, Pe'ah, Demai, Kilayim, Shevi'is, Terumos, Ma'asros, Ma'aser Sheni, Chalah, Orlah, Bikurim, \r\n\t * Shabbos, Eruvin, Pesachim, Beitzah, Rosh Hashanah, Yoma, Sukah, Ta'anis, Shekalim, Megilah, Chagigah, \r\n\t * Moed Katan, Yevamos, Kesuvos, Sotah, Nedarim, Nazir, Gitin, Kidushin, Bava Kama, Bava Metzia,\r\n\t * Bava Basra, Shevuos, Makos, Sanhedrin, Avodah Zarah, Horayos, Nidah and No Daf Today.\r\n\t * \r\n\t * @return the transliterated name of the masechta (tractate) of the Daf Yomi such as Berachos.\r\n */\r\n public getMasechtaTransliterated(): string {\r\n return DafYomiYerushalmi.masechtosYerushalmiTransliterated[super.getMasechtaNumber()];\r\n }\r\n\r\n /**\r\n * Setter method to allow overriding of the default list of Yerushalmi masechtos transliterated into into Latin chars.\r\n\t * The default uses Ashkenazi American English transliteration.\r\n\t * \r\n\t * @param masechtosYerushalmiTransliterated the list of transliterated Yerushalmi masechtos to set.\r\n */\r\n public static setMasechtaTransliterated(masechtosYerushalmiTransliterated: string[]): void {\r\n DafYomiYerushalmi.masechtosYerushalmiTransliterated = masechtosYerushalmiTransliterated;\r\n }\r\n\r\n /**\r\n\t * Getter method to allow retrieving the list of Yerushalmi masechtos transliterated into into Latin chars.\r\n\t * The default uses Ashkenazi American English transliteration.\r\n\t * \r\n\t * @return the array of transliterated masechta (tractate) names of the Daf Yomi Yerushalmi.\r\n\t */\r\n public static getMasechtosTransliterated(): string[] {\r\n return this.masechtosYerushalmiTransliterated;\r\n }\r\n\r\n /**\r\n\t * Getter method to allow retrieving the list of Yerushalmi masechtos.\r\n\t * \r\n\t * @return the array of Hebrew masechta (tractate) names of the Daf Yomi Yerushalmi.\r\n\t */\r\n public static getMasechtos():string[] {\r\n return this.masechtosYerushalmi;\r\n }\r\n\r\n /**\r\n * Returns the Yerushalmi masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n\t * \r\n\t * @return the Yerushalmi masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n */\r\n public getMasechta(): string {\r\n return DafYomiYerushalmi.masechtosYerushalmi[this.getMasechtaNumber()];\r\n }\r\n}\r\n\r\n\r\nfunction rangeDates(start: Temporal.PlainDate, middle:Temporal.PlainDate, end: Temporal.PlainDate, inclusive=true) {\r\n const acceptedValues = [1];\r\n if (inclusive)\r\n acceptedValues.push(0);\r\n\r\n return acceptedValues.includes(Temporal.PlainDate.compare(middle, start)) && acceptedValues.includes(Temporal.PlainDate.compare(end, middle))\r\n};", "[\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D1\u05E8\u05D5\u05DA \u05D3\u05F3-\u05E9\u05DB\u05D9\u05E0\u05EA\u05D5 \u05D1\u05EA\u05D5\u05DB\u05E0\u05D5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05DB\u05D0\u05E9\u05E8 \u05E0\u05D7\u05E4\u05E9\u05D4-\u05DE\u05D2\u05D3\u05DC \u05D4\u05E2\u05D5\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05E0\u05E8\u05D0\u05D4 \u05E4\u05E9\u05D5\u05D8-\u05DC\u05D0\u05D9\u05DF \u05E9\u05E2\u05D5\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05E9\u05D1\u05D4-\u05D1\u05E4\u05E0\u05D9\u05DD \u05D4\u05E1\u05E4\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05E2\u05DC \u05DB\u05DF-\u05E6\u05D3 \u05D4\u05D3\u05D9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05DC\u05D4 \u05DC\u05D4\u05E7\u05D5\u05E8\u05D0-\u05D1\u05DE\u05D4\u05E8\u05D4 \u05D1\u05D9\u05DE\u05D9\u05E0\u05D5 \u05D0\u05DE\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05DC \u05D9\u05E4\u05DC\u05D0-\u05DC\u05E2\u05D5\u05DF \u05DB\u05DC\u05DC\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"1-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"5-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"7-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"10-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"12-13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"14-15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"16-17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"7-8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"9-10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"11-12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"13-14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E8\u05D5\u05E8\u05D9\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.1-1.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.3-1.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.5-1.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.7-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.5-2.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.7-2.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.9-2.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.12-2.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.1-3.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.3-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.5-3.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.7-3.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.1-4.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.3-4.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.5-4.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.7-4.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.9-4.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.12-5.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.2-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.5-5.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.7-5.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.5-6.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.7-6.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.9-6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.11-6.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.1-7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.5-7.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.7-7.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.10-7.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.13-7.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.1-8.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.3-8.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.5-8.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.8-8.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.10-8.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.13-8.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.1-10.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.3-10.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.5-10.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.7-10.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.9-10.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.11-10.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.13-10.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.15-10.16\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.1-1.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.4-1.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.6-1.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.8-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.10-1.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.2-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"4.1-4.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.1-5.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.3-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.6-5.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.5-6.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.8-6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.1-8.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.4-8.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.7-9.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.11-9.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.14-9.15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"1-3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"4-5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"6-7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"8-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"10-11\"\r\n }\r\n]", "[\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D1\u05E8\u05D5\u05DA \u05D3\u05F3-\u05E9\u05DB\u05D9\u05E0\u05EA\u05D5 \u05D1\u05EA\u05D5\u05DB\u05E0\u05D5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05DB\u05D0\u05E9\u05E8 \u05E0\u05D7\u05E4\u05E9\u05D4-\u05DE\u05D2\u05D3\u05DC \u05D4\u05E2\u05D5\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05E0\u05E8\u05D0\u05D4 \u05E4\u05E9\u05D5\u05D8-\u05DC\u05D0\u05D9\u05DF \u05E9\u05E2\u05D5\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05E9\u05D1\u05D4-\u05D1\u05E4\u05E0\u05D9\u05DD \u05D4\u05E1\u05E4\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05E2\u05DC \u05DB\u05DF-\u05E6\u05D3 \u05D4\u05D3\u05D9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05DC\u05D4 \u05DC\u05D4\u05E7\u05D5\u05E8\u05D0-\u05D1\u05DE\u05D4\u05E8\u05D4 \u05D1\u05D9\u05DE\u05D9\u05E0\u05D5 \u05D0\u05DE\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05DC \u05D9\u05E4\u05DC\u05D0-\u05DC\u05E2\u05D5\u05DF \u05DB\u05DC\u05DC\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"1-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"5-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"7-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"10-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"12-13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"14-15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"16-17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"7-8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"9-10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"11-12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"13-14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E8\u05D5\u05E8\u05D9\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.1-1.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.3-1.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.5-1.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.7-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.5-2.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.7-2.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.9-2.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.12-2.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.1-3.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.3-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.5-3.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.7-3.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.1-4.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.3-4.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.5-4.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.7-4.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.9-4.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.12-4.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.1-5.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.2-5.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.3-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.5-5.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.7-5.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.5-6.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.7-6.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.9-6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.11-6.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.1-7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.5-7.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.7-7.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.11-7.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.13-7.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.1-8.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.3-8.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.5-8.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.6-8.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.8-8.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.10-8.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.13-8.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.1-10.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.3-10.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.4-10.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.5-10.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.7-10.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.9-10.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.11-10.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.13-10.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.14-10.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.15-10.16\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.1-1.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.3-1.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.4-1.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.6-1.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.8-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.10-1.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.2-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"4.1-4.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.1-5.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.3-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.6-5.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.5-6.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.7-6.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.8-6.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.1-8.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.4-8.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.7-9.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.11-9.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.14-9.15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"3-3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"4-5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"6-7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"8-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"10-11\"\r\n }\r\n]", "import { JewishDate } from \"../JewishDate.ts\";\r\nimport ccyNl from \"./dataSets/ccy-nonleap.json\"\r\nimport ccyL from \"./dataSets/ccy-leap.json\"\r\nimport { Temporal } from \"temporal-polyfill\";\r\n\r\nexport class ChafetzChayimYomiCalculator {\r\n public static getChafetzChayimYomi(jewishCalendar: JewishDate) {\r\n const hebrewDateToday = jewishCalendar.getDate().withCalendar(\"hebrew\")\r\n\r\n const ccCal = (jewishCalendar.isJewishLeapYear() ? ccyL : ccyNl);\r\n const limudToday = ccCal\r\n .find(limud => limud.days\r\n .find(dateObj => hebrewDateToday.equals(Temporal.Now.plainDateISO().withCalendar(\"hebrew\").with(dateObj)))\r\n )\r\n\r\n return limudToday;\r\n }\r\n}", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { GeoLocation } from '../util/GeoLocation.ts';\r\nimport { JewishDate } from './JewishDate.ts';\r\nimport { Calendar } from '../polyfills/Utils.ts';\r\nimport { DafBavliYomi, YomiCalculator } from './limud/YomiCalculator.ts';\r\nimport { DafYomiYerushalmi, YerushalmiYomiCalculator } from './limud/YerushalmiYomiCalculator.ts';\r\nimport { ChafetzChayimYomiCalculator } from './limud/ChafetzChayimYomiCalculator.ts';\r\n\r\nconst { FRIDAY, SATURDAY } = Calendar;\r\n\r\n/**\r\n * List of parshiyos or special Shabasos. {@link #NONE} indicates a week without a parsha, while the enum for\r\n * the parsha of {@link #VZOS_HABERACHA} exists for consistency, but is not currently used. The special Shabasos of\r\n * Shekalim, Zachor, Para, Hachodesh, as well as Shabbos Shuva, Shira, Hagadol, Chazon and Nachamu are also represented in this collection\r\n * of parshiyos.\r\n * @see #getSpecialShabbos()\r\n * @see #getParshah()\r\n */\r\nexport enum Parsha {\r\n /** NONE - A week without any parsha such as Shabbos Chol Hamoed */\r\n NONE,\r\n BERESHIS, NOACH, LECH_LECHA, VAYERA, CHAYEI_SARA, TOLDOS, VAYETZEI,\r\n VAYISHLACH, VAYESHEV, MIKETZ, VAYIGASH, VAYECHI, SHEMOS, VAERA, BO,\r\n BESHALACH, YISRO, MISHPATIM, TERUMAH, TETZAVEH, KI_SISA, VAYAKHEL,\r\n PEKUDEI, VAYIKRA, TZAV, SHMINI, TAZRIA, METZORA, ACHREI_MOS, KEDOSHIM,\r\n EMOR, BEHAR, BECHUKOSAI, BAMIDBAR, NASSO, BEHAALOSCHA, SHLACH, KORACH,\r\n CHUKAS, BALAK, PINCHAS, MATOS, MASEI, DEVARIM, VAESCHANAN, EIKEV,\r\n REEH, SHOFTIM, KI_SEITZEI, KI_SAVO, NITZAVIM, VAYEILECH, HAAZINU,\r\n VZOS_HABERACHA,\r\n /** The double parsha of Vayakhel & Peudei */\r\n VAYAKHEL_PEKUDEI,\r\n /** The double parsha of Tazria & Metzora */\r\n TAZRIA_METZORA,\r\n /** The double parsha of Achrei Mos & Kedoshim */\r\n ACHREI_MOS_KEDOSHIM,\r\n /** The double parsha of Behar & Bechukosai */\r\n BEHAR_BECHUKOSAI,\r\n /** The double parsha of Chukas & Balak */\r\n CHUKAS_BALAK,\r\n /** The double parsha of Matos & Masei */\r\n MATOS_MASEI,\r\n /** The double parsha of Nitzavim & Vayelech */\r\n NITZAVIM_VAYEILECH,\r\n /** The special parsha of Shekalim */\r\n SHKALIM,\r\n /** The special parsha of Zachor */\r\n ZACHOR,\r\n /** The special parsha of Para */\r\n PARA,\r\n /** The special parsha of Hachodesh */\r\n HACHODESH,\r\n SHUVA,\r\n SHIRA,\r\n HAGADOL,\r\n CHAZON,\r\n NACHAMU,\r\n}\r\n\r\n/**\r\n * The JewishCalendar extends the JewishDate class and adds calendar methods.\r\n *\r\n * This open source Java code was originally ported by Avrom Finkelstien\r\n * from his C++ code. It was refactored to fit the KosherJava Zmanim API with simplification of the code, enhancements\r\n * and some bug fixing. The class allows setting whether the holiday and parsha scheme follows the Israel scheme or outside Israel\r\n * scheme. The default is the outside Israel scheme.\r\n * The parsha code was ported by Y. Paritcher from his libzmanim code.\r\n *\r\n * TODO: Some do not belong in this class, but here is a partial list of what should still be implemented in some form:\r\n * Date
to set the calendar to\r\n */\r\n /*\r\n public JewishCalendar(date: Date) {\r\n super(date);\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that initializes the date to the {@link java.util.Calendar Calendar} parameter.\r\n *\r\n * @param calendar\r\n * the Calendar
to set the calendar to\r\n */\r\n /*\r\n public JewishCalendar(calendar: GregorianCalendar) {\r\n super(calendar);\r\n }\r\n */\r\n\r\n /**\r\n * Creates a Jewish date based on a Jewish year, month and day of month.\r\n *\r\n * @param jewishYear\r\n * the Jewish year\r\n * @param jewishMonth\r\n * the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the\r\n * constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar II) to avoid any\r\n * confusion.\r\n * @param jewishDayOfMonth\r\n * the Jewish day of month. If 30 is passed in for a month with only 29 days (for example {@link #IYAR},\r\n * or {@link #KISLEV} in a year that {@link #isKislevShort()}), the 29th (last valid date of the month)\r\n * will be set\r\n * @throws IllegalArgumentException\r\n * if the day of month is < 1 or > 30, or a year of < 0 is passed in.\r\n */\r\n\r\n /*\r\n public JewishCalendar(jewishYear: number, jewishMonth: number, jewishDayOfMonth: number) {\r\n super(jewishYear, jewishMonth, jewishDayOfMonth);\r\n }\r\n */\r\n\r\n /**\r\n * Creates a Jewish date based on a Jewish date and whether in Israel\r\n *\r\n * @param jewishYear\r\n * the Jewish year\r\n * @param jewishMonth\r\n * the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the\r\n * constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar II) to avoid any\r\n * confusion.\r\n * @param jewishDayOfMonth\r\n * the Jewish day of month. If 30 is passed in for a month with only 29 days (for example {@link #IYAR},\r\n * or {@link #KISLEV} in a year that {@link #isKislevShort()}), the 29th (last valid date of the month)\r\n * will be set\r\n * @param inIsrael\r\n * whether in Israel. This affects Yom Tov calculations\r\n */\r\n constructor(jewishYear: number, jewishMonth: number, jewishDayOfMonth: number, inIsrael?: boolean);\r\n constructor(date: Date);\r\n constructor(date: Temporal.PlainDate);\r\n constructor();\r\n constructor(jewishYearOrDateTimeOrDate?: number | Date | Temporal.PlainDate, jewishMonth?: number, jewishDayOfMonth?: number, inIsrael?: boolean) {\r\n // @ts-ignore\r\n super(jewishYearOrDateTimeOrDate, jewishMonth, jewishDayOfMonth);\r\n if (inIsrael) this.setInIsrael(inIsrael);\r\n }\r\n\r\n /**\r\n * Sets whether to use Israel holiday scheme or not. Default is false.\r\n *\r\n * @param inIsrael\r\n * set to true for calculations for Israel\r\n * \r\n\t * @see #getInIsrael()\r\n */\r\n public setInIsrael(inIsrael: boolean): void {\r\n this.inIsrael = inIsrael;\r\n }\r\n\r\n /**\r\n * Gets whether Israel holiday scheme is used or not. The default (if not set) is false.\r\n *\r\n * @return if the calendar is set to Israel\r\n\t * \r\n\t * @see #setInIsrael(boolean)\r\n */\r\n public getInIsrael(): boolean {\r\n return this.inIsrael;\r\n }\r\n\r\n /**\r\n\t * Returns if the city is set as a city surrounded by a wall from the time of Yehoshua, and Shushan Purim\r\n\t * should be celebrated as opposed to regular Purim.\r\n\t * @return if the city is set as a city surrounded by a wall from the time of Yehoshua, and Shushan Purim\r\n\t * should be celebrated as opposed to regular Purim.\r\n\t * @see #setIsMukafChoma(boolean)\r\n\t */\r\n public getIsMukafChoma():boolean {\r\n return this.isMukafChoma;\r\n }\r\n\r\n /**\r\n\t * Sets if the location is surrounded by a wall from the time of Yehoshua, and Shushan Purim should be\r\n\t * celebrated as opposed to regular Purim. This should be set for Yerushalayim, Shushan and other cities.\r\n\t * @param isMukafChoma is the city surrounded by a wall from the time of Yehoshua.\r\n\t * \r\n\t * @see #getIsMukafChoma()\r\n\t */\r\n public setIsMukafChoma(isMukafChoma:boolean):void {\r\n this.isMukafChoma = isMukafChoma;\r\n }\r\n\r\n /**\r\n * Birkas Hachamah is recited every 28 years based on\r\n * Tekufas Shmuel (Julian years) that a year is 365.25 days. The Rambam in Hilchos Kiddush Hachodesh 9:3\r\n\t * states that tekufas Nissan of year 1 was 7 days + 9 hours before molad Nissan. This is calculated as every\r\n\t * 10,227 days (28 * 365.25). \r\n\t * @return true for a day that Birkas Hachamah is recited.\r\n */\r\n public isBirkasHachamah(): boolean {\r\n // elapsed days since molad ToHu\r\n let elapsedDays: number = JewishCalendar.getJewishCalendarElapsedDays(this.getJewishYear());\r\n // elapsed days to the current calendar date\r\n elapsedDays += Math.trunc(this.getDaysSinceStartOfJewishYear());\r\n\r\n /* Molad Nissan year 1 was 177 days after molad tohu of Tishrei. We multiply 29.5 days * 6 months from Tishrei\r\n\t\t * to Nissan = 177. Subtract 7 days since tekufas Nissan was 7 days and 9 hours before the molad as stated in the Rambam\r\n\t\t * and we are now at 170 days. Because getJewishCalendarElapsedDays and getDaysSinceStartOfJewishYear use the value for\r\n\t\t * Rosh Hashana as 1, we have to add 1 day for a total of 171. To this add a day since the tekufah is on a Tuesday\r\n\t\t * night and we push off the bracha to Wednesday AM resulting in the 172 used in the calculation.\r\n\t\t */\r\n // 28 years of 365.25 days + the offset from molad tohu mentioned above\r\n return elapsedDays % (28 * 365.25) === 172;\r\n }\r\n\r\n /**\r\n * Return the type of year for parsha calculations. The algorithm follows the\r\n\t * Luach Arba'ah Shearim in the Tur Ohr Hachaim.\r\n\t * @return the type of year for parsha calculations.\r\n * @todo Use constants in this class.\r\n */\r\n private getParshaYearType(): number {\r\n const roshHashanah = this.getDate().withCalendar(\"hebrew\").with({ day: 1, month: 1 });\r\n if (roshHashanah.monthsInYear == 13) {\r\n switch (roshHashanah.dayOfWeek) {\r\n case 1: // MONDAY\r\n // BaCh\r\n if (this.isKislevShort()) {\r\n if (this.getInIsrael()) {\r\n return 14;\r\n }\r\n return 6;\r\n }\r\n\r\n // BaSh\r\n if (this.isCheshvanLong()) {\r\n if (this.getInIsrael()) {\r\n return 15;\r\n }\r\n return 7;\r\n }\r\n break;\r\n // GaK\r\n case 2: // Tuesday\r\n if (this.getInIsrael()) {\r\n return 15;\r\n }\r\n return 7;\r\n case 4: // Thursday\r\n // HaCh\r\n if (this.isKislevShort()) {\r\n return 8;\r\n }\r\n\r\n // HaSh\r\n if (this.isCheshvanLong()) {\r\n return 9;\r\n }\r\n\r\n break;\r\n case 6: // Saturday\r\n // ZaCh\r\n if (this.isKislevShort()) {\r\n return 10;\r\n }\r\n\r\n // ZaSh\r\n if (this.isCheshvanLong()) {\r\n if (this.getInIsrael()) {\r\n return 16;\r\n }\r\n return 11;\r\n }\r\n\r\n break;\r\n }\r\n } else {\r\n // not a leap year\r\n switch (roshHashanah.dayOfWeek) {\r\n case 1: // MONDAY\r\n // BaCh\r\n if (this.isKislevShort()) {\r\n return 0;\r\n }\r\n\r\n // BaSh\r\n if (this.isCheshvanLong()) {\r\n if (this.getInIsrael()) {\r\n return 12;\r\n }\r\n return 1;\r\n }\r\n\r\n break;\r\n case 2: // TUESDAY\r\n // GaK\r\n if (this.getInIsrael()) {\r\n return 12;\r\n }\r\n return 1;\r\n case 4: // THURSDAY\r\n // HaSh\r\n if (this.isCheshvanLong()) {\r\n return 3;\r\n }\r\n\r\n // HaK\r\n if (!this.isKislevShort()) {\r\n if (this.getInIsrael()) {\r\n return 13;\r\n }\r\n return 2;\r\n }\r\n\r\n break;\r\n case 6: // SATURDAY\r\n // ZaCh\r\n if (this.isKislevShort()) {\r\n return 4;\r\n }\r\n\r\n // ZaSh\r\n if (this.isCheshvanLong()) {\r\n return 5;\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n return -1;\r\n }\r\n\r\n /**\r\n * Returns this week's {@link Parsha} if it is Shabbos.\r\n * returns Parsha.NONE if a weekday or if there is no parsha that week (for example Yomtov is on Shabbos)\r\n * @return the current parsha\r\n */\r\n public getParshah(): Parsha {\r\n if (this.getDayOfWeek() !== SATURDAY) {\r\n return Parsha.NONE;\r\n }\r\n\r\n const yearType: number = this.getParshaYearType();\r\n const roshHashanaDayOfWeek: number = JewishCalendar.getJewishCalendarElapsedDays(this.getJewishYear()) % 7;\r\n const day: number = roshHashanaDayOfWeek + Math.trunc(this.getDaysSinceStartOfJewishYear());\r\n\r\n // negative year should be impossible, but lets cover all bases\r\n if (yearType >= 0) {\r\n return JewishCalendar.parshalist[yearType][day / 7];\r\n }\r\n\r\n // keep the compiler happy\r\n return Parsha.NONE;\r\n }\r\n\r\n /**\r\n * Returns a parsha enum if the Shabbos is one of the four parshiyos of Parsha.SHKALIM, Parsha.ZACHOR, Parsha.PARA,\r\n * Parsha.HACHODESH or Parsha.NONE for a regular Shabbos (or any weekday).\r\n * @return one of the four parshiyos of Parsha.SHKALIM, Parsha.ZACHOR, Parsha.PARA, Parsha.HACHODESH or Parsha.NONE.\r\n */\r\n public getSpecialShabbos(): Parsha {\r\n if (this.getDayOfWeek() !== SATURDAY)\r\n return Parsha.NONE;\r\n\r\n if (((this.getJewishMonth() === JewishCalendar.SHEVAT && !this.isJewishLeapYear())\r\n || (this.getJewishMonth() === JewishCalendar.ADAR && this.isJewishLeapYear()))\r\n && [25, 27, 29].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.SHKALIM;\r\n }\r\n\r\n if ((this.getJewishMonth() === JewishCalendar.ADAR && !this.isJewishLeapYear())\r\n || this.getJewishMonth() === JewishCalendar.ADAR_II) {\r\n if (this.getJewishDayOfMonth() === 1) {\r\n return Parsha.SHKALIM;\r\n }\r\n\r\n if ([8, 9, 11, 13].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.ZACHOR;\r\n }\r\n\r\n if ([18, 20, 22, 23].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.PARA;\r\n }\r\n\r\n if ([25, 27, 29].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.HACHODESH;\r\n }\r\n }\r\n\r\n if (this.getJewishMonth() === JewishCalendar.NISSAN) {\r\n if (this.getJewishDayOfMonth() == 1)\r\n return Parsha.HACHODESH;\r\n\r\n if (this.getJewishDayOfMonth() >= 8 && this.getJewishDayOfMonth() <= 14)\r\n return Parsha.HAGADOL;\r\n }\r\n\r\n if (this.getJewishMonth() == JewishCalendar.AV) {\r\n if (this.getJewishDayOfMonth() >= 4 && this.getJewishDayOfMonth() <= 9) {\r\n return Parsha.CHAZON;\r\n }\r\n if (this.getJewishDayOfMonth() >= 10 && this.getJewishDayOfMonth() <= 16) {\r\n return Parsha.NACHAMU;\r\n }\r\n }\r\n\r\n if (this.getJewishMonth() == JewishCalendar.TISHREI && this.getJewishDayOfMonth() >= 3 && this.getJewishDayOfMonth() <= 8)\r\n return Parsha.SHUVA;\r\n\r\n if (this.getParshah() == Parsha.BESHALACH)\r\n return Parsha.SHIRA;\r\n\r\n return Parsha.NONE;\r\n }\r\n\r\n /**\r\n * Returns an index of the Jewish holiday or fast day for the current day, or a -1 if there is no holiday for this\r\n * day. There are constants in this class representing each Yom Tov. Formatting of the Yomim tovim is done in the\r\n * ZmanimFormatter#\r\n *\r\n * @todo consider using enums instead of the constant ints.\r\n *\r\n * @return the index of the holiday such as the constant {@link #LAG_BAOMER} or {@link #YOM_KIPPUR} or a -1 if it is not a holiday.\r\n * @see HebrewDateFormatter\r\n */\r\n public getYomTovIndex(): number {\r\n const day: number = this.getJewishDayOfMonth();\r\n const dayOfWeek: number = this.getDayOfWeek();\r\n\r\n // check by month (starting from Nissan)\r\n switch (this.getJewishMonth()) {\r\n case JewishCalendar.NISSAN:\r\n if (day === 14) {\r\n return JewishCalendar.EREV_PESACH;\r\n } else if (day === 15 || day === 21 || (!this.inIsrael && (day === 16 || day === 22))) {\r\n return JewishCalendar.PESACH;\r\n } else if ((day >= 17 && day <= 20) || (day === 16 && this.inIsrael)) {\r\n return JewishCalendar.CHOL_HAMOED_PESACH;\r\n }\r\n\r\n if (this.isUseModernHolidays()\r\n && ((day === 26 && dayOfWeek === 5) || (day === 28 && dayOfWeek === 2)\r\n || (day === 27 && dayOfWeek !== 1 && dayOfWeek !== 6))) {\r\n return JewishCalendar.YOM_HASHOAH;\r\n }\r\n break;\r\n case JewishCalendar.IYAR:\r\n if (this.isUseModernHolidays()\r\n && ((day === 4 && dayOfWeek === 3) || ((day === 3 || day === 2) && dayOfWeek === 4)\r\n || (day === 5 && dayOfWeek === 2))) {\r\n return JewishCalendar.YOM_HAZIKARON;\r\n }\r\n\r\n // if 5 Iyar falls on Wed Yom Haatzmaut is that day. If it fal1s on Friday or Shabbos it is moved back to\r\n // Thursday. If it falls on Monday it is moved to Tuesday\r\n if (this.isUseModernHolidays() && ((day === 5 && dayOfWeek === 4)\r\n || ((day === 4 || day === 3) && dayOfWeek === 5) || (day === 6 && dayOfWeek === 3))) {\r\n return JewishCalendar.YOM_HAATZMAUT;\r\n }\r\n\r\n if (day === 14) {\r\n return JewishCalendar.PESACH_SHENI;\r\n }\r\n\r\n if (day === 18) {\r\n return JewishCalendar.LAG_BAOMER;\r\n }\r\n\r\n if (this.isUseModernHolidays() && day === 28) {\r\n return JewishCalendar.YOM_YERUSHALAYIM;\r\n }\r\n break;\r\n case JewishCalendar.SIVAN:\r\n if (day === 5) {\r\n return JewishCalendar.EREV_SHAVUOS;\r\n } else if (day === 6 || (day === 7 && !this.inIsrael)) {\r\n return JewishCalendar.SHAVUOS;\r\n }\r\n break;\r\n case JewishCalendar.TAMMUZ:\r\n // push off the fast day if it falls on Shabbos\r\n if ((day === 17 && dayOfWeek !== 7) || (day === 18 && dayOfWeek === 1)) {\r\n return JewishCalendar.SEVENTEEN_OF_TAMMUZ;\r\n }\r\n break;\r\n case JewishCalendar.AV:\r\n // if Tisha B'av falls on Shabbos, push off until Sunday\r\n if ((dayOfWeek === 1 && day === 10) || (dayOfWeek !== 7 && day === 9)) {\r\n return JewishCalendar.TISHA_BEAV;\r\n } else if (day === 15) {\r\n return JewishCalendar.TU_BEAV;\r\n }\r\n break;\r\n case JewishCalendar.ELUL:\r\n if (day === 29) {\r\n return JewishCalendar.EREV_ROSH_HASHANA;\r\n }\r\n break;\r\n case JewishCalendar.TISHREI:\r\n if (day === 1 || day === 2) {\r\n return JewishCalendar.ROSH_HASHANA;\r\n } else if ((day === 3 && dayOfWeek !== 7) || (day === 4 && dayOfWeek === 1)) {\r\n // push off Tzom Gedalia if it falls on Shabbos\r\n return JewishCalendar.FAST_OF_GEDALYAH;\r\n } else if (day === 9) {\r\n return JewishCalendar.EREV_YOM_KIPPUR;\r\n } else if (day === 10) {\r\n return JewishCalendar.YOM_KIPPUR;\r\n } else if (day === 14) {\r\n return JewishCalendar.EREV_SUCCOS;\r\n }\r\n\r\n if (day === 15 || (day === 16 && !this.inIsrael)) {\r\n return JewishCalendar.SUCCOS;\r\n }\r\n\r\n if ((day >= 17 && day <= 20) || (day === 16 && this.inIsrael)) {\r\n return JewishCalendar.CHOL_HAMOED_SUCCOS;\r\n }\r\n\r\n if (day === 21) {\r\n return JewishCalendar.HOSHANA_RABBA;\r\n }\r\n\r\n if (day === 22) {\r\n return JewishCalendar.SHEMINI_ATZERES;\r\n }\r\n\r\n if (day === 23 && !this.inIsrael) {\r\n return JewishCalendar.SIMCHAS_TORAH;\r\n }\r\n break;\r\n case JewishCalendar.KISLEV: // no yomtov in CHESHVAN\r\n // if (day == 24) {\r\n // return EREV_CHANUKAH;\r\n // } else\r\n if (day >= 25) {\r\n return JewishCalendar.CHANUKAH;\r\n }\r\n break;\r\n case JewishCalendar.TEVES:\r\n if (day === 1 || day === 2 || (day === 3 && this.isKislevShort())) {\r\n return JewishCalendar.CHANUKAH;\r\n } else if (day === 10) {\r\n return JewishCalendar.TENTH_OF_TEVES;\r\n }\r\n break;\r\n case JewishCalendar.SHEVAT:\r\n if (day === 15) {\r\n return JewishCalendar.TU_BESHVAT;\r\n }\r\n break;\r\n case JewishCalendar.ADAR:\r\n if (!this.isJewishLeapYear()) {\r\n // if 13th Adar falls on Friday or Shabbos, push back to Thursday\r\n if (((day === 11 || day === 12) && dayOfWeek === 5) || (day === 13 && !(dayOfWeek === 6 || dayOfWeek === 7))) {\r\n return JewishCalendar.FAST_OF_ESTHER;\r\n }\r\n\r\n if (day === 14) {\r\n return JewishCalendar.PURIM;\r\n } else if (day === 15) {\r\n return JewishCalendar.SHUSHAN_PURIM;\r\n }\r\n } else {\r\n // else if a leap year\r\n if (day === 14) {\r\n return JewishCalendar.PURIM_KATAN;\r\n }\r\n\r\n if (day === 15) {\r\n return JewishCalendar.SHUSHAN_PURIM_KATAN;\r\n }\r\n }\r\n break;\r\n case JewishCalendar.ADAR_II:\r\n // if 13th Adar falls on Friday or Shabbos, push back to Thursday\r\n if (((day === 11 || day === 12) && dayOfWeek === 5) || (day === 13 && !(dayOfWeek === 6 || dayOfWeek === 7))) {\r\n return JewishCalendar.FAST_OF_ESTHER;\r\n }\r\n\r\n if (day === 14) {\r\n return JewishCalendar.PURIM;\r\n } else if (day === 15) {\r\n return JewishCalendar.SHUSHAN_PURIM;\r\n }\r\n break;\r\n }\r\n // if we get to this stage, then there are no holidays for the given date return -1\r\n return -1;\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Yom Tov. The method returns true even for holidays such as {@link #CHANUKAH} and minor\r\n * ones such as {@link #TU_BEAV} and {@link #PESACH_SHENI}. Erev Yom Tov (with the exception of {@link #HOSHANA_RABBA},\r\n * Erev the second days of Pesach) returns false, as do {@link #isTaanis() fast days} besides {@link #YOM_KIPPUR}. Use\r\n * {@link #isAssurBemelacha()} to find the days that have a prohibition of work.\r\n *\r\n * @return true if the current day is a Yom Tov\r\n *\r\n * @see #getYomTovIndex()\r\n * @see #isErevYomTov()\r\n * @see #isErevYomTovSheni()\r\n * @see #isTaanis()\r\n * @see #isAssurBemelacha()\r\n * @see #isCholHamoed()\r\n */\r\n public isYomTov(): boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n\r\n if ((this.isErevYomTov() && (holidayIndex !== JewishCalendar.HOSHANA_RABBA\r\n && (holidayIndex === JewishCalendar.CHOL_HAMOED_PESACH && this.getJewishDayOfMonth() !== 20)))\r\n || (this.isTaanis() && holidayIndex !== JewishCalendar.YOM_KIPPUR)) {\r\n return false;\r\n }\r\n\r\n return this.getYomTovIndex() !== -1;\r\n }\r\n\r\n /**\r\n * Returns true if the Yom Tov day has a melacha (work) prohibition. This method will return false for a\r\n * non-Yom Tov day, even if it is Shabbos.\r\n *\r\n * @return if the Yom Tov day has a melacha (work) prohibition.\r\n */\r\n public isYomTovAssurBemelacha(): boolean {\r\n const yamimTovimAssurBemelacha = [\r\n JewishCalendar.PESACH,\r\n JewishCalendar.SHAVUOS,\r\n JewishCalendar.SUCCOS,\r\n JewishCalendar.SHEMINI_ATZERES,\r\n JewishCalendar.SIMCHAS_TORAH,\r\n JewishCalendar.ROSH_HASHANA,\r\n JewishCalendar.YOM_KIPPUR,\r\n ];\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return yamimTovimAssurBemelacha.includes(holidayIndex);\r\n }\r\n\r\n /**\r\n * Returns true if it is Shabbos or if it is a Yom Tov day that has a melacha (work) prohibition.\r\n * This method will return false for a.\r\n * @return if the day is a Yom Tov that is assur bemlacha or Shabbos\r\n */\r\n public isAssurBemelacha(): boolean {\r\n return this.getDayOfWeek() === SATURDAY || this.isYomTovAssurBemelacha();\r\n }\r\n\r\n /**\r\n * Returns true if the day has candle lighting. This will return true on erev Shabbos, erev Yom Tov, the\r\n * first day of Rosh Hashana and the first days of Yom Tov out of Israel. It is identical\r\n * to calling {@link #isTomorrowShabbosOrYomTov()}.\r\n *\r\n * @return if the day has candle lighting\r\n */\r\n public hasCandleLighting(): boolean {\r\n return this.isTomorrowShabbosOrYomTov();\r\n }\r\n\r\n /**\r\n * Returns true if tomorrow is Shabbos or Yom Tov. This will return true on erev Shabbos, erev\r\n * Yom Tov, the first day of Rosh Hashana and erev the first days of Yom Tov out of\r\n * Israel. It is identical to calling {@link #hasCandleLighting()}.\r\n * @return will return if the next day is Shabbos or Yom Tov\r\n */\r\n public isTomorrowShabbosOrYomTov(): boolean {\r\n return this.getDayOfWeek() === FRIDAY || this.isErevYomTov() || this.isErevYomTovSheni();\r\n }\r\n\r\n /**\r\n * Returns true if the day is the second day of Yom Tov. This impacts the second day of Rosh Hashana\r\n * everywhere, and the second days of Yom Tov in chutz laaretz (out of Israel).\r\n *\r\n * @return if the day is the second day of Yom Tov.\r\n */\r\n public isErevYomTovSheni(): boolean {\r\n return (this.getJewishMonth() === JewishCalendar.TISHREI && (this.getJewishDayOfMonth() === 1))\r\n || (!this.getInIsrael()\r\n && ((this.getJewishMonth() === JewishCalendar.NISSAN && [15, 21].includes(this.getJewishDayOfMonth()))\r\n || (this.getJewishMonth() === JewishCalendar.TISHREI && [15, 22].includes(this.getJewishDayOfMonth()))\r\n || (this.getJewishMonth() === JewishCalendar.SIVAN && this.getJewishDayOfMonth() === 6)));\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Aseret Yemei Teshuva.\r\n *\r\n * @return if the current day is Aseret Yemei Teshuvah\r\n */\r\n public isAseresYemeiTeshuva(): boolean {\r\n return this.getJewishMonth() === JewishCalendar.TISHREI && this.getJewishDayOfMonth() <= 10;\r\n }\r\n\r\n /**\r\n\t * Returns true if the current day is Pesach (either the Yom Tov of Pesach orChol Hamoed Pesach).\r\n\t * \r\n\t * @return true if the current day is Pesach (either the Yom Tov of Pesach orChol Hamoed Pesach).\r\n\t * @see #isYomTov()\r\n\t * @see #isCholHamoedPesach()\r\n\t * @see #PESACH\r\n\t * @see #CHOL_HAMOED_PESACH\r\n\t */\r\n public isPesach():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.PESACH || holidayIndex == JewishCalendar.CHOL_HAMOED_PESACH;\r\n }\r\n\t\r\n /**\r\n * Returns true if the current day is Chol Hamoed of Pesach.\r\n *\r\n * @return true if the current day is Chol Hamoed of Pesach\r\n * @see #isYomTov()\r\n * @see #isPessach()\r\n * @see #CHOL_HAMOED_PESACH\r\n */\r\n public isCholHamoedPesach(): boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return holidayIndex === JewishCalendar.CHOL_HAMOED_PESACH;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Shavuos.\r\n\t *\r\n\t * @return true if the current day is Shavuos.\r\n\t * @see #isYomTov()\r\n\t * @see #SHAVUOS\r\n\t */\r\n public isShavuos():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.SHAVUOS;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Rosh Hashana.\r\n\t *\r\n\t * @return true if the current day is Rosh Hashana.\r\n\t * @see #isYomTov()\r\n\t * @see #ROSH_HASHANA\r\n\t */\r\n public isRoshHashana():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.ROSH_HASHANA;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Yom Kippur.\r\n\t *\r\n\t * @return true if the current day is Yom Kippur.\r\n\t * @see #isYomTov()\r\n\t * @see #YOM_KIPPUR\r\n\t */\r\n public isYomKippur():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.YOM_KIPPUR;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Succos (either the Yom Tov of Succos orChol Hamoed Succos).\r\n\t * It will return false for {@link #isShminiAtzeres() Shmini Atzeres} and {@link #isSimchasTorah() Simchas Torah}.\r\n\t * \r\n\t * @return true if the current day is Succos (either the Yom Tov of Succos orChol Hamoed Succos.\r\n\t * @see #isYomTov()\r\n\t * @see #isCholHamoedSuccos()\r\n\t * @see #isHoshanaRabba()\r\n\t * @see #SUCCOS\r\n\t * @see #CHOL_HAMOED_SUCCOS\r\n\t * @see #HOSHANA_RABBA\r\n\t */\r\n public isSuccos():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.SUCCOS || holidayIndex == JewishCalendar.CHOL_HAMOED_SUCCOS || holidayIndex == JewishCalendar.HOSHANA_RABBA;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Hoshana Rabba.\r\n\t *\r\n\t * @return true true if the current day is Hoshana Rabba.\r\n\t * @see #isYomTov()\r\n\t * @see #HOSHANA_RABBA\r\n\t */\r\n public isHoshanaRabba():boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.HOSHANA_RABBA;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Shmini Atzeres.\r\n\t *\r\n\t * @return true if the current day is Shmini Atzeres.\r\n\t * @see #isYomTov()\r\n\t * @see #SHEMINI_ATZERES\r\n\t */\r\n public isShminiAtzeres():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.SHEMINI_ATZERES;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Simchas Torah. This will always return false if {@link #getInIsrael() in Israel}\r\n\t *\r\n\t * @return true if the current day is Shmini Atzeres.\r\n\t * @see #isYomTov()\r\n\t * @see #SIMCHAS_TORAH\r\n\t */\r\n public isSimchasTorah():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n //if in Israel, Holiday index of SIMCHAS_TORAH will not be returned by getYomTovIndex()\r\n return holidayIndex == JewishCalendar.SIMCHAS_TORAH;\r\n }\r\n\r\n\r\n /**\r\n * Returns true if the current day is Chol Hamoed of Succos.\r\n *\r\n * @return true if the current day is Chol Hamoed of Succos\r\n * @see #isYomTov()\r\n * @see #CHOL_HAMOED_SUCCOS\r\n */\r\n public isCholHamoedSuccos(): boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return holidayIndex === JewishCalendar.CHOL_HAMOED_SUCCOS;\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Chol Hamoed of Pesach or Succos.\r\n *\r\n * @return true if the current day is Chol Hamoed of Pesach or Succos\r\n * @see #isYomTov()\r\n * @see #CHOL_HAMOED_PESACH\r\n * @see #CHOL_HAMOED_SUCCOS\r\n */\r\n public isCholHamoed(): boolean {\r\n return this.isCholHamoedPesach() || this.isCholHamoedSuccos();\r\n }\r\n\r\n /**\r\n * Returns true if the current day is erev Yom Tov. The method returns true for Erev - Pesach (first and last days),\r\n * Shavuos, Rosh Hashana, Yom Kippur and Succos and Hoshana Rabba.\r\n *\r\n * @return true if the current day is Erev - Pesach, Shavuos, Rosh Hashana, Yom Kippur and Succos\r\n * @see #isYomTov()\r\n * @see #isErevYomTovSheni()\r\n */\r\n public isErevYomTov(): boolean {\r\n const erevYomTov = [\r\n JewishCalendar.EREV_PESACH,\r\n JewishCalendar.EREV_SHAVUOS,\r\n JewishCalendar.EREV_ROSH_HASHANA,\r\n JewishCalendar.EREV_YOM_KIPPUR,\r\n JewishCalendar.EREV_SUCCOS,\r\n JewishCalendar.HOSHANA_RABBA,\r\n ];\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return erevYomTov.includes(holidayIndex)\r\n || (holidayIndex === JewishCalendar.CHOL_HAMOED_PESACH && this.getJewishDayOfMonth() === 20);\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana\r\n *\r\n * @return true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana\r\n * @see #isRoshChodesh()\r\n */\r\n public isErevRoshChodesh(): boolean {\r\n // Erev Rosh Hashana is not Erev Rosh Chodesh.\r\n return (this.getJewishDayOfMonth() === 29 && this.getJewishMonth() !== JewishCalendar.ELUL);\r\n }\r\n\r\n /**\r\n * Return true if the day is a Taanis (fast day). Return true for 17 of Tammuz, Tisha B'Av, Yom Kippur, Fast of\r\n * Gedalyah, 10 of Teves and the Fast of Esther\r\n *\r\n * @return true if today is a fast day\r\n */\r\n public isTaanis(): boolean {\r\n const taaniyos = [\r\n JewishCalendar.SEVENTEEN_OF_TAMMUZ,\r\n JewishCalendar.TISHA_BEAV,\r\n JewishCalendar.YOM_KIPPUR,\r\n JewishCalendar.FAST_OF_GEDALYAH,\r\n JewishCalendar.TENTH_OF_TEVES,\r\n JewishCalendar.FAST_OF_ESTHER,\r\n ];\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return taaniyos.includes(holidayIndex);\r\n }\r\n\r\n /**\r\n * Return true if the day is Taanis Bechoros (on erev Pesach). It will return true for the 14th of Nissan if it is not\r\n * on Shabbos, or if the 12th of Nissan occurs on a Thursday\r\n *\r\n * @return true if today is the fast of Bechoros\r\n */\r\n public isTaanisBechoros(): boolean {\r\n const day: number = this.getJewishDayOfMonth();\r\n const dayOfWeek: number = this.getDayOfWeek();\r\n // on 14 Nisan unless that is Shabbos where the fast is moved back to Thursday\r\n return this.getJewishMonth() === JewishCalendar.NISSAN && ((day === 14 && dayOfWeek !== Calendar.SATURDAY)\r\n || (day === 12 && dayOfWeek === Calendar.THURSDAY));\r\n }\r\n\r\n /**\r\n * Returns the day of Chanukah or -1 if it is not Chanukah.\r\n *\r\n * @return the day of Chanukah or -1 if it is not Chanukah.\r\n * @see #isChanukah()\r\n */\r\n public getDayOfChanukah(): number {\r\n const day: number = this.getJewishDayOfMonth();\r\n\r\n if (this.isChanukah()) {\r\n if (this.getJewishMonth() === JewishCalendar.KISLEV) {\r\n return day - 24;\r\n }\r\n // teves\r\n return this.isKislevShort() ? day + 5 : day + 6;\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Returns true if the current day is one of the 8 days of Chanukah.\r\n * @return if the current day is one of the 8 days of Chanukah.\r\n * @see #getDayOfChanukah()\r\n */\r\n public isChanukah(): boolean {\r\n return this.getYomTovIndex() === JewishCalendar.CHANUKAH;\r\n }\r\n\r\n \t/**\r\n\t * Returns if the day is Purim (Shushan Purim\r\n\t * in a mukaf choma and regular Purim in a non-mukaf choma). \r\n\t * @return if the day is Purim (Shushan Purim in a mukaf choma and regular Purin in a non-mukaf choma)\r\n\t * \r\n\t * @see #getIsMukafChoma()\r\n\t * @see #setIsMukafChoma(boolean)\r\n\t */\r\n public isPurim():boolean {\r\n if (this.isMukafChoma) {\r\n return this.getYomTovIndex() == JewishCalendar.SHUSHAN_PURIM;\r\n }\r\n\r\n return this.getYomTovIndex() == JewishCalendar.PURIM;\r\n }\r\n\r\n /**\r\n * Returns if the day is Rosh Chodesh. Rosh Hashana will return false\r\n *\r\n * @return true if it is Rosh Chodesh. Rosh Hashana will return false\r\n */\r\n public isRoshChodesh(): boolean {\r\n // Rosh Hashana is not rosh chodesh. Elul never has 30 days\r\n return (this.getJewishDayOfMonth() === 1 && this.getJewishMonth() !== JewishCalendar.TISHREI) || this.getJewishDayOfMonth() === 30;\r\n }\r\n\r\n /**\r\n * Returns if the day is Shabbos and sunday is Rosh Chodesh.\r\n *\r\n * @return true if it is Shabbos and sunday is Rosh Chodesh.\r\n */\r\n public isMacharChodesh(): boolean {\r\n return (this.getDayOfWeek() === SATURDAY && (this.getJewishDayOfMonth() === 30 || this.getJewishDayOfMonth() === 29));\r\n }\r\n\r\n /**\r\n * Returns if the day is Shabbos Mevorchim.\r\n *\r\n * @return true if it is Shabbos Mevorchim.\r\n */\r\n public isShabbosMevorchim(): boolean {\r\n return this.getDayOfWeek() === SATURDAY\r\n && this.getJewishDayOfMonth() >= 23\r\n && this.getJewishDayOfMonth() <= 29\r\n && this.getJewishMonth() !== JewishCalendar.ELUL;\r\n }\r\n\r\n /**\r\n * Returns the int value of the Omer day or -1 if the day is not in the omer\r\n *\r\n * @return The Omer count as an int or -1 if it is not a day of the Omer.\r\n */\r\n public getDayOfOmer(): number {\r\n let omer: number = -1; // not a day of the Omer\r\n const month: number = this.getJewishMonth();\r\n const day: number = this.getJewishDayOfMonth();\r\n\r\n // if Nissan and second day of Pesach and on\r\n if (month === JewishCalendar.NISSAN && day >= 16) {\r\n omer = day - 15;\r\n // if Iyar\r\n } else if (month === JewishCalendar.IYAR) {\r\n omer = day + 15;\r\n // if Sivan and before Shavuos\r\n } else if (month === JewishCalendar.SIVAN && day < 6) {\r\n omer = day + 44;\r\n }\r\n return omer;\r\n }\r\n\r\n /**\r\n * Returns the molad in Standard Time in Yerushalayim as a Date. The traditional calculation uses local time. This\r\n * method subtracts 20.94 minutes (20 minutes and 56.496 seconds) from the local time (Har Habayis with a longitude\r\n * of 35.2354° is 5.2354° away from the %15 timezone longitude) to get to standard time. This method\r\n * intentionally uses standard time and not dailight savings time. Java will implicitly format the time to the\r\n * default (or set) Timezone.\r\n *\r\n * @return the Date representing the moment of the molad in Yerushalayim standard time (GMT + 2)\r\n */\r\n public getMoladAsDate(): Temporal.ZonedDateTime {\r\n const molad: JewishDate = this.getMolad();\r\n const locationName: string = 'Jerusalem, Israel';\r\n\r\n const latitude: number = 31.778; // Har Habayis latitude\r\n const longitude: number = 35.2354; // Har Habayis longitude\r\n\r\n // The raw molad Date (point in time) must be generated using standard time. Using \"Asia/Jerusalem\" timezone will result in the time\r\n // being incorrectly off by an hour in the summer due to DST. Proper adjustment for the actual time in DST will be done by the date\r\n // formatter class used to display the Date.\r\n const yerushalayimStandardTZ: string = '+02:00';\r\n const geo: GeoLocation = new GeoLocation(locationName, latitude, longitude, yerushalayimStandardTZ);\r\n\r\n const moladSeconds: number = (molad.getMoladChalakim() * 10) / 3;\r\n // subtract local time difference of 20.94 minutes (20 minutes and 56.496 seconds) to get to Standard time\r\n const milliseconds: number = Math.trunc(1000 * (moladSeconds - Math.trunc(moladSeconds)));\r\n\r\n return Temporal.ZonedDateTime.from({\r\n timeZone: geo.getTimeZone(),\r\n year: molad.getGregorianYear(),\r\n month: molad.getGregorianMonth() + 1,\r\n day: molad.getGregorianDayOfMonth(),\r\n hour: molad.getMoladHours(),\r\n minute: molad.getMoladMinutes(),\r\n second: Math.trunc(moladSeconds),\r\n millisecond: milliseconds,\r\n })\r\n .subtract({ nanoseconds: Math.trunc(geo.getLocalMeanTimeOffset()) });\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana calculated as 3 days after the molad. This method returns the time\r\n * even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider\r\n * displaying the next tzais if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment 3 days after the molad.\r\n *\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana3Days()\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana3Days(Date, Date)\r\n */\r\n public getTchilasZmanKidushLevana3Days(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({ hours: 72 });\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana calculated as 7 days after the molad as mentioned by the Mechaber. See the Bach's opinion on this time. This method returns the time\r\n * even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider\r\n * displaying the next tzais if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment 7 days after the molad.\r\n *\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana7Days()\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana7Days(Date, Date)\r\n */\r\n public getTchilasZmanKidushLevana7Days(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({ hours: 168 });\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kiddush Levana according to the Maharil's opinion that it is calculated as\r\n * halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between molad and\r\n * molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad. This method returns the time\r\n * even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider\r\n * displaying alos before this time if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment halfway between molad and molad.\r\n * @see #getSofZmanKidushLevana15Days()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevanaBetweenMoldos()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevanaBetweenMoldos(Date, Date)\r\n */\r\n public getSofZmanKidushLevanaBetweenMoldos(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({\r\n days: 14,\r\n hours: 18,\r\n minutes: 22,\r\n seconds: 1,\r\n milliseconds: 666,\r\n });\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the opinion brought down\r\n * in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the\r\n * Rema who brings down the opinion of the Maharil's of calculating\r\n * {@link #getSofZmanKidushLevanaBetweenMoldos() half way between molad and mold} is of the opinion that Mechaber\r\n * agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, See Rabbi Dovid\r\n * Heber's very detailed writeup in Siman Daled (chapter 4) of Shaarei Zmanim. This method returns the time even if it is during\r\n * the day when Kiddush Levana can't be said. Callers of this method should consider displaying alos\r\n * before this time if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment 15 days after the molad.\r\n * @see #getSofZmanKidushLevanaBetweenMoldos()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevana15Days()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevana15Days(Date, Date)\r\n */\r\n public getSofZmanKidushLevana15Days(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({ days: 15 });\r\n }\r\n\r\n /**\r\n * Returns the Daf Yomi (Bavli) for the date that the calendar is set to. See the\r\n * {@link HebrewDateFormatter#formatDafYomiBavli(Daf)} for the ability to format the daf in Hebrew or transliterated\r\n * masechta names.\r\n *\r\n * @return the daf as a {@link DafBavliYomi}\r\n */\r\n public getDafYomiBavli(): DafBavliYomi {\r\n return YomiCalculator.getDafYomiBavli(this);\r\n }\r\n\r\n /**\r\n * Returns the Daf Yomi (Yerushalmi) for the date that the calendar is set to. See the\r\n * {@link HebrewDateFormatter#formatDafYomiYerushalmi(Daf)} for the ability to format the daf in Hebrew or transliterated\r\n * masechta names.\r\n *\r\n * @return the daf as a {@link DafYomiYerushalmi}\r\n */\r\n public getDafYomiYerushalmi(): DafYomiYerushalmi | null {\r\n return YerushalmiYomiCalculator.getDafYomiYerushalmi(this);\r\n }\r\n\r\n /**\r\n * Returns the equivalent Chafetz Chayim Yomi page for the date that this is set to\r\n */\r\n public getChafetzChayimYomi() {\r\n return ChafetzChayimYomiCalculator.getChafetzChayimYomi(this);\r\n }\r\n\r\n /**\r\n\t * Returns the elapsed days since Tekufas Tishrei. This uses Tekufas Shmuel (identical to the Julian Year with a solar year length of 365.25 days).\r\n\t * The notation used below is D = days, H = hours and C = chalakim. Molad BaHaRad was 2D,5H,204C or 5H,204C from the start of Rosh Hashana year 1. For molad\r\n\t * Nissan add 177D, 4H and 438C (6 * 29D, 12H and 793C), or 177D,9H,642C after Rosh Hashana year 1.\r\n\t * Tekufas Nissan was 7D, 9H and 642C before molad Nissan according to the Rambam, or 170D, 0H and\r\n\t * 0C after Rosh Hashana year 1. Tekufas Tishrei was 182D and 3H (365.25 / 2) before tekufas\r\n\t * Nissan, or 12D and 15H before Rosh Hashana of year 1. Outside of Israel we start reciting Tal\r\n\t * Umatar in Birkas Hashanim from 60 days after tekufas Tishrei. The 60 days include the day of\r\n\t * the tekufah and the day we start reciting Tal Umatar. 60 days from the tekufah == 47D and 9H\r\n\t * from Rosh Hashana year 1.\r\n\t * \r\n\t * @return the number of elapsed days since tekufas Tishrei.\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartDate()\r\n\t * @see #isVeseinTalUmatarStartingTonight()\r\n\t * @see #isVeseinTalUmatarRecited()\r\n\t */\r\n public getTekufasTishreiElapsedDays():number {\r\n // Days since Rosh Hashana year 1. Add 1/2 day as the first tekufas tishrei was 9 hours into the day. This allows all\r\n // 4 years of the secular leap year cycle to share 47 days. Truncate 47D and 9H to 47D for simplicity.\r\n const days:number = JewishCalendar.getJewishCalendarElapsedDays(this.getJewishYear()) + (this.getDaysSinceStartOfJewishYear() - 1) + 0.5;\r\n // days of completed solar years\r\n const solar:number = (this.getJewishYear() - 1) * 365.25;\r\n return Math.floor(days - solar);\r\n }\r\n\r\n /**\r\n\t * Returns true if the current day is Isru Chag. The method returns true for the day following Pesach\r\n\t * Shavuos and Succos. It utilizes {@see #getInIsrael()} to return the proper date.\r\n\t * \r\n\t * @return true if the current day is Isru Chag. The method returns true for the day following Pesach\r\n\t * Shavuos and Succos. It utilizes {@see #getInIsrael()} to return the proper date.\r\n\t */\r\n public isIsruChag():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.ISRU_CHAG;\r\n }\r\n\r\n /**\r\n * Indicates whether some other object is \"equal to\" this one.\r\n * @see Object#equals(Object)\r\n */\r\n public equals(jewishCalendar: JewishCalendar): boolean {\r\n return Temporal.PlainDate.compare(this.getDate(), jewishCalendar.getDate()) === 0 && this.getInIsrael() === jewishCalendar.getInIsrael();\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { AstronomicalCalendar } from './AstronomicalCalendar.ts';\r\nimport { JewishCalendar } from './hebrewcalendar/JewishCalendar.ts';\r\nimport { NullPointerException } from './polyfills/errors.ts';\r\nimport { Long_MIN_VALUE } from './polyfills/Utils.ts';\r\n\r\n/**\r\n * The ZmanimCalendar is a specialized calendar that can calculate sunrise, sunset and Jewish zmanim\r\n * (religious times) for prayers and other Jewish religious duties. This class contains the main functionality of the\r\n * Zmanim library. For a much more extensive list of zmanim, use the {@link ComplexZmanimCalendar} that\r\n * extends this class. See documentation for the {@link ComplexZmanimCalendar} and {@link AstronomicalCalendar} for\r\n * simple examples on using the API. \r\n * Elevation based zmanim (even sunrise and sunset) should not be used lekula without the guidance\r\n * of a posek. According to Rabbi Dovid Yehudah Bursztyn in his\r\n * Zmanim Kehilchasam, 7th edition chapter 2, section 7 (pages 181-182)\r\n * and section 9 (pages 186-187), no zmanim besides sunrise and sunset should use elevation. However, Rabbi Yechiel\r\n * Avrahom Zilber in the Birur Halacha Vol. 6 Ch. 58 Pages\r\n * 34 and\r\n * 42 is of the opinion that elevation should be\r\n * accounted for in zmanim calculations. Related to this, Rabbi Yaakov Karp in Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons should\r\n * be factored into zmanim calculations. The setting defaults to false (elevation will not be used for\r\n * zmanim calculations besides sunrise and sunset), unless the setting is changed to true in {@link\r\n * #setUseElevation(boolean)}. This will impact sunrise and sunset-based zmanim such as {@link #getSunrise()},\r\n * {@link #getSunset()}, {@link #getSofZmanShmaGRA()}, alos-based zmanim such as {@link #getSofZmanShmaMGA()}\r\n * that are based on a fixed offset of sunrise or sunset and zmanim based on a percentage of the day such as\r\n * {@link ComplexZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. Even when set to\r\n * true it will not impact zmanim that are a degree-based offset of sunrise and sunset, such as {@link\r\n * ComplexZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link ComplexZmanimCalendar#getSofZmanShmaBaalHatanya()} since\r\n * these zmanim are not linked to sunrise or sunset times (the calculations are based on the astronomical definition of\r\n * sunrise and sunset calculated in a vacuum with the solar radius above the horizon), and are therefore not impacted by the use\r\n * of elevation.\r\n * For additional information on the halachic impact of elevation on zmanim see:\r\n * Note: It is important to read the technical notes on top of the {@link AstronomicalCalculator} documentation\r\n * before using this code.\r\n *
I would like to thank Rabbi Yaakov Shakow, the\r\n * author of Luach Ikvei Hayom who spent a considerable amount of time reviewing, correcting and making suggestions on the\r\n * documentation in this library.\r\n *
true
will\r\n\t * keep the standard astronomical chatzos calculation, while setting it to false
will use half of\r\n\t * a solar day calculation for chatzos.\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t * @see #getChatzos()\r\n\t * @see #getSunTransit()\r\n\t * @see #getChatzosAsHalfDay()\r\n\t * @see #useAstronomicalChatzosForOtherZmanim\r\n\t */\r\n\tprivate useAstronomicalChatzos:boolean = true;\r\n\r\n\t/**\r\n\t * Is {@link #getSunTransit() astronomical chatzos} used for {@link #getChatzos()} for enhanced accuracy. For\r\n\t * example as the day is lengthens, the second half of the day is longer than the first and astronomical chatzos\r\n\t * would be a drop earlier than half of the time between sunrise and sunset.\r\n\t * \r\n\t * @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA()\r\n\t * Sof zman Shma GRA} would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos\r\n\t * zmaniyos would be calculated a a 6th of the time between sunrise and chatzos, as opposed to a 12th of the\r\n\t * time between sunrise and sunset. {@link #getMinchaGedola() mincha gedola} will be calculated as half a\r\n\t * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical\r\n\t * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag\r\n\t * hamincha} would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75\r\n\t * shaaos zmaniyos after sunrise. Etc.\r\n\t * \r\n\t * @return if the use of astronomical chatzos is active.\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t * @see #getChatzos()\r\n\t * @see #getSunTransit()\r\n\t * @see #getChatzosAsHalfDay()\r\n\t * @see #isUseAstronomicalChatzosForOtherZmanim()\r\n\t */\r\n\tpublic isUseAstronomicalChatzos(): boolean {\r\n\t\treturn this.useAstronomicalChatzos;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets if astronomical chatzos should be used in calculations of other zmanim for enhanced accuracy.\r\n\t * @param useAstronomicalChatzos set to true to use astronomical in chatzos in zmanim calculations.\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t * @see #getChatzos()\r\n\t * @see #getSunTransit()\r\n\t * @see #getChatzosAsHalfDay()\r\n\t * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)\r\n\t */\r\n\tpublic setUseAstronomicalChatzos(useAstronomicalChatzos: boolean) {\r\n\t\tthis.useAstronomicalChatzos = useAstronomicalChatzos;\r\n\t}\r\n\r\n\t/**\r\n\t * Is astronomical chatzos used for zmanim calculations besides chatzos itself for enhanced\r\n\t * accuracy. The default value of false
will keep the standard start to end of day calculations, while setting\r\n\t * it to true
will use half of a solar day calculation for zmanim.\r\n\t * @see #isUseAstronomicalChatzosForOtherZmanim()\r\n\t * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t * @see #getChatzos()\r\n\t */\r\n\tprivate useAstronomicalChatzosForOtherZmanim:boolean = false;\r\n\r\n\t/**\r\n\t * Is astronomical chatzos used for zmanim calculations besides chatzos itself for enhanced\r\n\t * accuracy. For example as the day is lengthening (as we approach spring season), the second half of the day is longer than\r\n\t * the first and astronomical chatzos would be a drop earlier than half of the time between sunrise and sunset.\r\n\t * Conversely, the second half of the day would be shorter in the fall season as the days start getting shorter.\r\n\t * \r\n\t * @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA()\r\n\t * Sof zman Shma GRA} would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos\r\n\t * zmaniyos would be calculated a a 6th of the time between sunrise and chatzos, as opposed to a 12th of the\r\n\t * time between sunrise and sunset. {@link #getMinchaGedola() mincha gedola} will be calculated as half a\r\n\t * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical\r\n\t * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag\r\n\t * hamincha} would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75\r\n\t * shaaos zmaniyos after sunrise. Etc.\r\n\t * \r\n\t * @return if the use of astronomical chatzos is active.\r\n\t * @see #useAstronomicalChatzosForOtherZmanim\r\n\t * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t */\r\n\tpublic isUseAstronomicalChatzosForOtherZmanim():boolean {\r\n\t\treturn this.useAstronomicalChatzosForOtherZmanim;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets if astronomical chatzos should be used in calculations of other zmanim for enhanced accuracy.\r\n\t * @param useAstronomicalChatzosForOtherZmanim set to true to use astronomical in chatzos in zmanim calculations.\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t */\r\n\tpublic setUseAstronomicalChatzosForOtherZmanim(useAstronomicalChatzosForOtherZmanim: boolean) {\r\n\t\tthis.useAstronomicalChatzosForOtherZmanim = useAstronomicalChatzosForOtherZmanim;\r\n\t}\r\n\r\n /**\r\n\t * The zenith of 16.1° below geometric zenith (90°). This calculation is used for determining alos\r\n\t * (dawn) and tzais (nightfall) in some opinions. It is based on the calculation that the time between dawn\r\n\t * and sunrise (and sunset to nightfall) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes\r\n\t * a mil (Rambam and others). The sun's position at\r\n\t * 72 minutes before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux is\r\n\t * 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n\t * \r\n\t * @see #getAlosHashachar()\r\n\t * @see ComplexZmanimCalendar#getAlos16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getTzais16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getSofZmanTfilaMGA16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getMinchaGedola16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getMinchaKetana16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getPlagHamincha16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getPlagAlos16Point1ToTzaisGeonim7Point083Degrees()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaAlos16Point1ToSunset()\r\n\t */\r\n protected static readonly ZENITH_16_POINT_1: number = ZmanimCalendar.GEOMETRIC_ZENITH + 16.1;\r\n\r\n /**\r\n\t * The zenith of 8.5° below geometric zenith (90°). This calculation is used for calculating alos\r\n\t * (dawn) and tzais (nightfall) in some opinions. This calculation is based on the position of the sun 36\r\n\t * minutes after {@link #getSunset sunset} in Jerusalem around the equinox / equilux, which\r\n\t * is 8.5° below {@link #GEOMETRIC_ZENITH geometric zenith}. The Ohr Meir considers this the time that 3 small stars are visible,\r\n\t * which is later than the required 3 medium stars.\r\n\t * \r\n\t * @see #getTzais()\r\n\t * @see ComplexZmanimCalendar#getTzaisGeonim8Point5Degrees()\r\n\t */\r\n protected static readonly ZENITH_8_POINT_5: number = ZmanimCalendar.GEOMETRIC_ZENITH + 8.5;\r\n\r\n /**\r\n\t * The default Shabbos candle lighting offset is 18 minutes. This can be changed via the\r\n\t * {@link #setCandleLightingOffset(double)} and retrieved by the {@link #getCandleLightingOffset()}.\r\n\t */\r\n private candleLightingOffset: number = 18;\r\n\r\n /**\r\n\t * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the\r\n\t * default), or elevation adjusted {@link AstronomicalCalendar#getSunrise()} if it is true. This allows relevant zmanim\r\n\t * in this and extending classes (such as the {@link ComplexZmanimCalendar}) to automatically adjust to the elevation setting.\r\n\t * \r\n\t * @return {@link #getSeaLevelSunrise()} if {@link #isUseElevation()} is false (the default), or elevation adjusted\r\n\t * {@link AstronomicalCalendar#getSunrise()} if it is true.\r\n\t * @see AstronomicalCalendar#getSunrise()\r\n\t */\r\n protected getElevationAdjustedSunrise(): Temporal.ZonedDateTime | null {\r\n if (this.isUseElevation()) {\r\n return super.getSunrise();\r\n }\r\n return this.getSeaLevelSunrise();\r\n }\r\n\r\n /**\r\n\t * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the default),\r\n\t * or elevation adjusted {@link AstronomicalCalendar#getSunrise()} if it is true. This allows relevant zmanim\r\n\t * in this and extending classes (such as the {@link ComplexZmanimCalendar}) to automatically adjust to the elevation setting.\r\n\t * \r\n\t * @return {@link #getSeaLevelSunset()} if {@link #isUseElevation()} is false (the default), or elevation adjusted\r\n\t * {@link AstronomicalCalendar#getSunset()} if it is true.\r\n\t * @see AstronomicalCalendar#getSunset()\r\n\t */\r\n protected getElevationAdjustedSunset(): Temporal.ZonedDateTime | null {\r\n if (this.isUseElevation()) {\r\n return super.getSunset();\r\n }\r\n return this.getSeaLevelSunset();\r\n }\r\n\r\n /**\r\n\t * A method that returns tzais (nightfall) when the sun is {@link #ZENITH_8_POINT_5 8.5°} below the\r\n\t * {@link #GEOMETRIC_ZENITH geometric horizon} (90°) after {@link #getSunset sunset}, a time that Rabbi Meir\r\n\t * Posen in his the Ohr Meir calculated that 3 small\r\n\t * stars are visible, which is later than the required 3 medium stars. See the {@link #ZENITH_8_POINT_5} constant.\r\n\t * \r\n\t * @see #ZENITH_8_POINT_5\r\n\t * \r\n\t * @return The Date
of nightfall. If the calculation can't be computed such as northern and southern\r\n\t * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n\t * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n\t * top of the {@link AstronomicalCalendar} documentation.\r\n\t * @see #ZENITH_8_POINT_5\r\n\t * ComplexZmanimCalendar#getTzaisGeonim8Point5Degrees() that returns an identical time to this generic tzais\r\n\t */\r\n public getTzais(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ZmanimCalendar.ZENITH_8_POINT_5);\r\n }\r\n\r\n /**\r\n\t * Returns alos (dawn) based on the time when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the\r\n\t * eastern {@link #GEOMETRIC_ZENITH geometric horizon} before {@link #getSunrise sunrise}. This is based on the\r\n\t * calculation that the time between dawn and sunrise (and sunset to nightfall) is 72 minutes, the time that is\r\n\t * takes to walk 4 mil at 18 minutes a mil (Rambam and others). The sun's position at 72 minutes before {@link #getSunrise sunrise} in Jerusalem\r\n\t * on the around the equinox /\r\n\t * equilux is 16.1° below {@link #GEOMETRIC_ZENITH}.\r\n\t * \r\n\t * @see #ZENITH_16_POINT_1\r\n\t * @see ComplexZmanimCalendar#getAlos16Point1Degrees()\r\n\t * \r\n\t * @return The Date
of dawn. If the calculation can't be computed such as northern and southern\r\n\t * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n\t * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n\t * top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getAlosHashachar(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ZmanimCalendar.ZENITH_16_POINT_1);\r\n }\r\n\r\n /**\r\n\t * Method to return alos (dawn) calculated using 72 minutes before {@link #getSunrise() sunrise} or\r\n\t * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This time\r\n\t * is based on the time to walk the distance of 4 Mil at 18 minutes a Mil. The 72 minute time (but\r\n\t * not the concept of fixed minutes) is based on the opinion that the time of the Neshef (twilight between\r\n\t * dawn and sunrise) does not vary by the time of year or location but depends on the time it takes to walk the\r\n\t * distance of 4 Mil.\r\n\t * \r\n\t * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n\t * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n\t * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n\t * documentation.\r\n\t */\r\n public getAlos72() {\r\n return this.getElevationAdjustedSunrise()\r\n\t\t?.subtract({ minutes: 72 });\r\n }\r\n\r\n /**\r\n\t * This method returns chatzos (midday) following most opinions that chatzos is the midpoint\r\n\t * between {@link #getSeaLevelSunrise sea level sunrise} and {@link #getSeaLevelSunset sea level sunset}. A day\r\n\t * starting at alos and ending at tzais using the same time or degree offset will also return\r\n\t * the same time. The returned value is identical to {@link #getSunTransit()}. In reality due to lengthening or\r\n\t * shortening of day, this is not necessarily the exact midpoint of the day, but it is very close.\r\n\t * \r\n\t * @see AstronomicalCalendar#getSunTransit()\r\n\t * @return the Date
of chatzos. If the calculation can't be computed such as in the Arctic Circle\r\n\t * where there is at least one day where the sun does not rise, and one where it does not set, a null will\r\n\t * be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getSunTransit();\r\n }\r\n\r\n /**\r\n\t * A generic method for calculating the latest zman krias shema (time to recite shema in the morning)\r\n\t * that is 3 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and\r\n\t * end of the day passed to this method.\r\n\t * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours),\r\n\t * and the latest zman krias shema is calculated as 3 of those shaos zmaniyos after the beginning of\r\n\t * the day. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise()\r\n\t * sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()}\r\n\t * elevation setting) to this method will return sof zman krias shema according to the opinion of the\r\n\t * GRA.\r\n\t * \r\n\t * @param startOfDay\r\n\t * the start of day for calculating zman krias shema. This can be sunrise or any alos passed\r\n\t * to this method.\r\n\t * @param endOfDay\r\n\t * the end of day for calculating zman krias shema. This can be sunset or any tzais passed to\r\n\t * this method.\r\n\t * @return the Date
of the latest zman shema based on the start and end of day times passed to this\r\n\t * method. If the calculation can't be computed such as in the Arctic Circle where there is at least one day\r\n\t * a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n\t * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getSofZmanShma(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 3);\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *\r\n\t * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunrise() sunrise} or\r\n\t * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according\r\n\t * to the GRA. \r\n\t * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n\t * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}\r\n\t * setting).\r\n\t * \r\n\t * @see #getSofZmanShma(Date, Date)\r\n\t * @see #getShaahZmanisGra()\r\n\t * @see #isUseElevation()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaBaalHatanya()\r\n\t * @return the Date
of the latest zman shema according to the GRA. If the calculation can't be\r\n\t * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n\t * and one where it does not set, a null will be returned. See the detailed explanation on top of the {@link\r\n\t * AstronomicalCalendar} documentation.\r\n\t */\r\n public getSofZmanShmaGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *\r\n\t * {@link #getShaahZmanisMGA() shaos zmaniyos} (solar hours) after {@link #getAlos72()}, according to the\r\n\t * Magen Avraham (MGA). The day is calculated\r\n\t * from 72 minutes before {@link #getSeaLevelSunrise() sea level sunrise} to 72 minutes after {@link\r\n\t * #getSeaLevelSunrise sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset()\r\n\t * sunset} (depending on the {@link #isUseElevation()} setting).\r\n\t * \r\n\t * @return the Date
of the latest zman shema. If the calculation can't be computed such as in\r\n\t * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n\t * does not set, a null will be returned. See detailed explanation on top of the\r\n\t * {@link AstronomicalCalendar} documentation.\r\n\t * @see #getSofZmanShma(Date, Date)\r\n\t * @see ComplexZmanimCalendar#getShaahZmanis72Minutes()\r\n\t * @see ComplexZmanimCalendar#getAlos72()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaMGA72Minutes() that \r\n\t */\r\n public getSofZmanShmaMGA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos72()!, this.getTzais72()!);\r\n }\r\n\r\n /**\r\n\t * This method returns the tzais (nightfall) based on the opinion of Rabbeinu Tam that\r\n\t * tzais hakochavim is calculated as 72 minutes, the time it takes to walk 4 Mil at 18 minutes\r\n\t * a Mil. According to the Machtzis Hashekel in\r\n\t * Orach Chaim 235:3, the Pri Megadim in Orach\r\n\t * Chaim 261:2 (see the Biur Halacha) and others (see Hazmanim Bahalacha 17:3 and 17:5) the 72 minutes are standard\r\n\t * clock minutes any time of the year in any location. Depending on the {@link #isUseElevation()} setting) a 72\r\n\t * minute offset from either {@link #getSunset() sunset} or {@link #getSeaLevelSunset() sea level sunset} is used.\r\n\t * \r\n\t * @see ComplexZmanimCalendar#getTzais16Point1Degrees()\r\n\t * @return the Date
representing 72 minutes after sunset. If the calculation can't be\r\n\t * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n\t * and one where it does not set, a null will be returned See detailed explanation on top of the\r\n\t * {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getTzais72() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 72 })\r\n }\r\n\r\n /**\r\n\t * A method to return candle lighting time, calculated as {@link #getCandleLightingOffset()} minutes before\r\n\t * {@link #getSeaLevelSunset() sea level sunset}. This will return the time for any day of the week, since it can be\r\n\t * used to calculate candle lighting time for Yom Tov (mid-week holidays) as well. Elevation adjustments\r\n\t * are intentionally not performed by this method, but you can calculate it by passing the elevation adjusted sunset\r\n\t * to {@link #getTimeOffset(Date, long)}.\r\n\t * \r\n\t * @return candle lighting time. If the calculation can't be computed such as in the Arctic Circle where there is at\r\n\t * least one day a year where the sun does not rise, and one where it does not set, a null will be returned.\r\n\t * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t * \r\n\t * @see #getSeaLevelSunset()\r\n\t * @see #getCandleLightingOffset()\r\n\t * @see #setCandleLightingOffset(double)\r\n\t */\r\n public getCandleLighting() {\r\n return this.getSeaLevelSunset()?.subtract({ minutes: this.getCandleLightingOffset() });\r\n }\r\n\r\n /**\r\n\t * A generic method for calculating the latest zman tfilah (time to recite the morning prayers)\r\n\t * that is 4 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and\r\n\t * end of the day passed to this method.\r\n\t * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours),\r\n\t * and sof zman tfila is calculated as 4 of those shaos zmaniyos after the beginning of the day.\r\n\t * As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise()\r\n\t * sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()}\r\n\t * elevation setting) to this method will return zman tfilah according to the opinion of the GRA.\r\n\t * \r\n\t * @param startOfDay\r\n\t * the start of day for calculating zman tfilah. This can be sunrise or any alos passed\r\n\t * to this method.\r\n\t * @param endOfDay\r\n\t * the end of day for calculating zman tfilah. This can be sunset or any tzais passed\r\n\t * to this method.\r\n\t * @return the Date
of the latest zman tfilah based on the start and end of day times passed\r\n\t * to this method. If the calculation can't be computed such as in the Arctic Circle where there is at least\r\n\t * one day a year where the sun does not rise, and one where it does not set, a null will be returned. See\r\n\t * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getSofZmanTfila(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 4);\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *\r\n\t * {@link #getShaahZmanisGra() shaos zmaniyos }(solar hours) after {@link #getSunrise() sunrise} or\r\n\t * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according\r\n\t * to the GRA. \r\n\t * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n\t * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}\r\n\t * setting).\r\n\t * \r\n\t * @see #getSofZmanTfila(Date, Date)\r\n\t * @see #getShaahZmanisGra()\r\n\t * @see ComplexZmanimCalendar#getSofZmanTfilaBaalHatanya()\r\n\t * @return the Date
of the latest zman tfilah. If the calculation can't be computed such as in\r\n\t * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n\t * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n\t * documentation.\r\n\t */\r\n public getSofZmanTfilaGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *\r\n\t * {@link #getShaahZmanisMGA() shaos zmaniyos} (solar hours) after {@link #getAlos72()}, according to the\r\n\t * Magen Avraham (MGA). The day is calculated\r\n\t * from 72 minutes before {@link #getSeaLevelSunrise() sea level sunrise} to 72 minutes after {@link\r\n\t * #getSeaLevelSunrise sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset()\r\n\t * sunset} (depending on the {@link #isUseElevation()} setting).\r\n\t * \r\n\t * @return the Date
of the latest zman tfila. If the calculation can't be computed such as in\r\n\t * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n\t * does not set), a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n\t * documentation.\r\n\t * @see #getSofZmanTfila(Date, Date)\r\n\t * @see #getShaahZmanisMGA()\r\n\t * @see #getAlos72()\r\n\t */\r\n public getSofZmanTfilaMGA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos72()!, this.getTzais72()!);\r\n }\r\n\r\n /**\r\n\t * A generic method for calculating the latest mincha gedola (the earliest time to recite the mincha prayers)\r\n\t * that is 6.5 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end\r\n\t * of the day passed to this method.\r\n\t * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n\t * mincha gedola is calculated as 6.5 of those shaos zmaniyos after the beginning of the day. As an\r\n\t * example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n * setting) to this method will return mincha gedola according to the opinion of the\r\n * GRA.\r\n * \r\n * @param startOfDay\r\n * the start of day for calculating Mincha gedola. This can be sunrise or any alos passed\r\n * to this method.\r\n * @param endOfDay\r\n * the end of day for calculating Mincha gedola. This can be sunset or any tzais passed\r\n * to this method.\r\n * @return the Date
of the time of Mincha gedola based on the start and end of day times\r\n * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedola(startOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunrise(), endOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunset()): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 6.5);\r\n }\r\n\r\n /**\r\n\t * A generic method for calculating samuch lemincha ketana, / near mincha ketana time that is half\r\n\t * an hour before {@link #getMinchaKetana(Date, Date)} or 9 * shaos zmaniyos (temporal hours) after the\r\n\t * start of the day, calculated using the start and end of the day passed to this method.\r\n\t * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n\t * samuch lemincha ketana is calculated as 9 of those shaos zmaniyos after the beginning of the day.\r\n\t * For example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea\r\n\t * level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n\t * setting) to this method will return samuch lemincha ketana according to the opinion of the\r\n\t * GRA.\r\n\t * \r\n\t * @param startOfDay\r\n\t * the start of day for calculating samuch lemincha ketana. This can be sunrise or any alos\r\n\t * passed to to this method.\r\n\t * @param endOfDay\r\n\t * the end of day for calculating samuch lemincha ketana. This can be sunset or any tzais\r\n\t * passed to this method.\r\n\t * @return the Date
of the time of Mincha ketana based on the start and end of day times\r\n\t * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n\t * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n\t * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t *\r\n\t * @see ComplexZmanimCalendar#getSamuchLeMinchaKetanaGRA()\r\n\t * @see ComplexZmanimCalendar#getSamuchLeMinchaKetana16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getSamuchLeMinchaKetana72Minutes()\r\n\t */\r\n public getSamuchLeMinchaKetana(startOfDay: Temporal.ZonedDateTime, endOfDay: Temporal.ZonedDateTime): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 9);\r\n }\r\n\r\n /**\r\n * A generic method for calculating mincha ketana, (the preferred time to recite the mincha prayers in\r\n * the opinion of the Rambam and others) that is\r\n * 9.5 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end\r\n * of the day passed to this method.\r\n * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n * mincha ketana is calculated as 9.5 of those shaos zmaniyos after the beginning of the day. As an\r\n * example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n * setting) to this method will return mincha ketana according to the opinion of the\r\n * GRA.\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating Mincha ketana. This can be sunrise or any alos passed to\r\n * this method.\r\n * @param endOfDay\r\n * the end of day for calculating Mincha ketana. This can be sunrise or any alos passed to\r\n * this method.\r\n * @return the Date
of the time of Mincha ketana based on the start and end of day times\r\n * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaKetana(startOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunrise(), endOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunset()): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 9.5);\r\n }\r\n\r\n /**\r\n * A generic method for calculating plag hamincha (the earliest time that Shabbos can be started) that is\r\n * 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\r\n * the day passed to the method.\r\n * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n * plag hamincha is calculated as 10.75 of those shaos zmaniyos after the beginning of the day. As an\r\n * example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n * setting) to this method will return plag mincha according to the opinion of the\r\n * GRA.\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating plag. This can be sunrise or any alos passed to this method.\r\n * @param endOfDay\r\n * the end of day for calculating plag. This can be sunrise or any alos passed to this method.\r\n * @return the Date
of the time of plag hamincha based on the start and end of day times\r\n * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha(startOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunrise(), endOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunset()): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 10.75);\r\n }\r\n\r\n /**\r\n * This method returns plag hamincha, that is 10.75 * {@link #getShaahZmanisGra() shaos zmaniyos}\r\n * (solar hours) after {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on\r\n * the {@link #isUseElevation()} setting), according to the GRA. Plag hamincha is the earliest time that Shabbos can be started.\r\n * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}\r\n *\r\n * @see #getPlagHamincha(Date, Date)\r\n * @see ComplexZmanimCalendar#getPlagHaminchaBaalHatanya()\r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n\r\n /*\r\n public getPlagHamincha(): Date {\r\n return this.getPlagHamincha(this.getSeaLevelSunrise(), this.getSeaLevelSunset());\r\n }\r\n */\r\n\r\n /**\r\n * A method that returns a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}) according to\r\n * the opinion of the GRA. This calculation divides\r\n * the day based on the opinion of the GRA that the day runs from from {@link #getSeaLevelSunrise() sea\r\n * level sunrise} to {@link #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to\r\n * {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} setting). The day is split into 12 equal\r\n * parts with each one being a shaah zmanis. This method is similar to {@link #getTemporalHour}, but can\r\n * account for elevation.\r\n *\r\n * @return the long
millisecond length of a shaah zmanis calculated from sunrise to sunset.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, {@link Long#MIN_VALUE} will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTemporalHour(Date, Date)\r\n * @see #getSeaLevelSunrise()\r\n * @see #getSeaLevelSunset()\r\n * @see ComplexZmanimCalendar#getShaahZmanisBaalHatanya()\r\n */\r\n public getShaahZmanisGra() {\r\n return this.getTemporalHour(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n * A method that returns a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on a 72 minutes alos\r\n * and tzais. This calculation divides the day that runs from dawn to dusk (for sof zman krias shema and tfila).\r\n * Dawn for this calculation is 72 minutes before {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} (depending on the {@link #isUseElevation()} elevation setting) and dusk is 72 minutes after {@link #getSunset\r\n * sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation setting).\r\n * This day is split into 12 equal parts with each part being a shaah zmanis. Alternate methods of calculating a\r\n * shaah zmanis according to the Magen Avraham (MGA) are available in the subclass {@link ComplexZmanimCalendar}.\r\n *\r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanisMGA() {\r\n return this.getTemporalHour(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default\r\n * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.\r\n *\r\n * @see AstronomicalCalendar#AstronomicalCalendar()\r\n */\r\n\r\n /*\r\n public ZmanimCalendar() {\r\n super();\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that takes a {@link GeoLocation} as a parameter.\r\n *\r\n * @param location\r\n * the location\r\n */\r\n\r\n /*\r\n constructor(location?: GeoLocation) {\r\n super(location);\r\n }\r\n */\r\n\r\n /**\r\n * A method to get the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea level sunset} which\r\n * is used in calculating candle lighting time. The default time used is 18 minutes before sea level sunset. Some\r\n * calendars use 15 minutes, while the custom in Jerusalem is to use a 40 minute offset. Please check the local custom\r\n * for candle lighting time.\r\n *\r\n * @return Returns the currently set candle lighting offset in minutes.\r\n * @see #getCandleLighting()\r\n * @see #setCandleLightingOffset(double)\r\n */\r\n public getCandleLightingOffset(): number {\r\n return this.candleLightingOffset;\r\n }\r\n\r\n /**\r\n * A method to set the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea level sunset} that is\r\n * used in calculating candle lighting time. The default time used is 18 minutes before sunset. Some calendars use 15\r\n * minutes, while the custom in Jerusalem is to use a 40 minute offset.\r\n *\r\n * @param candleLightingOffset\r\n * The candle lighting offset to set in minutes.\r\n * @see #getCandleLighting()\r\n * @see #getCandleLightingOffset()\r\n */\r\n public setCandleLightingOffset(candleLightingOffset: number): void {\r\n this.candleLightingOffset = candleLightingOffset;\r\n }\r\n\r\n // eslint-disable-next-line class-methods-use-this\r\n public getClassName() {\r\n return 'com.kosherjava.zmanim.ZmanimCalendar';\r\n }\r\n\r\n /**\r\n * This is a utility method to determine if the current Date (date-time) passed in has a melacha (work) prohibition.\r\n * Since there are many opinions on the time of tzais, the tzais for the current day has to be passed to this\r\n * class. Sunset is the classes current day's {@link #getElevationAdjustedSunset() elevation adjusted sunset} that observes the\r\n * {@link #isUseElevation()} settings. The {@link JewishCalendar#getInIsrael()} will be set by the inIsrael parameter.\r\n *\r\n * @param currentTime the current time\r\n * @param tzais the time of tzais\r\n * @param inIsrael whether to use Israel holiday scheme or not\r\n *\r\n * @return true if melacha is prohibited or false if it is not.\r\n *\r\n * @see JewishCalendar#isAssurBemelacha()\r\n * @see JewishCalendar#hasCandleLighting()\r\n * @see JewishCalendar#setInIsrael(boolean)\r\n */\r\n public isAssurBemlacha(currentTime: Temporal.ZonedDateTime, tzais: Temporal.ZonedDateTime, inIsrael: boolean): boolean {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar();\r\n const date = this.getDate();\r\n jewishCalendar.setGregorianDate(date.year, date.month - 1, date.day);\r\n jewishCalendar.setInIsrael(inIsrael);\r\n\r\n // erev shabbos, YT or YT sheni and after shkiah\r\n const sunset = this.getElevationAdjustedSunset();\r\n if (!sunset) throw new NullPointerException();\r\n if (jewishCalendar.hasCandleLighting() && currentTime >= sunset) {\r\n return true;\r\n }\r\n\r\n // is shabbos or YT and it is before tzais\r\n return jewishCalendar.isAssurBemelacha() && currentTime <= tzais;\r\n }\r\n\r\n /**\r\n * A generic utility method for calculating any shaah zmanis (temporal hour) based zman with the\r\n * day defined as the start and end of day (or night) and the number of shaahos zmaniyos passed to the\r\n * method. This simplifies the code in other methods such as {@link #getPlagHamincha(Date, Date)} and cuts down on\r\n * code replication. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link\r\n * #getSeaLevelSunrise() sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the\r\n * {@link #isUseElevation()} elevation setting) and 10.75 hours to this method will return plag mincha\r\n * according to the opinion of the GRA.\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating the zman. This can be sunrise or any alos passed\r\n * to this method.\r\n * @param endOfDay\r\n * the end of day for calculating the zman. This can be sunrise or any alos passed to\r\n * this method.\r\n * @param hours\r\n * the number of shaahos zmaniyos (temporal hours) to offset from the start of day\r\n * @return the Date
of the time of zman with the shaahos zmaniyos (temporal hours)\r\n * in the day offset from the start of day passed to this method. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the {@link\r\n * AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanisBasedZman(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null, hours: number): Temporal.ZonedDateTime | null {\r\n const shaahZmanis = this.getTemporalHour(startOfDay, endOfDay)!;\r\n\r\n\tlet builtTime = startOfDay!;\r\n\tfor (let index = 0; index < hours; index++) {\r\n\t\tbuiltTime = builtTime.add(shaahZmanis)\r\n\t}\r\n return builtTime\r\n }\r\n\r\n /**\r\n\t * A utility method that returns the percentage of a shaah zmanis after sunset (or before sunrise) for a given degree\r\n\t * offset. For the equilux where there\r\n\t * is a 720-minute day, passing 16.1° for the location of Jerusalem will return about 1.2. This will work for any location\r\n\t * or date, but will typically only be of interest at the equinox/equilux to calculate the percentage of a shaah zmanis\r\n\t * for those who want to use the Minchas Cohen in Ma'amar 2:4\r\n\t * and the Pri Chadash who calculate tzais as a percentage\r\n\t * of the day after sunset. While the Minchas Cohen only applies this to 72 minutes or a 1/10 of the day around the world (based\r\n\t * on the equinox / equilux in Israel), this method allows calculations for any degrees level for any location.\r\n\t * \r\n\t * @param degrees\r\n\t * the number of degrees below the horizon after sunset.\r\n\t * @param sunset\r\n\t * if true
the calculation should be degrees after sunset, or if false
, degrees before sunrise.\r\n\t * @return the double
percentage of a sha'ah zmanis for a given set of degrees below the astronomical horizon\r\n\t * for the current calendar. If the calculation can't be computed a {@link Double#MIN_VALUE} will be returned. See detailed\r\n\t * explanation on top of the page.\r\n\t */\r\n\tpublic getPercentOfShaahZmanisFromDegrees(degrees:number, sunset: boolean):number|null {\r\n\t\tconst seaLevelSunrise: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise();\r\n\t\tconst seaLevelSunset: Temporal.ZonedDateTime | null = this.getSeaLevelSunset();\r\n\t\tlet twilight: Temporal.ZonedDateTime | null = null;\r\n\t\tif (sunset) {\r\n\t\t\ttwilight = this.getSunsetOffsetByDegrees(ZmanimCalendar.GEOMETRIC_ZENITH + degrees);\r\n\t\t} else {\r\n\t\t\ttwilight = this.getSunriseOffsetByDegrees(ZmanimCalendar.GEOMETRIC_ZENITH + degrees);\r\n\t\t}\r\n\t\tif (seaLevelSunrise == null || seaLevelSunset == null || twilight == null) {\r\n\t\t\treturn Long_MIN_VALUE;\r\n\t\t}\r\n\t\tconst shaahZmanis = seaLevelSunrise.until(seaLevelSunset).total('nanoseconds') / 12;\r\n\t\tlet riseSetToTwilight;\r\n\t\tif (sunset) {\r\n\t\t\triseSetToTwilight = seaLevelSunset.until(twilight).total('nanoseconds');\r\n\t\t} else {\r\n\t\t\triseSetToTwilight = twilight.until(seaLevelSunrise).total('nanoseconds');\r\n\t\t}\r\n\t\treturn riseSetToTwilight / shaahZmanis;\r\n\t}\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar, TimeZone } from './polyfills/Utils.ts';\r\nimport { GeoLocation } from './util/GeoLocation.ts';\r\nimport { ZmanimCalendar } from './ZmanimCalendar.ts';\r\nimport { JewishCalendar } from './hebrewcalendar/JewishCalendar.ts';\r\n\r\nconst rZTDsort: typeof Temporal.ZonedDateTime.compare = (a,b) => {\r\n\tconst pSort = Temporal.ZonedDateTime.compare(a, b);\r\n\treturn pSort * -1 as Temporal.ComparisonResult;\r\n}\r\n\r\n/**\r\n * This class extends ZmanimCalendar and provides many more zmanim than available in the ZmanimCalendar. The basis\r\n * for most zmanim in this class are from the sefer Yisroel\r\n * Vehazmanim by Rabbi Yisrael Dovid Harfenes.\r\n * As an example of the number of different zmanim made available by this class, there are methods to return 18\r\n * different calculations for alos (dawn), 18 for plag hamincha and 29 for tzais available in this\r\n * API. The real power of this API is the ease in calculating zmanim that are not part of the library. The methods for\r\n * zmanim calculations not present in this class or it's superclass {@link ZmanimCalendar} are contained in the\r\n * {@link AstronomicalCalendar}, the base class of the calendars in our API since they are generic methods for calculating\r\n * time based on degrees or time before or after {@link #getSunrise sunrise} and {@link #getSunset sunset} and are of interest\r\n * for calculation beyond zmanim calculations. Here are some examples.\r\n *
First create the Calendar for the location you would like to calculate:\r\n * \r\n *
\r\n * String locationName = "Lakewood, NJ";\r\n * double latitude = 40.0828; // Lakewood, NJ\r\n * double longitude = -74.2094; // Lakewood, NJ\r\n * double elevation = 20; // optional elevation correction in Meters\r\n * // the String parameter in getTimeZone() has to be a valid timezone listed in\r\n * // {@link java.util.TimeZone#getAvailableIDs()}\r\n * TimeZone timeZone = TimeZone.getTimeZone("America/New_York");\r\n * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);\r\n * ComplexZmanimCalendar czc = new ComplexZmanimCalendar(location);\r\n * // Optionally set the date or it will default to today's date\r\n * czc.getCalendar().set(Calendar.MONTH, Calendar.FEBRUARY);\r\n * czc.getCalendar().set(Calendar.DAY_OF_MONTH, 8);\r\n *
\r\n * Note: For locations such as Israel where the beginning and end of daylight savings time can fluctuate from\r\n * year to year, if your version of Java does not have an up to date timezone database, create a\r\n * {@link java.util.SimpleTimeZone} with the known start and end of DST.\r\n * To get alos calculated as 14° below the horizon (as calculated in the calendars published in Montreal),\r\n * add {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90) to the 14° offset to get the desired time:\r\n *
\r\n *
\r\n * Date alos14 = czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 14);\r\n *
\r\n * To get mincha gedola calculated based on the Magen Avraham (MGA) using a shaah zmanis based on the day starting\r\n * 16.1° below the horizon (and ending 16.1° after sunset) the following calculation can be used:\r\n * \r\n *
\r\n * Date minchaGedola = czc.getTimeOffset(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees() * 6.5);\r\n *
\r\n * or even simpler using the included convenience methods\r\n *
\r\n * Date minchaGedola = czc.getMinchaGedola(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees());\r\n *
\r\n * A little more complex example would be calculating zmanim that rely on a shaah zmanis that is\r\n * not present in this library. While a drop more complex, it is still rather easy. An example would be to calculate\r\n * the Trumas Hadeshen's alos to\r\n * tzais based plag hamincha as calculated in the Machzikei Hadass calendar in Manchester, England.\r\n * A number of this calendar's zmanim are calculated based on a day starting at alos of 12° before\r\n * sunrise and ending at tzais of 7.083° after sunset. Be aware that since the alos and tzais\r\n * do not use identical degree-based offsets, this leads to chatzos being at a time other than the\r\n * {@link #getSunTransit() solar transit} (solar midday). To calculate this zman, use the following steps. Note\r\n * that plag hamincha is 10.75 hours after the start of the day, and the following steps are all that it takes.\r\n *
\r\n *
\r\n * Date plag = czc.getPlagHamincha(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),\r\n * \t\t\t\tczc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));\r\n *
\r\n * Something a drop more challenging, but still simple, would be calculating a zman using the same \"complex\"\r\n * offset day used in the above mentioned Manchester calendar, but for a shaos zmaniyos based zman not\r\n * supported by this library, such as calculating the point that one should be makpid\r\n * not to eat on erev Shabbos or erev Yom Tov. This is 9 shaos zmaniyos into the day.\r\n *
\r\n * long shaahZmanis = czc.getTemporalHour(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),\r\n * \t\t\t\t\t\tczc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));\r\n * Date sofZmanAchila = getTimeOffset(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),\r\n * \t\t\t\t\tshaahZmanis * 9);\r\n *
\r\n * Calculating this sof zman achila according to the GRA\r\n * is simplicity itself.\r\n *
\r\n * Date sofZamnAchila = czc.getTimeOffset(czc.getSunrise(), czc.getShaahZmanisGra() * 9);\r\n * \r\n *
long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis19Point8Degrees() {\r\n return this.getTemporalHour(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a 18° dip. This calculation divides\r\n * the day based on the opinion of the Magen Avraham\r\n * (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is 18° below the\r\n * eastern geometric horizon before sunrise. Dusk for this is when the sun is 18° below the western geometric\r\n * horizon after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis18Degrees() {\r\n return this.getTemporalHour(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 26°. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is\r\n * {@link #getAlos26Degrees() 26°} below the eastern geometric horizon before sunrise. Dusk for this is when\r\n * the sun is {@link #getTzais26Degrees() 26°} below the western geometric horizon after sunset. This day is\r\n * split into 12 equal parts with each part being a shaah zmanis. Since zmanim that use this\r\n * method are extremely late or early and at a point when the sky is a long time past the 18° point where the\r\n * darkest point is reached, zmanim that use this should only be used lechumra, such as\r\n * delaying the start of nighttime mitzvos.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis120Minutes()\r\n */\r\n public getShaahZmanis26Degrees() {\r\n return this.getTemporalHour(this.getAlos26Degrees(), this.getTzais26Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 16.1°. This calculation\r\n * divides the day based on the opinion that the day runs from dawn to dusk. Dawn for this calculation is when the\r\n * sun is 16.1° below the eastern geometric horizon before sunrise and dusk is when the sun is 16.1° below\r\n * the western geometric horizon after sunset. This day is split into 12 equal parts with each part being a\r\n * shaah zmanis.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzais16Point1Degrees()\r\n * @see #getSofZmanShmaMGA16Point1Degrees()\r\n * @see #getSofZmanTfilaMGA16Point1Degrees()\r\n * @see #getMinchaGedola16Point1Degrees()\r\n * @see #getMinchaKetana16Point1Degrees()\r\n * @see #getPlagHamincha16Point1Degrees()\r\n */\r\n\r\n public getShaahZmanis16Point1Degrees() {\r\n return this.getTemporalHour(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (solar hour) according to the opinion of the Magen Avraham (MGA). This calculation\r\n * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is\r\n * 60 minutes before sunrise and dusk is 60 minutes after sunset. This day is split into 12 equal parts with each\r\n * part being a shaah zmanis. Alternate methods of calculating a shaah zmanis are available in the\r\n * subclass {@link ComplexZmanimCalendar}.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos60()\r\n * @see #getTzais60()\r\n * @see #getPlagHamincha60Minutes()\r\n */\r\n public getShaahZmanis60Minutes() {\r\n return this.getTemporalHour(this.getAlos60(), this.getTzais60());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (solar hour) according to the opinion of the Magen Avraham (MGA). This calculation divides the day\r\n * based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 72 minutes\r\n * before sunrise and dusk is 72 minutes after sunset. This day is split into 12 equal parts with each part\r\n * being a shaah zmanis. Alternate methods of calculating a shaah zmanis are available in the\r\n * subclass {@link ComplexZmanimCalendar}.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis72Minutes() {\r\n return this.getShaahZmanisMGA();\r\n }\r\n\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being\r\n * {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation\r\n * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation\r\n * is 72 minutes zmaniyos before sunrise and dusk is 72 minutes zmaniyos after sunset. This day\r\n * is split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/10th of the day\r\n * from {@link #getSunrise() sunrise} to {@link #getSunset() sunset}.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzais72Zmanis()\r\n */\r\n public getShaahZmanis72MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 90 minutes. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes before sunrise\r\n * and dusk is 90 minutes after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis90Minutes() {\r\n return this.getTemporalHour(this.getAlos90(), this.getTzais90());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being\r\n * {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides\r\n * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes\r\n * zmaniyos before sunrise and dusk is 90 minutes zmaniyos after sunset. This day is split into 12 equal\r\n * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link #getSunrise() sunrise} to\r\n * {@link #getSunset() sunset}.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos90Zmanis()\r\n * @see #getTzais90Zmanis()\r\n */\r\n public getShaahZmanis90MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link\r\n * #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides the\r\n * day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes\r\n * zmaniyos before sunrise and dusk is 96 minutes zmaniyos after sunset. This day is split into 12\r\n * equal parts with each part being a shaah zmanis. This is identical to 1/7.5th of the day from\r\n * {@link #getSunrise() sunrise} to {@link #getSunset() sunset}.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos96Zmanis()\r\n * @see #getTzais96Zmanis()\r\n */\r\n public getShaahZmanis96MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the\r\n * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculated with alos being 1/10th\r\n * of sunrise to sunset day, or {@link #getAlos72Zmanis() 72} minutes zmaniyos of such a day before\r\n * {@link #getSunrise() sunrise}, and tzais is usually calculated as {@link #getTzaisAteretTorah() 40\r\n * minutes} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}) after {@link #getSunset()\r\n * sunset}. This day is split into 12 equal parts with each part being a shaah zmanis. Note that with this\r\n * system, chatzos (mid-day) will not be the point that the sun is {@link #getSunTransit() halfway across\r\n * the sky}.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getShaahZmanisAteretTorah() {\r\n return this.getTemporalHour(this.getAlos72Zmanis(), this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of\r\n * Rabbi Yaakov Moshe Hillel as published in the\r\n * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before\r\n * sunrise in degrees {@link #getAlos16Point1Degrees() alos 16.1°} and ending 14 minutes after sunset in\r\n * degrees {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°}. This day is split into 12 equal parts with\r\n * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point\r\n * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha\r\n * Ketana and Plag Hamincha. The 14 minutes are based on 3/4 of an 18 minute mil, with half a minute\r\n * added for Rav Yosi.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getMinchaKetanaAhavatShalom()\r\n * @see #getPlagAhavatShalom()\r\n */\r\n public getShaahZmanisAlos16Point1ToTzais3Point8() {\r\n return this.getTemporalHour(this.getAlos16Point1Degrees(), this.getTzaisGeonim3Point8Degrees());\r\n }\r\n \r\n /**\r\n * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of\r\n * Rabbi Yaakov Moshe Hillel as published in the\r\n * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before\r\n * sunrise in degrees {@link #getAlos16Point1Degrees() alos 16.1°} and ending 13.5 minutes after sunset in\r\n * degrees {@link #getTzaisGeonim3Point7Degrees() tzais 3.7°}. This day is split into 12 equal parts with\r\n * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point\r\n * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha\r\n * Gedola calculation.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getMinchaGedolaAhavatShalom()\r\n */\r\n public getShaahZmanisAlos16Point1ToTzais3Point7() {\r\n return this.getTemporalHour(this.getAlos16Point1Degrees(), this.getTzaisGeonim3Point7Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 96 minutes. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes before sunrise\r\n * and dusk is 96 minutes after sunset. This day is split into 12 equal parts with each part being a shaah\r\n * zmanis.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis96Minutes() {\r\n return this.getTemporalHour(this.getAlos96(), this.getTzais96());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 120 minutes. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 120 minutes before sunrise and\r\n * dusk is 120 minutes after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.\r\n * Since zmanim that use this method are extremely late or early and at a point when the sky is a long time\r\n * past the 18° point where the darkest point is reached, zmanim that use this should only be used\r\n * lechumra only, such as delaying the start of nighttime mitzvos.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis26Degrees()\r\n */\r\n public getShaahZmanis120Minutes() {\r\n return this.getTemporalHour(this.getAlos120(), this.getTzais120());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link\r\n * #getAlos120Zmanis() 120} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides\r\n * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is\r\n * 120 minutes zmaniyos before sunrise and dusk is 120 minutes zmaniyos after sunset. This day is\r\n * split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/6th of the day from\r\n * {@link #getSunrise() sunrise} to {@link #getSunset() sunset}. Since zmanim that use this method are\r\n * extremely late or early and at a point when the sky is a long time past the 18° point where the darkest point\r\n * is reached, zmanim that use this should only be used lechumra such as delaying the start of\r\n * nighttime mitzvos.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos120Zmanis()\r\n * @see #getTzais120Zmanis()\r\n */\r\n public getShaahZmanis120MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos120Zmanis(), this.getTzais120Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on sunrise\r\n * being 120 minutes zmaniyos or 1/6th of the day before sunrise. This is calculated as 10.75 hours after\r\n * {@link #getAlos120Zmanis() dawn}. The formula used is 10.75 * {@link #getShaahZmanis120MinutesZmanis()} after\r\n * {@link #getAlos120Zmanis() dawn}. Since the zman based on an extremely early alos and a very\r\n * late tzais, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis120MinutesZmanis()\r\n * @see #getAlos120()\r\n * @see #getTzais120()\r\n * @see #getPlagHamincha26Degrees()\r\n * @see #getPlagHamincha120Minutes()\r\n */\r\n public getPlagHamincha120MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos120Zmanis(), this.getTzais120Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the\r\n * Magen Avraham with the day starting 120 minutes before sunrise and ending 120 minutes after sunset. This is\r\n * calculated as 10.75 hours after {@link #getAlos120() dawn 120 minutes}. The formula used is 10.75 {@link\r\n * #getShaahZmanis120Minutes()} after {@link #getAlos120()}. Since the zman based on an extremely early\r\n * alos and a very late tzais, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis120Minutes()\r\n * @see #getPlagHamincha26Degrees()\r\n */\r\n public getPlagHamincha120Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos120(), this.getTzais120());\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated as 60 minutes before sunrise. This is the time to walk the \r\n * distance of 4 Mil at 15 minutes a Mil. This seems to be the opinion of the Chavas Yair in the Mekor Chaim, Orach Chaim Ch.\r\n * 90, though the Mekor Chaim in Ch. 58 and in the Chut Hashani Cha 97 states that\r\n * a a person walks 3 and a 1/3 mil in an hour, or an 18-minute mil. Also see the Divrei Malkiel Vol. 4, Ch. 20, page 34) who\r\n * mentions the 15 minute mil lechumra by baking matzos. Also see the Maharik Ch. 173 where the questioner quoting the\r\n * Ra'avan is of the opinion that the time to walk a\r\n * mil is 15 minutes (5 mil in a little over an hour). There are many who believe that there is a\r\n * ta'us sofer (scribe's error) in the Ra'avan, and it should 4 mil in a little over an hour, or an\r\n * 18-minute mil. Time based offset calculations are based on the opinion of the\r\n * Rishonim who stated that the time of the neshef\r\n * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it takes to\r\n * walk the distance of 4* mil. {@link #getTzaisGeonim9Point75Degrees()} is a related zman that is a\r\n * degree-based calculation based on 60 minutes.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}.\r\n * documentation.\r\n *\r\n * @see #getTzais60()\r\n * @see #getPlagHamincha60Minutes()\r\n * @see #getShaahZmanis60Minutes()\r\n */\r\n public getAlos60() {\r\n return this.getSunrise()?.subtract({ minutes: 60 })\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 72 minutes zmaniyos or 1/10th of the day before\r\n * sunrise. This is based on an 18-minute Mil so the time for 4 Mil is 72 minutes which is 1/10th\r\n * of a day (12 * 60 = 720) based on the a day being from {@link #getSeaLevelSunrise() sea level sunrise} to\r\n * {@link #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset}\r\n * (depending on the {@link #isUseElevation()} setting).\r\n * The actual calculation is {@link #getSeaLevelSunrise()} - ({@link #getShaahZmanisGra()} * 1.2). This calculation\r\n * is used in the calendars published by the Hisachdus Harabanim D'Artzos Habris Ve'Canada.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getShaahZmanisGra()\r\n */\r\n public getAlos72Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-1.2);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 96 minutes before before {@link #getSunrise() sunrise} or\r\n * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting) that is based\r\n * on the time to walk the distance of 4 Mil at 24 minutes a Mil. Time based offset\r\n * calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef (time between dawn and sunrise) does not vary\r\n * by the time of year or location but purely depends on the time it takes to walk the distance of 4 Mil.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getAlos96() {\r\n return this.getElevationAdjustedSunrise()?.subtract({ minutes: 96 });\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 90 minutes zmaniyos or 1/8th of the day before\r\n * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link\r\n * #isUseElevation()} setting). This is based on a 22.5-minute Mil so the time for 4 Mil is 90\r\n * minutes which is 1/8th of a day (12 * 60) / 8 = 90\r\n * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}.\r\n * The actual calculation used is {@link #getSunrise()} - ({@link #getShaahZmanisGra()} * 1.5).\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getShaahZmanisGra()\r\n */\r\n public getAlos90Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-1.5);\r\n }\r\n\r\n /**\r\n * This method returns alos (dawn) calculated using 96 minutes zmaniyos or 1/7.5th of the day before\r\n * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link\r\n * #isUseElevation()} setting). This is based on a 24-minute Mil so the time for 4 Mil is 96\r\n * minutes which is 1/7.5th of a day (12 * 60 / 7.5 = 96).\r\n * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}.\r\n * The actual calculation used is {@link #getSunrise()} - ({@link #getShaahZmanisGra()} * 1.6).\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getShaahZmanisGra()\r\n */\r\n public getAlos96Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-1.6);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 90 minutes before {@link #getSeaLevelSunrise() sea level\r\n * sunrise} based on the time to walk the distance of 4 Mil at 22.5 minutes a Mil. Time based\r\n * offset calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef\r\n * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it\r\n * takes to walk the distance of 4 Mil.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getAlos90() {\r\n return this.getElevationAdjustedSunrise()?.subtract({ minutes: 90 });\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns alos (dawn) calculated using 120 minutes\r\n * before {@link #getSeaLevelSunrise() sea level sunrise} (no adjustment for elevation is made) based on the time\r\n * to walk the distance of 5 Mil(Ula) at 24 minutes a Mil. Time based offset calculations\r\n * for alos are based on the* opinion of the Rishonim\r\n * who stated that the time of the neshef (time between dawn and sunrise) does not vary by the time of\r\n * year or location but purely depends on the time it takes to walk the distance of 5 Mil(Ula). Since\r\n * this time is extremely early, it should only be used lechumra, such as not eating after this time on a fast\r\n * day, and not as the start time for mitzvos that can only be performed during the day.\r\n * \r\n * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),\r\n * since it returns a very early time, and if used lekula can result in doing mitzvos hayom\r\n * too early according to most opinions. There is no current plan to remove this method from the API, and this\r\n * deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getTzais120()\r\n * @see #getAlos26Degrees()\r\n */\r\n public getAlos120() {\r\n return this.getElevationAdjustedSunrise()?.subtract({ minutes: 120 });\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and method returns alos (dawn) calculated using\r\n * 120 minutes zmaniyos or 1/6th of the day before {@link #getSunrise() sunrise} or {@link\r\n * #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This is based\r\n * on a 24-minute Mil so the time for 5 Mil is 120 minutes which is 1/6th of a day (12 * 60 /\r\n * 6 = 120). The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link\r\n * #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending\r\n * on the {@link #isUseElevation()}. The actual calculation used is {@link #getSunrise()} - ({@link\r\n * #getShaahZmanisGra()} * 2). Since this time is extremely early, it should only be used lechumra, such\r\n * as not eating after this time on a fast day, and not as the start time for mitzvos that can only be\r\n * performed during the day.\r\n * \r\n * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),\r\n * since it returns a very early time, and if used lekula can result in doing mitzvos hayom\r\n * too early according to most opinions. There is no current plan to remove this method from the API, and this\r\n * deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos120()\r\n * @see #getAlos26Degrees()\r\n */\r\n public getAlos120Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-2);\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns alos (dawn) calculated when the sun is {@link\r\n * #ZENITH_26_DEGREES 26°} below the eastern geometric horizon before sunrise. This calculation is based on the same\r\n * calculation of {@link #getAlos120() 120 minutes} but uses a degree-based calculation instead of 120 exact minutes. This\r\n * calculation is based on the position of the sun 120 minutes before sunrise in Jerusalem around the equinox / equilux, which\r\n * calculates to 26° below {@link #GEOMETRIC_ZENITH geometric zenith}. Since this time is extremely early, it should\r\n * only be used lechumra only, such as not eating after this time on a fast day, and not as the start time for\r\n * mitzvos that can only be performed during the day.\r\n * \r\n * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),\r\n * since it returns a very early time, and if used lekula can result in doing mitzvos hayom\r\n * too early according to most opinions. There is no current plan to remove this method from the API, and this\r\n * deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_26_DEGREES\r\n * @see #getAlos120()\r\n * @see #getTzais120()\r\n * @see #getTzais26Degrees()\r\n */\r\n public getAlos26Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_26_DEGREES);\r\n }\r\n\r\n /**\r\n * A method to return alos (dawn) calculated when the sun is {@link #ASTRONOMICAL_ZENITH 18°} below the\r\n * eastern geometric horizon before sunrise.\r\n * \r\n * @return the Date
representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getAlos18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method to return alos (dawn) calculated when the sun is {@link #ZENITH_19_DEGREES 19°} below the\r\n * eastern geometric horizon before sunrise. This is the Rambam's alos according to Rabbi Moshe Kosower's Maaglei Tzedek, page 88, Ayeles Hashachar Vol. I, page 12, Yom Valayla Shel Torah, Ch. 34, p. 222 and \r\n * Rabbi Yaakov Shakow's Luach Ikvei Hayom.\r\n * \r\n * @return the Date
representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getAlos19Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_19_DEGREES);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated when the sun is {@link #ZENITH_19_POINT_8 19.8°} below the\r\n * eastern geometric horizon before sunrise. This calculation is based on the same calculation of\r\n * {@link #getAlos90() 90 minutes} but uses a degree-based calculation instead of 90 exact minutes. This calculation\r\n * is based on the position of the sun 90 minutes before sunrise in Jerusalem around the equinox / equilux, which\r\n * calculates to 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return the Date
representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_19_POINT_8\r\n * @see #getAlos90()\r\n */\r\n public getAlos19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_19_POINT_8);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the\r\n * eastern geometric horizon before sunrise. This calculation is based on the same calculation of\r\n * {@link #getAlos72() 72 minutes} but uses a degree-based calculation instead of 72 exact minutes. This calculation\r\n * is based on the position of the sun 72 minutes before sunrise in Jerusalem around the equinox / equilux, which\r\n * calculates to 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return the Date
representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_16_POINT_1\r\n * @see #getAlos72()\r\n */\r\n public getAlos16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_16_POINT_1);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES\r\n * 11.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating\r\n * misheyakir according to some opinions. This calculation is based on the position of the sun 52 minutes\r\n * before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux,\r\n * which calculates to 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * @todo recalculate.\r\n * \r\n * @return the Date
of misheyakir. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_11_POINT_5\r\n */\r\n public getMisheyakir11Point5Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_11_POINT_5);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES\r\n * 11°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating\r\n * misheyakir according to some opinions. This calculation is based on the position of the sun 48 minutes\r\n * before {@link #getSunrise sunrise} in Jerusalem daround the equinox / equilux,\r\n * which calculates to 11° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return If the calculation can't be computed such as northern and southern locations even south of the Arctic\r\n * Circle and north of the Antarctic Circle where the sun may not reach low enough below the horizon for\r\n * this calculation, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_11_DEGREES\r\n */\r\n public getMisheyakir11Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_11_DEGREES);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_10_POINT_2\r\n * 10.2°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating\r\n * misheyakir according to some opinions. This calculation is based on the position of the sun 45 minutes\r\n * before {@link #getSunrise sunrise} in Jerusalem around the equinox which calculates\r\n * to 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return the Date
of misheyakir. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_10_POINT_2\r\n */\r\n public getMisheyakir10Point2Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_10_POINT_2);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_7_POINT_65\r\n * 7.65°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). The degrees are based on a 35/36 minute\r\n * zman around the\r\n * equinox / equilux, when the neshef (twilight) is the shortest. This time is based on Rabbi Moshe Feinstein who writes in Ohr Hachaim Vol. 4, Ch. 6)\r\n * that misheyakir in New York is 35-40 minutes before sunset, something that is a drop less than 8°.\r\n * Rabbi Yisroel Taplin in Zmanei Yisrael (page 117) notes that Rabbi Yaakov Kamenetsky stated that it is not less than 36\r\n * minutes before sunrise (maybe it is 40 minutes). Sefer Yisrael Vehazmanim (p. 7) quotes the Tamar Yifrach\r\n * in the name of the Satmar Rov that one should be stringent\r\n * not consider misheyakir before 36 minutes. This is also the accepted minhag in Lakewood that is used in the Yeshiva. This follows the opinion of Rabbi Shmuel Kamenetsky who provided the time of 35/36 minutes,\r\n * but did not provide a degree-based time. Since this zman depends on the level of light, Rabbi Yaakov Shakow\r\n * presented this degree-based calculations to Rabbi Kamenetsky who agreed to them.\r\n * \r\n * @return the Date
of misheyakir. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_7_POINT_65\r\n * @see #getMisheyakir9Point5Degrees()\r\n */\r\n public getMisheyakir7Point65Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_65);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_9_POINT_5\r\n * 9.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is based on Rabbi Dovid Kronglass's\r\n * Calculation of 45 minutes in Baltimore as mentioned in Divrei Chachamim No. 24 brought down by the Birur Halacha, Tinyana, Ch. 18. This calculates to\r\n * 9.5°. Also see Rabbi Yaakov Yitzchok Neiman in Kovetz\r\n * Eitz Chaim Vol. 9, p. 202 that the Vya'an Yosef did not want to rely on times earlier than 45 minutes in New York. This\r\n * zman is also used in the calendars published by Rabbi Hershel Edelstein. As mentioned in Yisroel Vehazmanim,\r\n * Rabbi Edelstein who was given the 45 minute zman by Rabbi Bick. The calendars published by the Edot Hamizrach communities also use this zman. This also\r\n * follows the opinion of Rabbi Shmuel Kamenetsky who provided\r\n * the time of 36 and 45 minutes, but did not provide a degree-based time. Since this zman depends on the level of\r\n * light, Rabbi Yaakov Shakow presented these degree-based times to Rabbi Shmuel Kamenetsky who agreed to them.\r\n * \r\n * @return the Date
of misheyakir. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_9_POINT_5\r\n * @see #getMisheyakir7Point65Degrees()\r\n */\r\n public getMisheyakir9Point5Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_9_POINT_5);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise() sunrise}. This\r\n * time is 3 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link\r\n * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall\r\n * with both being 19.8° below sunrise or sunset. This returns the time of 3 *\r\n * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis19Point8Degrees()\r\n * @see #getAlos19Point8Degrees()\r\n */\r\n public getSofZmanShmaMGA19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time\r\n * is 3 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after\r\n * {@link #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from\r\n * dawn to nightfall with both being 16.1° below sunrise or sunset. This returns the time of\r\n * 3 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n */\r\n public getSofZmanShmaMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos18Degrees() 18°} before {@link #getSunrise() sunrise}. This time is 3\r\n * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn}\r\n * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°\r\n * below sunrise or sunset. This returns the time of 3 * {@link #getShaahZmanis18Degrees()} after\r\n * {@link #getAlos18Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis18Degrees()\r\n * @see #getAlos18Degrees()\r\n */\r\n public getSofZmanShmaMGA18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 3 {@link\r\n * #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on the opinion\r\n * of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to\r\n * {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link\r\n * #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to {@link\r\n * #getSofZmanShmaMGA()} and is repeated here for clarity.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72Minutes()\r\n * @see #getAlos72()\r\n * @see #getSofZmanShmaMGA()\r\n */\r\n public getSofZmanShmaMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShmaMGA();\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according\r\n * to the opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos72Zmanis() 72} minutes zmaniyos, or 1/10th of the day before\r\n * {@link #getSunrise() sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos}\r\n * (solar hours) after {@link #getAlos72Zmanis() dawn} based on the opinion of the MGA that the day is calculated\r\n * from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmaniyos, or 1/10th of the day before\r\n * {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getTzais72Zmanis() nightfall} of 72 minutes\r\n * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 3 *\r\n * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72MinutesZmanis()\r\n * @see #getAlos72Zmanis()\r\n */\r\n public getSofZmanShmaMGA72MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according\r\n * to the opinion of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos90() 90} minutes before {@link #getSunrise() sunrise}. This time is 3\r\n * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to\r\n * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 3 *\r\n * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90Minutes()\r\n * @see #getAlos90()\r\n */\r\n public getSofZmanShmaMGA90Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos90()!, this.getTzais90()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise()\r\n * sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after\r\n * {@link #getAlos90Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link\r\n * #getAlos90Zmanis() dawn} of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall}\r\n * of 90 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis90MinutesZmanis()}\r\n * after {@link #getAlos90Zmanis() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90MinutesZmanis()\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getSofZmanShmaMGA90MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos96() 96} minutes before {@link #getSunrise() sunrise}. This time is 3\r\n * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before\r\n * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link\r\n * #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96Minutes()\r\n * @see #getAlos96()\r\n */\r\n public getSofZmanShmaMGA96Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos96()!, this.getTzais96()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos90Zmanis() 96} minutes zmaniyos before {@link #getSunrise()\r\n * sunrise}. This time is 3 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after\r\n * {@link #getAlos96Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link\r\n * #getAlos96Zmanis() dawn} of 96 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall}\r\n * of 96 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis96MinutesZmanis()}\r\n * after {@link #getAlos96Zmanis() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96MinutesZmanis()\r\n * @see #getAlos96Zmanis()\r\n */\r\n public getSofZmanShmaMGA96MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) calculated\r\n * as 3 hours (regular clock hours and not sha'os zmaniyos) before {@link ZmanimCalendar#getChatzos()}.\r\n * Generally known as part of the \"Komarno\" zmanim after Rav Yitzchak Eizik of\r\n * Komarno, a proponent of this calculation, it actually predates him a lot. It is the opinion of the \r\n * Shach in the Nekudas Hakesef (Yoreh Deah 184), Rav Moshe Lifshitz in his commentary\r\n * Lechem Mishneh on Brachos 1:2. It is\r\n * next brought down about 100 years later by the Yaavetz\r\n * (in his siddur, Mor Uktziah Orach\r\n * Chaim 1, Lechem Shamayim, Brachos 1:2\r\n * and She'elos Yaavetz vol. 1 no. 40),\r\n * Rav Yitzchak Eizik of Komarno in the Ma'aseh Oreg on Mishnayos Brachos 11:2, Shevus Yaakov, Chasan Sofer and others.\r\n * See Yisrael Vehazmanim vol. 1 7:3, page 55 -\r\n * 62. A variant of this calculation {@link #getSofZmanShmaFixedLocal()} uses {@link #getFixedLocalChatzos() fixed\r\n * local chatzos} for calculating this type of zman.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see ZmanimCalendar#getChatzos()\r\n * @see #getSofZmanShmaFixedLocal()\r\n * @see #getSofZmanTfila2HoursBeforeChatzos()\r\n */\r\n public getSofZmanShma3HoursBeforeChatzos() {\r\n return this.getChatzos()?.subtract({ minutes: 180 })\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos120() 120} minutes or 1/6th of the day before {@link #getSunrise() sunrise}.\r\n * This time is 3 {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120()\r\n * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120 minutes\r\n * before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of 3\r\n * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman that\r\n * is very much a chumra.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis120Minutes()\r\n * @see #getAlos120()\r\n */\r\n public getSofZmanShmaMGA120Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos120()!, this.getTzais120());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) based\r\n * on the opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at\r\n * {@link #getSeaLevelSunset() sea level sunset}. This is the opinion of the \\u05D7\\u05D9\\u05D3\\u05D5\\u05E9\\u05D9\r\n * \\u05D5\\u05DB\\u05DC\\u05DC\\u05D5\\u05EA \\u05D4\\u05E8\\u05D6\\u05F4\\u05D4 and the \\u05DE\\u05E0\\u05D5\\u05E8\\u05D4 \\u05D4\\u05D8\\u05D4\\u05D5\\u05E8\\u05D4 as\r\n * mentioned by Yisrael Vehazmanim vol 1, sec. 7,\r\n * ch. 3 no. 16. Three shaos zmaniyos are calculated based on this day and added to {@link\r\n * #getAlos16Point1Degrees() alos} to reach this time. This time is 3 shaos zmaniyos (solar hours)\r\n * after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link\r\n * #getAlos16Point1Degrees() alos 16.1°} to {@link #getSeaLevelSunset() sea level sunset}.\r\n * Note: Based on this calculation chatzos will not be at midday.\r\n * \r\n * @return the Date
of the latest zman krias shema based on this day. If the calculation can't\r\n * be computed such as northern and southern locations even south of the Arctic Circle and north of the\r\n * Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a null\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getSeaLevelSunset()\r\n */\r\n public getSofZmanShmaAlos16Point1ToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos16Point1Degrees(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the\r\n * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at\r\n * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}. 3 shaos zmaniyos are calculated\r\n * based on this day and added to {@link #getAlos16Point1Degrees() alos} to reach this time. This time is 3\r\n * shaos zmaniyos (temporal hours) after {@link #getAlos16Point1Degrees() alos 16.1°} based on\r\n * the opinion that the day is calculated from a {@link #getAlos16Point1Degrees() alos 16.1°} to\r\n * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}.\r\n * Note: Based on this calculation chatzos will not be at midday.\r\n * \r\n * @return the Date
of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzaisGeonim7Point083Degrees()\r\n */\r\n public getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos16Point1Degrees(), this.getTzaisGeonim7Point083Degrees());\r\n }\r\n\r\n /**\r\n * From the GRA in Kol Eliyahu on Berachos #173 that states that zman krias shema is calculated as half the\r\n * time from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getFixedLocalChatzos() fixed local chatzos}.\r\n * The GRA himself seems to contradict this when he stated that zman krias shema is 1/4 of the day from\r\n * sunrise to sunset. See Sarah Lamoed #25 in Yisroel Vehazmanim Vol. III page 1016.\r\n * \r\n * @return the Date
of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getFixedLocalChatzos()\r\n * \r\n * @deprecated As per a conversation Rabbi Yisroel Twerski had with Rabbi Harfenes, this zman published in\r\n * the Yisrael Vehazmanim was based on a misunderstanding and should not be used. This deprecated method\r\n * will be removed (likely in KosherJava v3.0) pending confirmation from Rabbi Harfenes.\r\n */\r\n public getSofZmanShmaKolEliyahu(): Temporal.ZonedDateTime | null {\r\n const chatzos = this.getFixedLocalChatzos()!;\r\n if (chatzos === null || this.getSunrise() === null) {\r\n return null;\r\n }\r\n let diff = Temporal.Duration.from({ nanoseconds: Math.trunc(this.getElevationAdjustedSunrise()?.until(chatzos).total(\"nanoseconds\")! / 2) });\r\n return chatzos.subtract(diff)\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise() sunrise}. This time\r\n * is 4 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link\r\n * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to\r\n * nightfall with both being 19.8° below sunrise or sunset. This returns the time of 4 * {@link\r\n * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis19Point8Degrees()\r\n * @see #getAlos19Point8Degrees()\r\n */\r\n public getSofZmanTfilaMGA19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time\r\n * is 4 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link\r\n * #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to\r\n * nightfall with both being 16.1° below sunrise or sunset. This returns the time of 4 * {@link\r\n * #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n */\r\n public getSofZmanTfilaMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos18Degrees() 18°} before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn}\r\n * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°\r\n * below sunrise or sunset. This returns the time of 4 * {@link #getShaahZmanis18Degrees()} after\r\n * {@link #getAlos18Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis18Degrees()\r\n * @see #getAlos18Degrees()\r\n */\r\n public getSofZmanTfilaMGA18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before\r\n * sunrise to {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 4 *\r\n * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to\r\n * {@link #getSofZmanTfilaMGA()} and is repeated here for clarity.\r\n * \r\n * @return the Date
of the latest zman tfila. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72Minutes()\r\n * @see #getAlos72()\r\n * @see #getSofZmanShmaMGA()\r\n */\r\n public getSofZmanTfilaMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaMGA();\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the\r\n * Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis72MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos72Zmanis() dawn}\r\n * based on the opinion of the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72\r\n * minutes zmaniyos before sunrise to {@link #getTzais72Zmanis() nightfall} of 72 minutes zmaniyos\r\n * after sunset. This returns the time of 4 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72MinutesZmanis()\r\n * @see #getAlos72Zmanis()\r\n */\r\n public getSofZmanTfilaMGA72MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos90() 90} minutes before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to\r\n * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 4 *\r\n * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}.\r\n * \r\n * @return the Date
of the latest zman tfila. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90Minutes()\r\n * @see #getAlos90()\r\n */\r\n public getSofZmanTfilaMGA90Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos90()!, this.getTzais90()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the\r\n * Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is\r\n * 4 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos90Zmanis()\r\n * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos90Zmanis() dawn}\r\n * of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall} of 90 minutes\r\n * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis90MinutesZmanis()} after\r\n * {@link #getAlos90Zmanis() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90MinutesZmanis()\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getSofZmanTfilaMGA90MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos96() 96} minutes before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before\r\n * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 4 *\r\n * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}.\r\n * \r\n * @return the Date
of the latest zman tfila. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96Minutes()\r\n * @see #getAlos96()\r\n */\r\n public getSofZmanTfilaMGA96Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos96()!, this.getTzais96()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the\r\n * Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is\r\n * 4 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos96Zmanis()\r\n * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos96Zmanis() dawn}\r\n * of 96 minutes zmaniyos before sunrise to {@link #getTzais96Zmanis() nightfall} of 96 minutes\r\n * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis96MinutesZmanis()} after\r\n * {@link #getAlos96Zmanis() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90MinutesZmanis()\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getSofZmanTfilaMGA96MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos120() 120} minutes before {@link #getSunrise() sunrise} . This time is 4\r\n * {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120() dawn}\r\n * based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120\r\n * minutes before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of\r\n * 4 * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman\r\n * that is very much a chumra.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis120Minutes()\r\n * @see #getAlos120()\r\n */\r\n public getSofZmanTfilaMGA120Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos120()!, this.getTzais120());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) calculated as 2 hours\r\n * before {@link ZmanimCalendar#getChatzos()}. This is based on the opinions that calculate\r\n * sof zman krias shema as {@link #getSofZmanShma3HoursBeforeChatzos()}. This returns the time of 2 hours\r\n * before {@link ZmanimCalendar#getChatzos()}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see ZmanimCalendar#getChatzos()\r\n * @see #getSofZmanShma3HoursBeforeChatzos()\r\n */\r\n public getSofZmanTfila2HoursBeforeChatzos() {\r\n return this.getChatzos()?.subtract({ minutes: 120 });\r\n }\r\n\r\n /**\r\n * This method returns mincha gedola calculated as 30 minutes after {@link #getChatzos() chatzos}\r\n * and not 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} after {@link #getChatzos() chatzos} as\r\n * calculated by {@link #getMinchaGedola}. Some use this time to delay the start of mincha in the winter when\r\n * 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is less than 30 minutes. See\r\n * {@link #getMinchaGedolaGreaterThan30()} for a convenience method that returns the later of the 2 calculations. One\r\n * should not use this time to start mincha before the standard {@link #getMinchaGedola() mincha gedola}.\r\n * See Shulchan Aruch Orach Chayim 234:1 and\r\n * the Shaar Hatziyon seif katan ches.\r\n * \r\n * @return the Date
of 30 minutes after chatzos. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaGedolaGreaterThan30()\r\n */\r\n public getMinchaGedola30Minutes() {\r\n return this.getChatzos()?.add({ minutes: 30 });\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola according to the Magen Avraham with the day starting 72\r\n * minutes before sunrise and ending 72 minutes after sunset. This is the earliest time to pray mincha. For\r\n * more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is\r\n * calculated as 6.5 {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *\r\n * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}.\r\n * \r\n * @see #getAlos72()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @see ZmanimCalendar#getMinchaGedola()\r\n * @return the Date
of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaGedola72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaGedola(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola according to the Magen Avraham with the day starting and\r\n * ending 16.1° below the horizon. This is the earliest time to pray mincha. For more information on\r\n * this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is calculated as 6.5\r\n * {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *\r\n * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date
of the time of mincha gedola. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedola16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaGedola(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola based on the opinion of Rabbi Yaakov Moshe Hillel as published in the luach\r\n * of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that mincha gedola is calculated as half a shaah\r\n * zmanis after chatzos with shaos zmaniyos calculated based on a day starting 72 minutes befoe sunrise\r\n * {@link #getAlos16Point1Degrees() alos 16.1°} and ending 13.5 minutes after sunset {@link\r\n * #getTzaisGeonim3Point7Degrees() tzais 3.7°}. Mincha gedola is the earliest time to pray mincha.\r\n * The later of this time or 30 clock minutes after chatzos is returned. See {@link #getMinchaGedolaGreaterThan30()}\r\n * (though that calculation is based on mincha gedola GRA).\r\n * For more information about mincha gedola see the documentation on {@link #getMinchaGedola() mincha gedola}.\r\n * \r\n * @return the Date
of the mincha gedola. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzaisGeonim3Point7Degrees()\r\n * @see #getShaahZmanisAlos16Point1ToTzais3Point7()\r\n * @see #getMinchaGedolaGreaterThan30()\r\n */\r\n public getMinchaGedolaAhavatShalom(): Temporal.ZonedDateTime | null {\r\n if (!this.getMinchaGedola30Minutes() || !this.getMinchaGedola() || !this.getShaahZmanisAlos16Point1ToTzais3Point7()) {\r\n console.log(this.getShaahZmanisAlos16Point1ToTzais3Point7(), this.getAlos16Point1Degrees(), this.getTzaisGeonim3Point7Degrees())\r\n return null;\r\n }\r\n\r\n return [\r\n this.getMinchaGedola30Minutes()!,\r\n this.getChatzos()?.add({nanoseconds: Math.trunc(this.getShaahZmanisAlos16Point1ToTzais3Point7()!.total(\"nanoseconds\") / 2)})!\r\n ].sort(rZTDsort)[0]\r\n }\r\n\r\n /**\r\n * This is a convenience method that returns the later of {@link #getMinchaGedola()} and\r\n * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is\r\n * less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise {@link #getMinchaGedola()}\r\n * will be returned.\r\n *\r\n * @return the Date
of the later of {@link #getMinchaGedola()} and {@link #getMinchaGedola30Minutes()}.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedolaGreaterThan30(): Temporal.ZonedDateTime | null {\r\n if (this.getMinchaGedola30Minutes() === null || this.getMinchaGedola() === null) {\r\n return null;\r\n }\r\n\r\n return [\r\n this.getMinchaGedola30Minutes()!,\r\n this.getMinchaGedola()!\r\n ].sort(rZTDsort)[0]\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana according to the Magen Avraham with the day starting and\r\n * ending 16.1° below the horizon. This is the preferred earliest time to pray mincha according to the\r\n * opinion of the Rambam and others. For more information on\r\n * this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is calculated as 9.5\r\n * {@link #getTemporalHour() solar hours} after alos. The calculation used is 9.5 *\r\n * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date
of the time of mincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaKetana16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana based on the opinion of Rabbi Yaakov Moshe Hillel as published in the luach\r\n * of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that mincha ketana is calculated as 2.5 shaos\r\n * zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos zmaniyos\r\n * calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and ending at\r\n * tzais 3.8°. Mincha ketana is the preferred earliest time to pray mincha according to\r\n * the opinion of the Rambam and others. For more information\r\n * on this see the documentation on {@link #getMinchaKetana() mincha ketana}. \r\n * \r\n * @return the the Date
of the time of mincha ketana. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanisAlos16Point1ToTzais3Point8()\r\n * @see #getMinchaGedolaAhavatShalom()\r\n * @see #getPlagAhavatShalom()\r\n */\r\n public getMinchaKetanaAhavatShalom() {\r\n return this.getTzaisGeonim3Point8Degrees()?.subtract({\r\n nanoseconds: Math.trunc(this.getShaahZmanisAlos16Point1ToTzais3Point8()?.total(\"nanoseconds\")! * 2.5)\r\n })\r\n }\r\n\r\n\r\n /**\r\n * This method returns the time of mincha ketana according to the Magen Avraham with the day\r\n * starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the preferred earliest time to pray\r\n * mincha according to the opinion of the Rambam\r\n * and others. For more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}.\r\n * This is calculated as 9.5 {@link #getShaahZmanis72Minutes()} after alos. The calculation used is 9.5 *\r\n * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date
of the time of mincha ketana. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaKetana72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha according to the Magen Avraham with the day starting 60\r\n * minutes before sunrise and ending 60 minutes after sunset. This is calculated as 10.75 hours after\r\n * {@link #getAlos60() dawn}. The formula used is 10.75 {@link #getShaahZmanis60Minutes()} after {@link #getAlos60()}.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis60Minutes()\r\n * @see #getAlos60()\r\n * @see #getTzais60()\r\n */\r\n public getPlagHamincha60Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos60(), this.getTzais60());\r\n }\r\n\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the\r\n * Magen Avraham with the day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is calculated\r\n * as 10.75 hours after {@link #getAlos72() dawn}. The formula used is 10.75 {@link #getShaahZmanis72Minutes()} after\r\n * {@link #getAlos72()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis72Minutes()\r\n */\r\n public getPlagHamincha72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the\r\n * Magen Avraham with the day starting 90 minutes before sunrise and ending 90 minutes after sunset. This is calculated\r\n * as 10.75 hours after {@link #getAlos90() dawn}. The formula used is 10.75 {@link #getShaahZmanis90Minutes()} after\r\n * {@link #getAlos90()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis90Minutes()\r\n */\r\n public getPlagHamincha90Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos90(), this.getTzais90());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the Magen\r\n * Avraham with the day starting 96 minutes before sunrise and ending 96 minutes after sunset. This is calculated as 10.75\r\n * hours after {@link #getAlos96() dawn}. The formula used is 10.75 {@link #getShaahZmanis96Minutes()} after\r\n * {@link #getAlos96()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96Minutes()\r\n */\r\n public getPlagHamincha96Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos96(), this.getTzais96());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha. This is calculated\r\n * as 10.75 hours after {@link #getAlos96Zmanis() dawn}. The formula used is 10.75 * {@link\r\n * #getShaahZmanis96MinutesZmanis()} after {@link #getAlos96Zmanis() dawn}. Since plag by this calculation can\r\n * occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha96MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha. This is calculated\r\n * as 10.75 hours after {@link #getAlos90Zmanis() dawn}. The formula used is 10.75 * {@link\r\n * #getShaahZmanis90MinutesZmanis()} after {@link #getAlos90Zmanis() dawn}. Since plag by this calculation can\r\n * occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha90MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha. This is calculated as\r\n * 10.75 hours after {@link #getAlos72Zmanis()}. The formula used is 10.75 * {@link #getShaahZmanis72MinutesZmanis()} after\r\n * {@link #getAlos72Zmanis() dawn}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha72MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link\r\n * #getTzais16Point1Degrees() tzais 16.1°}. This is calculated as 10.75 hours zmaniyos\r\n * after {@link #getAlos16Point1Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis16Point1Degrees()}\r\n * after {@link #getAlos16Point1Degrees()}. Since plag by this calculation can occur after sunset, it\r\n * should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n */\r\n public getPlagHamincha16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos19Point8Degrees() alos 19.8°} and ends at {@link\r\n * #getTzais19Point8Degrees() tzais 19.8°}. This is calculated as 10.75 hours zmaniyos\r\n * after {@link #getAlos19Point8Degrees() dawn}. The formula used is 10.75 * {@link\r\n * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees()}. Since plag by this\r\n * calculation can occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis19Point8Degrees()\r\n */\r\n public getPlagHamincha19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos26Degrees() alos 26°} and ends at {@link\r\n * #getTzais26Degrees() tzais 26°}. This is calculated as 10.75 hours zmaniyos after {@link\r\n * #getAlos26Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis26Degrees()} after {@link\r\n * #getAlos26Degrees()}. Since the zman based on an extremely early alos and a very late\r\n * tzais, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis26Degrees()\r\n * @see #getPlagHamincha120Minutes()\r\n */\r\n public getPlagHamincha26Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos26Degrees(), this.getTzais26Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos18Degrees() alos 18°} and ends at {@link\r\n * #getTzais18Degrees() tzais 18°}. This is calculated as 10.75 hours zmaniyos after {@link\r\n * #getAlos18Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis18Degrees()} after {@link\r\n * #getAlos18Degrees()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis18Degrees()\r\n */\r\n public getPlagHamincha18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the opinion\r\n * that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getSunset() sunset}.\r\n * 10.75 shaos zmaniyos are calculated based on this day and added to {@link #getAlos16Point1Degrees()\r\n * alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal hours) after {@link\r\n * #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link #getAlos16Point1Degrees()\r\n * dawn} of 16.1 degrees before sunrise to {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 10.75 *\r\n * the calculated shaah zmanis after {@link #getAlos16Point1Degrees() dawn}. Since plag by this\r\n * calculation can occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the plag. If the calculation can't be computed such as northern and southern\r\n * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getSeaLevelSunset()\r\n */\r\n public getPlagAlosToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos16Point1Degrees(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha based on the opinion that the day starts at\r\n * {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getTzaisGeonim7Point083Degrees()\r\n * tzais}. 10.75 shaos zmaniyos are calculated based on this day and added to {@link\r\n * #getAlos16Point1Degrees() alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal\r\n * hours) after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a\r\n * {@link #getAlos16Point1Degrees() dawn} of 16.1 degrees before sunrise to\r\n * {@link #getTzaisGeonim7Point083Degrees() tzais} . This returns the time of 10.75 * the calculated\r\n * shaah zmanis after {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date
of the plag. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzaisGeonim7Point083Degrees()\r\n */\r\n public getPlagAlos16Point1ToTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos16Point1Degrees(), this.getTzaisGeonim7Point083Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha (the earliest time that Shabbos can be started) based on the\r\n * opinion of Rabbi Yaakov Moshe Hillel as published in\r\n * the luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that that plag hamincha is calculated\r\n * as 1.25 shaos zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos\r\n * zmaniyos calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and\r\n * ending at tzais 3.8°.\r\n * \r\n * @return the Date
of the plag. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanisAlos16Point1ToTzais3Point8()\r\n * @see #getMinchaGedolaAhavatShalom()\r\n * @see #getMinchaKetanaAhavatShalom()\r\n */\r\n public getPlagAhavatShalom() {\r\n const distance = Temporal.Duration.from({ nanoseconds: this.getShaahZmanisAlos16Point1ToTzais3Point8()?.total(\"nanoseconds\")! * 1.25 });\r\n return this.getTzaisGeonim3Point8Degrees()?.subtract(distance)\r\n }\r\n\r\n /**\r\n * Method to return the beginning of bain hashmashos of Rabbeinu Tam calculated when the sun is\r\n * {@link #ZENITH_13_POINT_24 13.24°} below the western {@link #GEOMETRIC_ZENITH geometric horizon} (90°)\r\n * after sunset. This calculation is based on the same calculation of {@link #getBainHashmashosRT58Point5Minutes()\r\n * bain hashmashos Rabbeinu Tam 58.5 minutes} but uses a degree-based calculation instead of 58.5 exact\r\n * minutes. This calculation is based on the position of the sun 58.5 minutes after sunset in Jerusalem around the equinox / equilux,\r\n * which calculates to 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * NOTE: As per Yisrael Vehazmanim Vol. III page 1028, No. 50, a dip of slightly less than 13° should be used.\r\n * Calculations show that the proper dip to be 13.2456° (truncated to 13.24 that provides about 1.5 second\r\n * earlier (lechumra) time) below the horizon at that time. This makes a difference of 1 minute and 10\r\n * seconds in Jerusalem during the Equinox, and 1 minute 29 seconds during the solstice as compared to the proper\r\n * 13.24° versus 13°. For NY during the solstice, the difference is 1 minute 56 seconds.\r\n * @todo recalculate the above based on equilux/equinox calculations.\r\n * \r\n * @return the Date
of the sun being 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith}\r\n * (90°). If the calculation can't be computed such as northern and southern locations even south of the\r\n * Arctic Circle and north of the Antarctic Circle where the sun may not reach low enough below the horizon\r\n * for this calculation, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_13_POINT_24\r\n * @see #getBainHashmashosRT58Point5Minutes()\r\n */\r\n public getBainHashmashosRT13Point24Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_13_POINT_24);\r\n }\r\n\r\n /**\r\n * This method returns the beginning of Bain hashmashos of Rabbeinu Tam calculated as a 58.5\r\n * minute offset after sunset. bain hashmashos is 3/4 of a Mil before tzais or 3 1/4\r\n * Mil after sunset. With a Mil calculated as 18 minutes, 3.25 * 18 = 58.5 minutes.\r\n * \r\n * @return the Date
of 58.5 minutes after sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n */\r\n public getBainHashmashosRT58Point5Minutes() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 58, seconds: 30 });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos based on the calculation of 13.5 minutes (3/4 of an\r\n * 18-minute Mil) before shkiah calculated as {@link #getTzaisGeonim7Point083Degrees() 7.083°}.\r\n * \r\n * @return the Date
of the bain hashmashos of Rabbeinu Tam in this calculation. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getTzaisGeonim7Point083Degrees()\r\n */\r\n public getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_083)?.subtract({ minutes: 13, seconds: 30 })\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos of Rabbeinu Tam calculated according to the\r\n * opinion of the Divrei Yosef (see Yisrael Vehazmanim) calculated 5/18th (27.77%) of the time between\r\n * alos (calculated as 19.8° before sunrise) and sunrise. This is added to sunset to arrive at the time\r\n * for bain hashmashos of Rabbeinu Tam.\r\n * \r\n * @return the Date
of bain hashmashos of Rabbeinu Tam for this calculation. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getBainHashmashosRT2Stars() {\r\n const alos19Point8: Temporal.ZonedDateTime | null = this.getAlos19Point8Degrees();\r\n const sunrise: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunrise();\r\n if (alos19Point8 === null || sunrise === null) {\r\n return null;\r\n }\r\n\r\n const inverseOfSunriseToAlot = -alos19Point8.until(sunrise).total(\"nanoseconds\")\r\n\r\n return this.getElevationAdjustedSunset()?.add({ nanoseconds: inverseOfSunriseToAlot * (5 / 18) });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 18 minutes\r\n * or 3/4 of a 24-minute Mil before sunset. According to the Yereim, bain hashmashos starts 3/4\r\n * of a Mil before sunset and tzais or nightfall starts at sunset. \r\n * \r\n * @return the Date
of 18 minutes before sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getBainHashmashosYereim3Point05Degrees()\r\n */\r\n public getBainHashmashosYereim18Minutes() {\r\n return this.getElevationAdjustedSunset()?.subtract({ minutes: 18 })\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's\r\n * position 3.05° above the horizon around the equinox / equilux,\r\n * its position 18 minutes or 3/4 of an 24-minute mil before sunset. According to the Yereim, bain\r\n * hashmashos starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset.\r\n * Note that lechumra (of about 14 seconds) a refraction value of 0.5166° as opposed to the traditional\r\n * 0.566° is used. This is more inline with the actual refraction in Eretz Yisrael and is brought down\r\n * by Rabbi\r\n * Yedidya Manet in his Zmanei Halacha\r\n * Lema\u2019aseh (p. 11). That is the first source that I am aware of that calculates degree-based Yereim\r\n * zmanim. The 0.5166° refraction is also used by the Luach Itim\r\n * Lebinah. Calculating the Yereim's bain hashmashos using 18-minute based degrees is also suggested\r\n * in the upcoming 8th edition of the zmanim Kehilchasam. For more details, see the article The Yereim\u2019s Bein Hashmashos.\r\n * \r\n * @todo recalculate based on equinox/equilux\r\n * @return the Date
of the sun's position 3.05° minutes before sunset. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_MINUS_3_POINT_05\r\n * @see #getBainHashmashosYereim18Minutes()\r\n * @see #getBainHashmashosYereim2Point8Degrees()\r\n * @see #getBainHashmashosYereim2Point1Degrees()\r\n */\r\n public getBainHashmashosYereim3Point05Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_MINUS_3_POINT_05);\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 16.875\r\n * minutes or 3/4 of a 22.5-minute Mil before sunset. According to the Yereim, bain hashmashos\r\n * starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset. \r\n * \r\n * @return the Date
of 16.875 minutes before sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getBainHashmashosYereim2Point8Degrees()\r\n */\r\n public getBainHashmashosYereim16Point875Minutes() {\r\n return this.getElevationAdjustedSunset()?.subtract({ minutes: 16, seconds: 52, milliseconds: 500 });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's\r\n * position 2.8° above the horizon around the equinox / equilux,\r\n * its position 16.875 minutes or 3/4 of an 18-minute Mil before sunset. According to the Yereim, bain\r\n * hashmashos starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset.\r\n * Details, including how the degrees were calculated can be seen in the documentation of\r\n * {@link #getBainHashmashosYereim3Point05Degrees()}.\r\n * \r\n * @return the Date
of the sun's position 2.8° minutes before sunset. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_MINUS_2_POINT_8\r\n * @see #getBainHashmashosYereim16Point875Minutes()\r\n * @see #getBainHashmashosYereim3Point05Degrees()\r\n * @see #getBainHashmashosYereim2Point1Degrees()\r\n */\r\n public getBainHashmashosYereim2Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_MINUS_2_POINT_8);\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 13.5 minutes\r\n * or 3/4 of an 18-minute Mil before sunset. According to the Yereim, bain hashmashos starts 3/4 of\r\n * a Mil before sunset and tzais or nightfall starts at sunset.\r\n * \r\n * @return the Date
of 13.5 minutes before sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getBainHashmashosYereim2Point1Degrees()\r\n */\r\n public getBainHashmashosYereim13Point5Minutes() {\r\n return this.getElevationAdjustedSunset()?.subtract({ minutes: 13, seconds: 30 });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's\r\n * position 2.1° above the horizon around the equinox / equilux in\r\n * Yerushalayim, its position 13.5 minutes or 3/4 of an 18-minute Mil before sunset. According to the Yereim,\r\n * bain hashmashos starts 3/4 of a mil before sunset and tzais or nightfall starts at sunset.\r\n * Details, including how the degrees were calculated can be seen in the documentation of\r\n * {@link #getBainHashmashosYereim3Point05Degrees()}.\r\n * \r\n * @return the Date
of the sun's position 2.1° minutes before sunset. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_MINUS_2_POINT_1\r\n * @see #getBainHashmashosYereim13Point5Minutes()\r\n * @see #getBainHashmashosYereim2Point8Degrees()\r\n * @see #getBainHashmashosYereim3Point05Degrees()\r\n */\r\n public getBainHashmashosYereim2Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_MINUS_2_POINT_1);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_3_POINT_7 3.7°} below the western horizon.\r\n * \r\n * @return the Date
representing the time when the sun is 3.7° below sea level.\r\n * @see #ZENITH_3_POINT_7\r\n */\r\n public getTzaisGeonim3Point7Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_7);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_3_POINT_8 3.8°} below the western horizon.\r\n * \r\n * @return the Date
representing the time when the sun is 3.8° below sea level.\r\n * @see #ZENITH_3_POINT_8\r\n */\r\n public getTzaisGeonim3Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_8);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_5_POINT_95 5.95°} below the western horizon.\r\n * \r\n * @return the Date
representing the time when the sun is 5.95° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_5_POINT_95\r\n */\r\n public getTzaisGeonim5Point95Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_5_POINT_95);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil based on an 18\r\n * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_65 3.65°} below the western\r\n * horizon. This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @return the Date
representing the time when the sun is 3.65° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_3_POINT_65\r\n */\r\n public getTzaisGeonim3Point65Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_65);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil based on an 18\r\n * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_676 3.676°} below the western\r\n * horizon based on the calculations of Stanley Fishkind. This is a very early zman and should not be\r\n * relied on without Rabbinical guidance.\r\n * \r\n * @return the Date
representing the time when the sun is 3.676° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_3_POINT_676\r\n */\r\n public getTzaisGeonim3Point676Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_676);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a mil based\r\n * on a 24-minute Mil, or 18 minutes. It is the sun's position at {@link #ZENITH_4_POINT_61 4.61°} below the\r\n * western horizon. This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @return the Date
representing the time when the sun is 4.61° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_4_POINT_61\r\n */\r\n public getTzaisGeonim4Point61Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_4_POINT_61);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil, based on a 22.5\r\n * minute Mil, or 16 7/8 minutes. It is the sun's position at {@link #ZENITH_4_POINT_37 4.37°} below the western\r\n * horizon. This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @return the Date
representing the time when the sun is 4.37° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_4_POINT_37\r\n */\r\n public getTzaisGeonim4Point37Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_4_POINT_37);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a 24-minute Mil,\r\n * based on a Mil being 24 minutes, and is calculated as 18 + 2 + 4 for a total of 24 minutes. It is the\r\n * sun's position at {@link #ZENITH_5_POINT_88 5.88°} below the western horizon. This is a very early\r\n * zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @todo Additional detailed documentation needed.\r\n * @return the Date
representing the time when the sun is 5.88° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_5_POINT_88\r\n */\r\n public getTzaisGeonim5Point88Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_5_POINT_88);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil based on the\r\n * sun's position at {@link #ZENITH_4_POINT_8 4.8°} below the western horizon. This is based on Rabbi Leo Levi's\r\n * calculations. This is the This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * @todo Additional documentation needed.\r\n * \r\n * @return the Date
representing the time when the sun is 4.8° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_4_POINT_8\r\n */\r\n public getTzaisGeonim4Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_4_POINT_8);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim as calculated by\r\n * Rabbi Yechiel Michel Tucazinsky. It is\r\n * based on of the position of the sun no later than {@link #getTzaisGeonim6Point45Degrees() 31 minutes} after sunset\r\n * in Jerusalem the height of the summer solstice and is 28 minutes after shkiah around the equinox / equilux. This\r\n * computes to 6.45° below the western horizon.\r\n * @todo Additional documentation details needed.\r\n * \r\n * @return the Date
representing the time when the sun is 6.45° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_6_POINT_45\r\n */\r\n public getTzaisGeonim6Point45Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_6_POINT_45);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated when the\r\n * sun's position {@link #ZENITH_7_POINT_083 7.083° (or 7° 5\\u2032}) below the western horizon. This is often\r\n * referred to as 7°5' or 7° and 5 minutes. This calculation is based on the observation of 3 medium sized\r\n * stars by Dr. Baruch (Berthold) Cohn in his luach Tabellen enthaltend die Zeitangaben f\u00FCr\r\n * den Beginn der Nacht und des Tages f\u00FCr die Breitengrade + 66 bis -38 published in Strasbourg, France in 1899.\r\n * This calendar was very popular in Europe, and many other calendars based their time on it. Rav Dovid Tzvi Hoffman in his\r\n * Sh\"Ut Melamed Leho'il in an exchange of letters with Baruch Cohn in Orach Chaim 30 agreed to this zman (page 36),\r\n * as did the Sh\"Ut Bnei Tziyon and the Tenuvas Sadeh. It is very close to the time of the Mekor Chesed of the Sefer chasidim. It is close to the position of the sun 30 minutes\r\n * after sunset in Jerusalem around the equinox / equilux, but not\r\n * Exactly. The actual position of the sun 30 minutes after sunset in Jerusalem at the equilux is 7.205° and 7.199°\r\n * at the equinox. See Hazmanim Bahalacha vol 2, pages 520-521 for more details.\r\n * \r\n * @return the Date
representing the time when the sun is 7.083° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_7_POINT_083\r\n */\r\n public getTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_083);\r\n }\r\n\r\n /**\r\n * This method returns tzais (nightfall) based on the opinion of the Geonim calculated as 45 minutes\r\n * after sunset during the summer solstice in New York, when the neshef (twilight) is the longest. The sun's\r\n * position at this time computes to {@link #ZENITH_7_POINT_67 7.75°} below the western horizon. See Igros Moshe Even Haezer 4, Ch. 4 (regarding\r\n * tzais for krias Shema). It is also mentioned in Rabbi Heber's Shaarei Zmanim on in\r\n * chapter 10 (page 87) and\r\n * chapter 12 (page 108). Also see the\r\n * time of 45 minutes in Rabbi Simcha Bunim Cohen's The radiance of Shabbos as the earliest zman for New York.\r\n * This zman is also listed in the Divrei\r\n * Shalom Vol. III, chapter 75, and Bais Av\"i\r\n * Vol. III, chapter 117. This zman is also listed in the Divrei Shalom etc. chapter 177 (FIXME - could not\r\n * be located). Since this zman depends on the level of light, Rabbi Yaakov Shakow presented this degree-based\r\n * calculation to Rabbi Rabbi Shmuel Kamenetsky who agreed\r\n * to it.\r\n * @todo add hyperlinks to source of Divrei Shalom.\r\n * @return the Date
representing the time when the sun is 7.67° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_7_POINT_67\r\n */\r\n public getTzaisGeonim7Point67Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_67);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_8_POINT_5 8.5°} below the western horizon.\r\n * \r\n * @return the Date
representing the time when the sun is 8.5° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_8_POINT_5\r\n */\r\n public getTzaisGeonim8Point5Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_8_POINT_5);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the calculations used in the Luach Itim Lebinah as the stringent time for tzais. It is\r\n * calculated at the sun's position at {@link #ZENITH_9_POINT_3 9.3°} below the western horizon.\r\n * \r\n * @return the Date
representing the time when the sun is 9.3° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getTzaisGeonim9Point3Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_9_POINT_3);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 60\r\n * minutes after sunset around the equinox / equilux, the\r\n * day that a solar hour is 60 minutes in New York. The sun's position at this time computes to\r\n * {@link #ZENITH_9_POINT_75 9.75°} below the western horizon. This is the opinion of Rabbi Eliyahu Henkin. This also follows the opinion of\r\n * Rabbi Shmuel Kamenetsky. Rabbi Yaakov Shakow presented\r\n * these degree-based times to Rabbi Shmuel Kamenetsky who agreed to them.\r\n * \r\n * @todo recalculate based on equinox / equilux.\r\n * @return the Date
representing the time when the sun is 9.75° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n *\r\n * @see #getTzais60()\r\n */\r\n public getTzaisGeonim9Point75Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_9_POINT_75);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Chavas Yair and Divrei Malkiel that the time to walk the distance of a Mil is 15 minutes for a total of 60 minutes\r\n * for 4 Mil after {@link #getSeaLevelSunset() sea level sunset}. See detailed documentation explaining the\r\n * 60 minute concept at {@link #getAlos60()}.\r\n * \r\n * @return the Date
representing 60 minutes after sea level sunset. If the calculation can't be\r\n * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n * and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos60()\r\n * @see #getPlagHamincha60Minutes()\r\n * @see #getShaahZmanis60Minutes()\r\n */\r\n public getTzais60() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 60 })\r\n }\r\n\r\n /**\r\n * This method returns tzais usually calculated as 40 minutes (configurable to any offset via\r\n * {@link #setAteretTorahSunsetOffset(double)}) after sunset. Please note that Chacham Yosef Harari-Raful\r\n * of Yeshivat Ateret Torah who uses this time, does so only for calculating various other zmanai hayom\r\n * such as Sof Zman Krias Shema and Plag Hamincha. His calendars do not publish a zman\r\n * for Tzais. It should also be noted that Chacham Harari-Raful provided a 25 minute zman\r\n * for Israel. This API uses 40 minutes year round in any place on the globe by default. This offset can be change\r\n * by calling {@link #setAteretTorahSunsetOffset(double)}.\r\n * \r\n * @return the Date
representing 40 minutes (configurable via {@link #setAteretTorahSunsetOffset})\r\n * after sea level sunset. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getTzaisAteretTorah() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: this.getAteretTorahSunsetOffset() });\r\n }\r\n\r\n /**\r\n * Returns the offset in minutes after sunset used to calculate tzais based on the calculations of\r\n * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculations. The default value is 40 minutes.\r\n * This affects most zmanim, since almost all zmanim use subset as part of their calculation.\r\n * \r\n * @return the number of minutes after sunset for Tzait.\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getAteretTorahSunsetOffset(): number {\r\n return this.ateretTorahSunsetOffset;\r\n }\r\n\r\n /**\r\n * Allows setting the offset in minutes after sunset for the Ateret Torah zmanim. The default if unset is\r\n * 40 minutes. Chacham Yosef Harari-Raful of Yeshivat Ateret Torah uses 40 minutes globally with the exception\r\n * of Israel where a 25 minute offset is used. This 40 minute (or any other) offset can be overridden by this method.\r\n * This offset impacts all Ateret Torah zmanim.\r\n * \r\n * @param ateretTorahSunsetOffset\r\n * the number of minutes after sunset to use as an offset for the Ateret Torah tzais\r\n * @see #getAteretTorahSunsetOffset()\r\n */\r\n public setAteretTorahSunsetOffset(ateretTorahSunsetOffset: number): void {\r\n this.ateretTorahSunsetOffset = ateretTorahSunsetOffset;\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the\r\n * calculation of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts\r\n * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending\r\n * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via\r\n * {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and added\r\n * to {@link #getAlos72Zmanis() alos} to reach this time. This time is 3\r\n * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after\r\n * {@link #getAlos72Zmanis() alos 72 zmaniyos}. Note: Based on this calculation chatzos\r\n * will not be at midday.\r\n * \r\n * @return the Date
of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * @see #getShaahZmanisAteretTorah()\r\n */\r\n public getSofZmanShmaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos72Zmanis(), this.getTzaisAteretTorah()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) based on the calculation\r\n * of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis()\r\n * 1/10th of the day} before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes\r\n * after sunset} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos\r\n * are calculated based on this day and added to {@link #getAlos72Zmanis() alos} to reach this time. This time\r\n * is 4 * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after\r\n * {@link #getAlos72Zmanis() alos 72 zmaniyos}.\r\n * Note: Based on this calculation chatzos will not be at midday.\r\n * \r\n * @return the Date
of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getSofZmanTfilahAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos72Zmanis(), this.getTzaisAteretTorah()!);\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola based on the calculation of Chacham Yosef\r\n * Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day}\r\n * before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset}\r\n * (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest\r\n * time to pray mincha according to the opinion of the Rambam and others. For more information on this see the documentation on {@link #getMinchaGedola() mincha\r\n * gedola}. This is calculated as 6.5 {@link #getShaahZmanisAteretTorah() solar hours} after alos. The\r\n * calculation used is 6.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}.\r\n * \r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetanaAteretTorah()\r\n * @see ZmanimCalendar#getMinchaGedola()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * \r\n * @return the Date
of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaGedolaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaGedola(this.getAlos72Zmanis(), this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana based on the calculation of\r\n * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts\r\n * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending\r\n * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via\r\n * {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest time to pray mincha\r\n * according to the opinion of the Rambam and others.\r\n * For more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is\r\n * calculated as 9.5 {@link #getShaahZmanisAteretTorah() solar hours} after {@link #getAlos72Zmanis() alos}.\r\n * The calculation used is 9.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}.\r\n * \r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date
of the time of mincha ketana. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaKetanaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getAlos72Zmanis(), this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha based on the calculation of Chacham Yosef Harari-Raful\r\n * of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is\r\n * usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset\r\n * via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and\r\n * added to {@link #getAlos72Zmanis() alos} to reach this time. This time is 10.75\r\n * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after {@link #getAlos72Zmanis()\r\n * dawn}.\r\n * \r\n * @return the Date
of the plag. If the calculation can't be computed such as in the Arctic Circle\r\n * where there is at least one day a year where the sun does not rise, and one where it does not set, a null\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * @see #getAteretTorahSunsetOffset()\r\n */\r\n public getPlagHaminchaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos72Zmanis(), this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * This method returns the time of misheyakir based on the common calculation of the Syrian community in NY\r\n * that the alos is a fixed minute offset from day starting {@link #getAlos72Zmanis() 1/10th of the day}\r\n * before sunrise. The common offsets are 6 minutes (based on the Pri Megadim, but not linked to the\r\n * calculation of Alos as 1/10th of the day), 8 and 18 minutes (possibly attributed to\r\n * Chacham Baruch Ben Haim). Since there is no universal accepted offset, the user of this API will have to\r\n * Chacham Baruch Ben Haim). Since there is no\r\n * universal accepted offset, the user of this API will have to specify one. Chacham Yosef Harari-Raful of\r\n * Yeshivat Ateret Torah does not supply any zman for misheyakir and does not endorse any\r\n * specific calculation for misheyakir. For that reason, this method is not a public method.\r\n *\r\n * @param minutes\r\n * the number of minutes after alos calculated as {@link #getAlos72Zmanis() 1/10th of the day}\r\n * @return the Date
of misheyakir. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos72Zmanis()\r\n */\r\n private getMesheyakirAteretTorah(minutes: number) {\r\n return this.getAlos72Zmanis()?.add({ minutes })\r\n }\r\n\r\n /**\r\n * Method to return tzais (dusk) calculated as 72 minutes zmaniyos, or 1/10th of the day after\r\n * {@link #getSeaLevelSunset() sea level sunset}. This is the way that the Minchas Cohen in Ma'amar 2:4 calculates Rebbeinu Tam's\r\n * time of tzeis. It should be noted that this calculation results in the shortest time from sunset to\r\n * tzais being during the winter solstice, the longest at the summer solstice and 72 clock minutes at the\r\n * equinox. This does not match reality, since there is no direct relationship between the length of the day and\r\n * twilight. The shortest twilight is during the equinox, the longest is during the the summer solstice, and in the\r\n * winter with the shortest daylight, the twilight period is longer than during the equinoxes.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos72Zmanis()\r\n */\r\n public getTzais72Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(1.2);\r\n }\r\n\r\n /**\r\n * A utility method to return alos (dawn) or tzais (dusk) based on a fractional day offset. \r\n * @param hours the number of shaaos zmaniyos (temporal hours) before sunrise or after sunset that defines dawn\r\n * or dusk. If a negative number is passed in, it will return the time of alos (dawn) (subtracting the\r\n * time from sunrise) and if a positive number is passed in, it will return the time of tzais (dusk)\r\n * (adding the time to sunset). If 0 is passed in, a null will be returned (since we can't tell if it is sunrise\r\n * or sunset based).\r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. A null will also be returned if 0 is passed in, since we can't tell if it is sunrise\r\n * or sunset based. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n private getZmanisBasedOffset(hours: 0): undefined;\r\n private getZmanisBasedOffset(hours: ExcludeDate
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getTzais90Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(1.5);\r\n }\r\n\r\n /**\r\n * Method to return tzais (dusk) calculated using 96 minutes zmaniyos or 1/7.5 of the day after\r\n * {@link #getSeaLevelSunset() sea level sunset}.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos96Zmanis()\r\n */\r\n public getTzais96Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(1.6);\r\n }\r\n\r\n /**\r\n * Method to return tzais (dusk) calculated as 90 minutes after sea level sunset. This method returns\r\n * tzais (nightfall) based on the opinion of the Magen Avraham that the time to walk the distance of a\r\n * Mil according to the Rambam's opinion\r\n * is 18 minutes for a total of 90 minutes based on the opinion of Ula who calculated tzais as 5\r\n * Mil after sea level shkiah (sunset). A similar calculation {@link #getTzais19Point8Degrees()}\r\n * uses solar position calculations based on this time.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getTzais19Point8Degrees()\r\n * @see #getAlos90()\r\n */\r\n public getTzais90() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 90 })\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns tzais (nightfall) based on the calculations\r\n * of Rav Chaim Naeh that the time to walk the\r\n * distance of a Mil according to the Rambam's opinion\r\n * is 2/5 of an hour (24 minutes) for a total of 120 minutes based on the opinion of Ula who calculated\r\n * tzais as 5 Mil after sea level shkiah (sunset). A similar calculation {@link\r\n * #getTzais26Degrees()} uses degree-based calculations based on this 120 minute calculation. Since the zman\r\n * is extremely late and at a point that is long past the 18° point where the darkest point is\r\n * reached, it should only be used lechumra, such as delaying the start of nighttime mitzvos.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}.\r\n * documentation.\r\n * @see #getTzais26Degrees()\r\n * @see #getAlos120()\r\n */\r\n public getTzais120() {\r\n return this.getElevationAdjustedSunset()!.add({ minutes: 120 })\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns tzais (dusk) calculated using 120 minutes\r\n * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. Since the zman\r\n * is extremely late and at a point when the it is long past the 18° point where the darkest point is\r\n * reached, it should only be used lechumra, such as delaying the start of nighttime mitzvos.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos120Zmanis()\r\n * @see #getTzais120()\r\n * @see #getTzais26Degrees()\r\n */\r\n public getTzais120Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(2);\r\n }\r\n\r\n /**\r\n * This calculates the time of tzais at the point when the sun is 16.1° below the horizon. This is\r\n * the sun's dip below the horizon 72 minutes after sunset according Rabbeinu Tam's calculation of tzais\r\n * around the equinox / equilux in\r\n * Jerusalem. The question of equinox VS equilux is complex, with Rabbi Meir Posen in the Ohr Meir of the opinion that the equilux should be used. See\r\n * Yisrael Vehazmanim vol I, 34:1:4. Rabbi Yedidya Manet in his Zmanei Halacha Lema'aseh (4th edition part 2, pages\r\n * and 22 and 24) and Rabbi Yonah Metzbuch (in a letter published by Rabbi Manet) are of the opinion that the\r\n * astronomical equinox should be used. The difference adds up to about 9 seconds, too trivial to make much of a\r\n * difference. For information on how this is calculated see the comments on {@link #getAlos16Point1Degrees()}.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTzais72()\r\n * @see #getAlos16Point1Degrees() for more information on this calculation.\r\n */\r\n public getTzais16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_16_POINT_1);\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns tzais based on when the sun is 26°\r\n * below the horizon.For information on how this is calculated see the comments on {@link #getAlos26Degrees()}.\r\n * Since the zman is extremely late and at a point when it is long past the 18° point where the\r\n * darkest point is reached, it should only be used lechumra such as delaying the start of nighttime\r\n * mitzvos.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTzais120()\r\n * @see #getAlos26Degrees()\r\n */\r\n public getTzais26Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_26_DEGREES);\r\n }\r\n\r\n /**\r\n * For information on how this is calculated see the comments on {@link #getAlos18Degrees()}\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos18Degrees()\r\n */\r\n public getTzais18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * For information on how this is calculated see the comments on {@link #getAlos19Point8Degrees()}\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTzais90()\r\n * @see #getAlos19Point8Degrees()\r\n */\r\n public getTzais19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_19_POINT_8);\r\n }\r\n\r\n /**\r\n * A method to return tzais (dusk) calculated as 96 minutes after sea level sunset. For information on how\r\n * this is calculated see the comments on {@link #getAlos96()}.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos96()\r\n */\r\n public getTzais96() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 96 });\r\n }\r\n\r\n /**\r\n * A method that returns the local time for fixed chatzos. This time is noon and midnight adjusted from\r\n * standard time to account for the local latitude. The 360° of the globe divided by 24 calculates to 15°\r\n * per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... Chatzos is at exactly 12:00\r\n * noon. This is the time of chatzos according to the Aruch Hashulchan in Orach Chaim 233:14 and Rabbi Moshe Feinstein in Igros Moshe Orach Chaim 1:24 and 2:20.\r\n * Lakewood, N.J., with a longitude of -74.2094, is 0.7906 away from the closest multiple of 15 at -75°. This\r\n * is multiplied by 4 to yield 3 minutes and 10 seconds for a chatzos of 11:56:50. This method is not tied\r\n * to the theoretical 15° timezones, but will adjust to the actual timezone and Daylight saving time.\r\n * \r\n * @return the Date representing the local chatzos\r\n * @see GeoLocation#getLocalMeanTimeOffset()\r\n */\r\n public getFixedLocalChatzos() {\r\n const geoLocation: GeoLocation = this.getGeoLocation();\r\n const rawOffsetHours = TimeZone.getRawOffset(geoLocation.getTimeZone()) / ComplexZmanimCalendar.HOUR_NANOS;\r\n return this.getDateFromTime(12 - rawOffsetHours, true)?.subtract({ nanoseconds: Math.trunc(geoLocation.getLocalMeanTimeOffset()) })\r\n }\r\n\r\n /**\r\n * A method that returns the latest zman krias shema (time to recite Shema in the morning) calculated as 3\r\n * clock hours before {@link #getFixedLocalChatzos()}. Note that there are opinions brought down in Yisrael Vehazmanim\r\n * page 57 and Rav Yitzchak Silber's Sha'aos Shavos Balalacha that this calculation is a mistake and regular\r\n * chatzos shoud be used for clock-hour calculations as opposed to fixed local chatzos. According to\r\n * these opinions it should be 3 clock hours before regular chatzos as calculated in {@link\r\n * #getSofZmanShma3HoursBeforeChatzos()}.\r\n * \r\n * @return the Date
of the latest zman krias shema calculated as 3 clock hours before\r\n * {@link #getFixedLocalChatzos()}.\r\n * @see #getFixedLocalChatzos()\r\n * @see #getSofZmanShma3HoursBeforeChatzos()\r\n * @see #getSofZmanTfilaFixedLocal()\r\n * \r\n * @deprecated This method of calculating sof zman Shma is considered a mistaken understanding of the proper\r\n * calculation of this zman in the opinion of Rav Yitzchak Silber's Sha'aos Shavos Balalacha. On pages 316-318 he discusses Rav Yisrael\r\n * Harfenes's calculations and points to his seeming agreement that using fixed local chatzos as the focal\r\n * point is problematic. See Yisrael Vehazmanim page 57. While the Yisrael Vehazmanim mentions\r\n * this issue in vol. 1, it was not corrected in the calculations in vol. 3 and other parts of the sefer.\r\n * A competent rabbinical authority should be consulted before using this zman. Instead, the use of {@link\r\n * #getSofZmanShma3HoursBeforeChatzos()} should be used to calculate sof zman Tfila using 3 fixed clock hours.\r\n * This will likely be removed in v3.0.\r\n */\r\n public getSofZmanShmaFixedLocal() {\r\n return this.getFixedLocalChatzos()?.subtract({ minutes: 180 });\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) calculated as 2 hours\r\n * before {@link #getFixedLocalChatzos()}. See the documentation on {@link #getSofZmanShmaFixedLocal()} showing\r\n * differing opinions on how the zman is calculated. According to many opinions {@link\r\n * #getSofZmanTfila2HoursBeforeChatzos()} should be used as opposed to this zman.\r\n * \r\n * @return the Date
of the latest zman tfila.\r\n * @see #getFixedLocalChatzos()\r\n * @see #getSofZmanShmaFixedLocal()\r\n * @see #getSofZmanTfila2HoursBeforeChatzos()\r\n * \r\n * @deprecated This method of calculating sof zman Tfila is considered a mistaken understanding of the proper\r\n * calculation of this zman in the opinion of Rav Yitzchak Silber's Sha'aos Shavos Balalacha. On pages 316-318 he discusses Rav Yisrael\r\n * Harfenes's calculations and points to his seeming agreement that using fixed local chatzos as the focal\r\n * point is problematic. See Yisrael Vehazmanim page 57. While the Yisrael Vehazmanim mentions\r\n * this issue in vol. 1, it was not corrected in the calculations in vol. 3 and other parts of the sefer.\r\n * A competent rabbinical authority should be consulted before using this zman. Instead, the use of {@link\r\n * #getSofZmanTfila2HoursBeforeChatzos()} should be used to calculate sof zman Tfila using 2 fixed\r\n * clock hours. This will likely be removed in v3.0.\r\n */\r\n public getSofZmanTfilaFixedLocal() {\r\n return this.getFixedLocalChatzos()?.subtract({ minutes: 120 });\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kidush Levana according to the Maharil's opinion that it is calculated as\r\n * halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time\r\n * between molad and molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad.\r\n * If the time of sof zman Kiddush Levana occurs during the day (between the alos and tzais passed in\r\n * as parameters), it returns the alos passed in. If a null alos or tzais are passed to this method,\r\n * the non-daytime adjusted time will be returned.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and\r\n * ending at tzais), the time returned will be alos. If either the alos or tzais\r\n * parameters are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at\r\n * tzais), the time returned will be alos. If either the alos or tzais parameter\r\n * are null, no daytime adjustment will be made.\r\n * @return the Date representing the moment halfway between molad and molad. If the time occurs between\r\n * alos and tzais, alos will be returned\r\n * @see #getSofZmanKidushLevanaBetweenMoldos()\r\n * @see #getSofZmanKidushLevana15Days(Date, Date)\r\n * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos()\r\n */\r\n public getSofZmanKidushLevanaBetweenMoldos(alos: Temporal.ZonedDateTime, tzais: Temporal.ZonedDateTime) : Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in French\r\n // Polynesia on Dec 2027 when kiddush Levana 3 days can be said on Rosh Chodesh, the sof zman Kiddush Levana\r\n // will be on the 12th of the Teves. In the case of Anadyr, Russia on Jan, 2071, sof zman Kiddush Levana between the\r\n // moldos will occur is on the night of 17th of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() < 11 || jewishCalendar.getJewishDayOfMonth() > 16) { \r\n return null;\r\n }\r\n return this.getMoladBasedTime(jewishCalendar.getSofZmanKidushLevanaBetweenMoldos(), alos, tzais, false);\r\n }\r\n\r\n /**\r\n * Returns the Date of the molad based time if it occurs on the current date. Since Kiddush Levana\r\n * can only be said during the day, there are parameters to limit it to between alos and tzais. If\r\n * the time occurs between alos and tzais, tzais will be returned.\r\n * \r\n * @param moladBasedTime\r\n * the molad based time such as molad, tchilas and sof zman Kiddush Levana\r\n * @param alos\r\n * optional start of day to limit molad times to the end of the night before or beginning of the next night.\r\n * Ignored if either alos or tzais are null.\r\n * @param tzais\r\n * optional end of day to limit molad times to the end of the night before or beginning of the next night.\r\n * Ignored if either tzais or alos are null\r\n * @param techila\r\n * is it the start of Kiddush Levana time or the end? If it is start roll it to the next tzais, and\r\n * and if it is the end, return the end of the previous night (alos passed in). Ignored if either\r\n * alos or tzais are null.\r\n * @return the molad based time. If the zman does not occur during the current date, null will be returned. \r\n */\r\n private getMoladBasedTime(moladBasedTime: Temporal.ZonedDateTime, alos: Temporal.ZonedDateTime | null, tzais: Temporal.ZonedDateTime | null, techila: boolean): Temporal.ZonedDateTime | null {\r\n const lastMidnight: Temporal.ZonedDateTime = this.getMidnightLastNight();\r\n const midnightTonight: Temporal.ZonedDateTime = this.getMidnightTonight();\r\n\r\n if (!((moladBasedTime < lastMidnight) || (moladBasedTime > midnightTonight))) {\r\n if (alos !== null || tzais !== null) {\r\n return techila && !(moladBasedTime < tzais! || moladBasedTime > alos!)\r\n ? tzais\r\n : alos;\r\n }\r\n return moladBasedTime;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the\r\n * opinion brought down in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the\r\n * Rema who brings down the opinion of the Maharil's of calculating\r\n * {@link #getSofZmanKidushLevanaBetweenMoldos(Date, Date) half way between molad and molad} is of\r\n * the opinion that the Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject,\r\n * see Rabbi Dovid Heber's very detailed write-up in Siman Daled (chapter 4) of Shaarei Zmanim. If the time of sof zman Kiddush Levana occurs during\r\n * the day (between the alos and tzais passed in as parameters), it returns the alos passed in. If a\r\n * null alos or tzais are passed to this method, the non-daytime adjusted time will be returned.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and\r\n * ending at tzais), the time returned will be alos. If either the alos or tzais\r\n * parameters are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at\r\n * tzais), the time returned will be alos. If either the alos or tzais parameters\r\n * are null, no daytime adjustment will be made.\r\n *\r\n * @return the Date representing the moment 15 days after the molad. If the time occurs between alos and\r\n * tzais, alos will be returned\r\n * \r\n * @see #getSofZmanKidushLevanaBetweenMoldos(Date, Date)\r\n * @see JewishCalendar#getSofZmanKidushLevana15Days()\r\n */\r\n public getSofZmanKidushLevana15Days(alos: Temporal.ZonedDateTime | null = null, tzais: Temporal.ZonedDateTime | null = null): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n\r\n // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in\r\n // French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on Rosh Chodesh, the sof zman Kiddush\r\n // Levana will be on the 12th of the Teves. in the case of Anadyr, Russia on Jan, 2071, sof zman kiddush levana will\r\n // occur after midnight on the 17th of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() < 11 || jewishCalendar.getJewishDayOfMonth() > 17) {\r\n return null;\r\n }\r\n return this.getMoladBasedTime(jewishCalendar.getSofZmanKidushLevana15Days(), alos, tzais, false);\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana according to Rabbeinu Yonah's opinion that it can be said 3 days after the molad.\r\n * If the time of tchilas zman Kiddush Levana occurs during the day (between alos and tzais passed to\r\n * this method) it will return the following tzais. If null is passed for either alos or tzais, the actual\r\n * tchilas zman Kiddush Levana will be returned, regardless of if it is during the day or not.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending\r\n * at tzais), the time returned will be tzais. If either the alos or tzais parameters\r\n * are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at\r\n * tzais), the time returned will be tzais. If either the alos or tzais parameters\r\n * are null, no daytime adjustment will be made.\r\n *\r\n * @return the Date representing the moment 3 days after the molad. If the time occurs between alos and\r\n * tzais, tzais will be returned\r\n * @see #getTchilasZmanKidushLevana3Days()\r\n * @see #getTchilasZmanKidushLevana7Days(Date, Date)\r\n * @see JewishCalendar#getTchilasZmanKidushLevana3Days()\r\n */\r\n public getTchilasZmanKidushLevana3Days(alos: Temporal.ZonedDateTime | null = null, tzais: Temporal.ZonedDateTime | null = null): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar();\r\n jewishCalendar.setGregorianDate(this.getDate().year, this.getDate().month - 1, this.getDate().day);\r\n\r\n // Do not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 3 days for\r\n // the extreme case of Rapa Iti in French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on the evening\r\n // of the 30th, the second night of Rosh Chodesh. The 3rd day after the molad will be on the 4th of the month.\r\n // In the case of Anadyr, Russia on Jan, 2071, when sof zman kiddush levana is on the 17th of the month, the 3rd day\r\n // from the molad will be on the 5th day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() > 5 && jewishCalendar.getJewishDayOfMonth() < 30) {\r\n return null;\r\n }\r\n\r\n let zman: Temporal.ZonedDateTime | null = this.getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), alos, tzais, true);\r\n\r\n // Get the following month's zman kiddush Levana for the extreme case of Rapa Iti in French Polynesia on Dec 2027 when\r\n // kiddush Levana can be said on Rosh Chodesh (the evening of the 30th). See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (page 32)\r\n if (zman === null && jewishCalendar.getJewishDayOfMonth() === 30) {\r\n jewishCalendar.forward(Calendar.MONTH, 1);\r\n zman = this.getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), null, null, true);\r\n }\r\n\r\n return zman;\r\n }\r\n\r\n /**\r\n * Returns the point in time of Molad as a Date
Object. For the traditional day of week, hour,\r\n * minute and chalakim, {@link JewishCalendar#getMoladAsDate()} and the not yet completed\r\n * {@link HebrewDateFormatter} that will have formatting for this.\r\n * \r\n * @return the Date representing the moment of the molad. If the molad does not occur on this day, a null will be returned.\r\n * \r\n * @see #getTchilasZmanKidushLevana3Days()\r\n * @see #getTchilasZmanKidushLevana7Days(Date, Date)\r\n * @see JewishCalendar#getMoladAsDate()\r\n */\r\n public getZmanMolad(): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n\r\n // Optimize to not calculate for impossible dates, but account for extreme cases. The molad in the extreme case of Rapa\r\n // Iti in French Polynesia on Dec 2027 occurs on the night of the 27th of Kislev. In the case of Anadyr, Russia on\r\n // Jan 2071, the molad will be on the 2nd day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() > 2 && jewishCalendar.getJewishDayOfMonth() < 27) {\r\n return null;\r\n }\r\n\r\n let molad: Temporal.ZonedDateTime | null = this.getMoladBasedTime(jewishCalendar.getMoladAsDate(), null, null, true);\r\n\r\n // deal with molad that happens on the end of the previous month\r\n if (molad === null && jewishCalendar.getJewishDayOfMonth() > 26) {\r\n jewishCalendar.setDate(jewishCalendar.getDate().add({ months: 1 }))\r\n molad = this.getMoladBasedTime(jewishCalendar.getMoladAsDate(), null, null, true);\r\n }\r\n return molad;\r\n }\r\n\r\n /**\r\n * Used by Molad based zmanim to determine if zmanim occur during the current day.\r\n * @see #getMoladBasedTime(Date, Date, Date, boolean)\r\n * @return previous midnight\r\n */\r\n private getMidnightLastNight(): Temporal.ZonedDateTime {\r\n // reset hour, minutes, seconds and millis\r\n return this.getDate().toZonedDateTime(this.getGeoLocation().getTimeZone()).with({\r\n hour: 0,\r\n minute: 0,\r\n second: 0,\r\n millisecond: 0,\r\n });\r\n }\r\n\r\n /**\r\n * Used by Molad based zmanim to determine if zmanim occur during the current day.\r\n * @see #getMoladBasedTime(Date, Date, Date, boolean)\r\n * @return following midnight\r\n */\r\n private getMidnightTonight(): Temporal.ZonedDateTime {\r\n return this.getDate().toZonedDateTime(this.getGeoLocation().getTimeZone())\r\n .add({ days: 1 })\r\n .with({\r\n hour: 0,\r\n minute: 0,\r\n second: 0,\r\n millisecond: 0,\r\n });\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana according to the opinions that it should not be said until 7\r\n * days after the molad. If the time of tchilas zman Kiddush Levana occurs during the day (between\r\n * {@link ZmanimCalendar#getAlos72() alos} and {@link ZmanimCalendar#getTzais72() tzais}) it\r\n * return the next tzais.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos\r\n * and ending at tzais), the time returned will be tzais. If either the alos or\r\n * tzais parameters are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and\r\n * ending at tzais), the time returned will be tzais. If either the alos or\r\n * tzais parameters are null, no daytime adjustment will be made.\r\n *\r\n * @return the Date representing the moment 7 days after the molad. If the time occurs between alos and\r\n * tzais, tzais will be returned\r\n * @see #getTchilasZmanKidushLevana3Days(Date, Date)\r\n * @see #getTchilasZmanKidushLevana7Days()\r\n * @see JewishCalendar#getTchilasZmanKidushLevana7Days()\r\n */\r\n public getTchilasZmanKidushLevana7Days(alos: Temporal.ZonedDateTime | null = null, tzais: Temporal.ZonedDateTime | null = null): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n\r\n // Optimize to not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 7 days for\r\n // the extreme case of Rapa Iti in French Polynesia on Jan 2028 (when kiddush Levana 3 days can be said on the evening\r\n // of the 30th, the second night of Rosh Chodesh), the 7th day after the molad will be on the 4th of the month.\r\n // In the case of Anadyr, Russia on Jan, 2071, when sof zman kiddush levana is on the 17th of the month, the 7th day\r\n // from the molad will be on the 9th day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() < 4 || jewishCalendar.getJewishDayOfMonth() > 9) {\r\n return null;\r\n }\r\n\r\n return this.getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana7Days(), alos, tzais, true);\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to\r\n * the opinion of theGRA. This time is identical to the {@link\r\n * #getSofZmanTfilaGRA() Sof zman tfilah GRA} and is provided as a convenience method for those who are\r\n * unaware how this zman is calculated. This time is 4 hours into the day based on the opinion of the\r\n * GRA that the day is calculated from sunrise to sunset.\r\n * This returns the time 4 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea level sunrise}.\r\n * \r\n * @see ZmanimCalendar#getShaahZmanisGra()\r\n * @see ZmanimCalendar#getSofZmanTfilaGRA()\r\n * @return the Date
one is allowed eating chametz on Erev Pesach. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does\r\n * not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanAchilasChametzGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaGRA();\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the\r\n * opinion of the Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is identical to the\r\n * {@link #getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link #getShaahZmanisMGA()\r\n * shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of the MGA that the day is\r\n * calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link #getTzais72() nightfall} of 72 minutes\r\n * after sunset. This returns the time of 4 * {@link #getShaahZmanisMGA()} after {@link #getAlos72() dawn}.\r\n * \r\n * @return the Date
of the latest time of eating chametz. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set), a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanisMGA()\r\n * @see #getAlos72()\r\n * @see #getSofZmanTfilaMGA72Minutes()\r\n */\r\n public getSofZmanAchilasChametzMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaMGA72Minutes();\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the\r\n * opinion of theMagen Avraham (MGA) based on alos\r\n * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time is 4 {@link\r\n * #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees() dawn}\r\n * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1°\r\n * below sunrise or sunset. This returns the time of 4 {@link #getShaahZmanis16Point1Degrees()} after\r\n * {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest time of eating chametz. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getSofZmanTfilaMGA16Point1Degrees()\r\n */\r\n public getSofZmanAchilasChametzMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaMGA16Point1Degrees();\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion\r\n * of the GRA. This time is 5 hours into the day based on the\r\n * opinion of the GRA that the day is calculated from\r\n * sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea\r\n * level sunrise}.\r\n * \r\n * @see ZmanimCalendar#getShaahZmanisGra()\r\n * @return the Date
of the latest time for burning chametz on Erev Pesach. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanBiurChametzGRA(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset(), 5);\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of\r\n * the Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 5 {@link\r\n * #getShaahZmanisMGA() shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of\r\n * the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link\r\n * #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link #getShaahZmanisMGA()} after\r\n * {@link #getAlos72() dawn}.\r\n * \r\n * @return the Date
of the latest time for burning chametz on Erev Pesach. If the calculation\r\n * 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,\r\n * and one where it does not set), a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanisMGA()\r\n * @see #getAlos72()\r\n */\r\n public getSofZmanBiurChametzMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getAlos72()!, this.getTzais72()!, 5);\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion\r\n * of the Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time is 5\r\n * {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees()\r\n * dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1°\r\n * below sunrise or sunset. This returns the time of 5 {@link #getShaahZmanis16Point1Degrees()} after\r\n * {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest time for burning chametz on Erev Pesach. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of the\r\n * Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a null\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n */\r\n public getSofZmanBiurChametzMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees(), 5);\r\n }\r\n\r\n /**\r\n * A method that returns the Baal Hatanya's\r\n * netz amiti (sunrise) without {@link AstronomicalCalculator#getElevationAdjustment(double)\r\n * elevation adjustment}. This forms the base for the Baal Hatanya's dawn-based calculations that are\r\n * calculated as a dip below the horizon before sunrise.\r\n *\r\n * According to the Baal Hatanya, netz amiti, or true (halachic) sunrise, is when the top of the sun's\r\n * disk is visible at an elevation similar to the mountains of Eretz Yisrael. The time is calculated as the point at which\r\n * the center of the sun's disk is 1.583° below the horizon. This degree-based calculation can be found in Rabbi Shalom\r\n * DovBer Levine's commentary on The Baal\r\n * Hatanya's Seder Hachnasas Shabbos. From an elevation of 546 meters, the top of Har Hacarmel, the sun disappears when it is 1° 35' or 1.583°\r\n * below the sea level horizon. This in turn is based on the Gemara Shabbos 35a. There are other opinions brought down by\r\n * Rabbi Levine, including Rabbi Yosef Yitzchok Feigelstock who calculates it as the degrees below the horizon 4 minutes after\r\n * sunset in Yerushalayim (on the equinox). That is brought down as 1.583°. This is identical to the 1° 35' zman\r\n * and is probably a typo and should be 1.683°. These calculations are used by most Chabad calendars that use the Baal Hatanya's zmanim. See\r\n * About Our\r\n * Zmanim Calculations @ Chabad.org.\r\n *\r\n * Note: netz amiti is used only for calculating certain zmanim, and is intentionally unpublished. For\r\n * practical purposes, daytime mitzvos like shofar and lulav should not be done until after the\r\n * published time for netz / sunrise.\r\n * \r\n * @return the Date
representing the exact sea-level netz amiti (sunrise) time. If the calculation can't be\r\n * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the page.\r\n * \r\n * @see #getSunrise()\r\n * @see #getSeaLevelSunrise()\r\n * @see #getSunsetBaalHatanya()\r\n * @see #ZENITH_1_POINT_583\r\n */\r\n private getSunriseBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_1_POINT_583);\r\n }\r\n\r\n /**\r\n * A method that returns the Baal Hatanya's\r\n * shkiah amiti (sunset) without {@link AstronomicalCalculator#getElevationAdjustment(double)\r\n * elevation adjustment}. This forms the base for the Baal Hatanya's dusk-based calculations that are calculated\r\n * as a dip below the horizon after sunset.\r\n * \r\n * According to the Baal Hatanya, shkiah amiti, true (halachic) sunset, is when the top of the \r\n * sun's disk disappears from view at an elevation similar to the mountains of Eretz Yisrael.\r\n * This time is calculated as the point at which the center of the sun's disk is 1.583 degrees below the horizon.\r\n *\r\n * Note: shkiah amiti is used only for calculating certain zmanim, and is intentionally unpublished. For\r\n * practical purposes, all daytime mitzvos should be completed before the published time for shkiah / sunset.\r\n *\r\n * For further explanation of the calculations used for the Baal Hatanya's zmanim in this library, see\r\n * About Our\r\n * Zmanim Calculations @ Chabad.org.\r\n * \r\n * @return the Date
representing the exact sea-level shkiah amiti (sunset) time. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getSunset()\r\n * @see #getSeaLevelSunset()\r\n * @see #getSunriseBaalHatanya()\r\n * @see #ZENITH_1_POINT_583\r\n */\r\n private getSunsetBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_1_POINT_583);\r\n }\r\n\r\n /**\r\n * A method that returns the Baal Hatanya's\r\n * a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}). This forms the base for the\r\n * Baal Hatanya's day based calculations that are calculated as a 1.583° dip below the horizon after sunset. \r\n * According to the Baal Hatanya, shkiah amiti, true (halachic) sunset, is when the top of the \r\n * sun's disk disappears from view at an elevation similar to the mountains of Eretz Yisrael.\r\n * This time is calculated as the point at which the center of the sun's disk is 1.583 degrees below the horizon.\r\n * A method that returns a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}) calculated \r\n * based on the Baal Hatanya's netz\r\n * amiti and shkiah amiti using a dip of 1.583° below the sea level horizon. This calculation divides\r\n * the day based on the opinion of the Baal Hatanya that the day runs from {@link #getSunriseBaalHatanya() netz amiti}\r\n * to {@link #getSunsetBaalHatanya() shkiah amiti}. The calculations are based on a day from {@link\r\n * #getSunriseBaalHatanya() sea level netz amiti} to {@link #getSunsetBaalHatanya() sea level shkiah amiti}.\r\n * The day is split into 12 equal parts with each one being a shaah zmanis. This method is similar to {@link\r\n * #getTemporalHour}, but all calculations are based on a sea level sunrise and sunset.\r\n * @return the long
millisecond length of a shaah zmanis calculated from\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)} to {@link #getSunsetBaalHatanya() shkiah amiti\r\n * (\"real\" sunset)}. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a\r\n * year where the sun does not rise, and one where it does not set, {@link Long#MIN_VALUE} will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getTemporalHour(Date, Date)\r\n * @see #getSunriseBaalHatanya()\r\n * @see #getSunsetBaalHatanya()\r\n * @see #ZENITH_1_POINT_583\r\n */\r\n public getShaahZmanisBaalHatanya() {\r\n return this.getTemporalHour(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * Returns the Baal Hatanya's alos\r\n * (dawn) calculated as the time when the sun is 16.9° below the eastern {@link #GEOMETRIC_ZENITH geometric horizon}\r\n * before {@link #getSunrise sunrise}. For more information the source of 16.9° see {@link #ZENITH_16_POINT_9}.\r\n * \r\n * @see #ZENITH_16_POINT_9\r\n * @return The Date
of dawn. If the calculation can't be computed such as northern and southern\r\n * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getAlosBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_16_POINT_9);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning). This time is 3\r\n * {@link #getShaahZmanisBaalHatanya() shaos zmaniyos} (solar hours) after {@link #getSunriseBaalHatanya() \r\n * netz amiti (sunrise)} based on the opinion of the Baal Hatanya that the day is calculated from\r\n * sunrise to sunset. This returns the time 3 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() \r\n * netz amiti (sunrise)}.\r\n * \r\n * @see ZmanimCalendar#getSofZmanShma(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @return the Date
of the latest zman shema according to the Baal Hatanya. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does\r\n * not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanShmaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfilah (time to recite the morning prayers). This time is 4\r\n * hours into the day based on the opinion of the Baal Hatanya that the day is\r\n * calculated from sunrise to sunset. This returns the time 4 * {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see ZmanimCalendar#getSofZmanTfila(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @return the Date
of the latest zman tfilah. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getSofZmanTfilaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the\r\n * opinion of the Baal Hatanya. This time is identical to the {@link #getSofZmanTfilaBaalHatanya() Sof zman tfilah\r\n * Baal Hatanya}. This time is 4 hours into the day based on the opinion of the Baal Hatanya that the day is calculated\r\n * from sunrise to sunset. This returns the time 4 {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getShaahZmanisBaalHatanya()\r\n * @see #getSofZmanTfilaBaalHatanya()\r\n * @return the Date
one is allowed eating chametz on Erev Pesach. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n * and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanAchilasChametzBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaBaalHatanya();\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of\r\n * the Baal Hatanya. This time is 5 hours into the day based on the opinion of the Baal Hatanya that the day is calculated\r\n * from sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getShaahZmanisBaalHatanya()\r\n * @return the Date
of the latest time for burning chametz on Erev Pesach. If the calculation\r\n * 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,\r\n * and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanBiurChametzBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya(), 5)\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola. Mincha gedola is the earliest time one can pray\r\n * mincha. The Rambam is of the opinion that it is\r\n * better to delay mincha until {@link #getMinchaKetanaBaalHatanya() mincha ketana} while the\r\n * Ra\"sh,\r\n * Tur, GRA and others are of the opinion that mincha can be prayed\r\n * lechatchila starting at mincha gedola. This is calculated as 6.5 {@link #getShaahZmanisBaalHatanya()\r\n * sea level solar hours} after {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. This calculation is based\r\n * on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time 6.5\r\n * * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() netz amiti (\"real\" sunrise)}.\r\n * \r\n * @see #getMinchaGedola(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @see #getMinchaKetanaBaalHatanya()\r\n * @return the Date
of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaGedolaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaGedola(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * This is a convenience method that returns the later of {@link #getMinchaGedolaBaalHatanya()} and\r\n * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisBaalHatanya()\r\n * shaah zmanis} is less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise\r\n * {@link #getMinchaGedolaBaalHatanya()} will be returned.\r\n * \r\n * @return the Date
of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedolaBaalHatanyaGreaterThan30(): Temporal.ZonedDateTime | null {\r\n if (this.getMinchaGedola30Minutes() === null || this.getMinchaGedolaBaalHatanya() === null) {\r\n return null;\r\n }\r\n\r\n return [\r\n this.getMinchaGedola30Minutes()!,\r\n this.getMinchaGedolaBaalHatanya()!\r\n ].sort(rZTDsort)[0];\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana. This is the preferred earliest time to pray\r\n * mincha in the opinion of the Rambam and others.\r\n * For more information on this see the documentation on {@link #getMinchaGedolaBaalHatanya() mincha gedola}.\r\n * This is calculated as 9.5 {@link #getShaahZmanisBaalHatanya() sea level solar hours} after {@link #getSunriseBaalHatanya()\r\n * netz amiti (sunrise)}. This calculation is calculated based on the opinion of the Baal Hatanya that the\r\n * day is calculated from sunrise to sunset. This returns the time 9.5 * {@link #getShaahZmanisBaalHatanya()} after {@link\r\n * #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getMinchaKetana(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @see #getMinchaGedolaBaalHatanya()\r\n * @return the Date
of the time of mincha ketana. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaKetanaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha. This is calculated as 10.75 hours after sunrise. This\r\n * calculation is based on the opinion of the Baal Hatanya that the day is calculated\r\n * from sunrise to sunset. This returns the time 10.75 * {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getPlagHamincha(Date, Date)\r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHaminchaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * A method that returns tzais (nightfall) when the sun is 6° below the western geometric horizon\r\n * (90°) after {@link #getSunset sunset}. For information on the source of this calculation see\r\n * {@link #ZENITH_6_DEGREES}.\r\n *\r\n * @return The Date
of nightfall. If the calculation can't be computed such as northern and southern\r\n * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_6_DEGREES\r\n */\r\n public getTzaisBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_6_DEGREES);\r\n }\r\n\r\n /**\r\n * A utility methos to calculate zmanim based on Rav Moshe\r\n * Feinstein as calculated in MTJ, Yeshiva of Staten Island, and Camp Yeshiva\r\n * of Staten Island. The day is split in two, from alos / sunrise to fixed local chatzos, and the\r\n * second half of the day, from fixed local chatzos to sunset / tzais. Morning based times are calculated\r\n * based on the first 6 hours, and afternoon times based on the second half of the day.\r\n * \r\n * @param startOfHalfDay\r\n * The start of the half day. This would be alos or sunrise for morning based times and fixed\r\n * local chatzos for the second half of the day.\r\n * @param endOfHalfDay\r\n * The end of the half day. This would be fixed local chatzos for morning based times and sunset\r\n * or tzais for afternoon based times.\r\n * @param hours\r\n * the number of hours to offset the beginning of the first or second half of the day\r\n * \r\n * @return the Date
of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n *\r\n * @see ComplexZmanimCalendar#getFixedLocalChatzos()\r\n */\r\n public getFixedLocalChatzosBasedZmanim(startOfHalfDay: Temporal.ZonedDateTime, endOfHalfDay: Temporal.ZonedDateTime, hours: number): Temporal.ZonedDateTime | null {\r\n if (startOfHalfDay == null || endOfHalfDay == null) {\r\n return null;\r\n }\r\n const shaahZmanis = startOfHalfDay.until(endOfHalfDay).total('nanoseconds') / 6;\r\n return startOfHalfDay.add({ nanoseconds: Math.trunc(shaahZmanis * hours) });\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos18Degrees() 18°} and ends at {@link #getFixedLocalChatzos() fixed local\r\n * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after alos or half of this half-day.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos18Degrees()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA18DegreesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos18Degrees()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos16Point1Degrees() 16.1°} and ends at {@link #getFixedLocalChatzos() fixed local\r\n * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or half of this half-day.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos16Point1Degrees()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos90() 90 minutes before sunrise} and ends at {@link #getFixedLocalChatzos()\r\n * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or\r\n * half of this half-day.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos90()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA90MinutesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos90()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos72() 72 minutes before sunrise} and ends at {@link #getFixedLocalChatzos()\r\n * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or\r\n * half of this half-day.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA72MinutesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos72()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the GRA that the day is calculated from\r\n * sunrise to sunset, but calculated using the first half of the day only. The half a day starts at {@link #getSunrise()\r\n * sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman Shema is 3 shaos\r\n * zmaniyos (solar hours) after sunrise or half of this half-day.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getSunrise()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaGRASunriseToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getSunrise()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman tfila (zman tfilah (the latest time to recite the morning prayers))\r\n * according to the opinion of the GRA that the day is\r\n * calculated from sunrise to sunset, but calculated using the first half of the day only. The half a day starts at\r\n * {@link #getSunrise() sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman tefila\r\n * is 4 shaos zmaniyos (solar hours) after sunrise or 2/3 of this half-day.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getSunrise()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanTfilaGRASunriseToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getSunrise()!, this.getFixedLocalChatzos()!, 4);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of\r\n * the calculation of mincha gedola, the earliest time one can pray mincha GRAthat is 30 minutes after {@link #getFixedLocalChatzos() fixed\r\n * local chatzos}.\r\n * \r\n * @return the Date
of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getMinchaGedola()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset\r\n */\r\n public getMinchaGedolaGRAFixedLocalChatzos30Minutes() {\r\n return this.getFixedLocalChatzos()?.add({ minutes: 30 });\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion\r\n * of the calculation of mincha ketana (the preferred time to recite the mincha prayers according to\r\n * the opinion of the Rambam and others) calculated according\r\n * to the GRA that is 3.5 shaos zmaniyos (solar\r\n * hours) after {@link #getFixedLocalChatzos() fixed local chatzos}.\r\n * \r\n * @return the Date
of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getMinchaGedola()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes\r\n */\r\n public getMinchaKetanaGRAFixedLocalChatzosToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getFixedLocalChatzos()!, this.getSunset()!, 3.5);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion\r\n * of the calculation of plag hamincha. This method returns plag hamincha calculated according to the\r\n * GRA that the day ends at sunset and is 4.75 shaos\r\n * zmaniyos (solar hours) after {@link #getFixedLocalChatzos() fixed local chatzos}.\r\n * \r\n * @return the Date
of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getPlagHamincha()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset\r\n * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes\r\n */\r\n public getPlagHaminchaGRAFixedLocalChatzosToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getFixedLocalChatzos()!, this.getSunset()!, 4.75);\r\n }\r\n \r\n /**\r\n * Method to return tzais (dusk) calculated as 50 minutes after sea level sunset. This method returns\r\n * tzais (nightfall) based on the opinion of Rabbi Moshe Feinstein for the New York area. This time should\r\n * not be used for latitudes different than the NY area.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getTzais50() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 50 });\r\n }\r\n \r\n /**\r\n * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before\r\n * {@link #getMinchaKetana()} or is 9 * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link\r\n * #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()}\r\n * setting), calculated according to the GRA using a day starting at\r\n * sunrise and ending at sunset. This is the time that eating or other activity can't begin prior to praying mincha.\r\n * The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos\r\n * 16.1°}. See the Mechaber and Mishna Berurah\r\n * 232 for details.\r\n * \r\n * @see #getShaahZmanisGra()\r\n * @see #getSamuchLeMinchaKetana16Point1Degrees()\r\n * @return the Date
of the time of samuch lemincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSamuchLeMinchaKetanaGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSamuchLeMinchaKetana(this.getElevationAdjustedSunrise()!, this.getElevationAdjustedSunset()!);\r\n }\r\n \r\n /**\r\n * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before\r\n * {@link #getMinchaGedola16Point1Degrees()} or 9 * shaos zmaniyos (temporal hours) after the start of the day,\r\n * calculated using a day starting and ending 16.1° below the horizon. This is the time that eating or other activity\r\n * can't begin prior to praying mincha. The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after\r\n * {@link #getAlos16Point1Degrees() alos 16.1°}. See the Mechaber and Mishna Berurah 232.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @return the Date
of the time of samuch lemincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSamuchLeMinchaKetana16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSamuchLeMinchaKetana(this.getAlos16Point1Degrees()!, this.getTzais16Point1Degrees()!);\r\n }\r\n \r\n /**\r\n * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before\r\n * {@link #getMinchaKetana72Minutes()} or 9 * shaos zmaniyos (temporal hours) after the start of the day,\r\n * calculated using a day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the time that eating\r\n * or other activity can't begin prior to praying mincha. The calculation used is 9 * {@link\r\n * #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos 16.1°}. See the Mechaber and Mishna Berurah 232.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @return the Date
of the time of samuch lemincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSamuchLeMinchaKetana72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSamuchLeMinchaKetana(this.getAlos72()!, this.getTzais72()!);\r\n }\r\n\r\n // eslint-disable-next-line class-methods-use-this\r\n public getClassName() {\r\n return 'com.kosherjava.zmanim.ComplexZmanimCalendar';\r\n }\r\n}\r\n", "import { UnsupportedError } from '../polyfills/errors.ts';\r\n\r\n/**\r\n * A class that represents a numeric time. Times that represent a time of day are stored as {@link java.util.Date}s in\r\n * this API. The time class is used to represent numeric time such as the time in hours, minutes, seconds and\r\n * milliseconds of a {@link AstronomicalCalendar#getTemporalHour() temporal hour}.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2011\r\n * @version 0.9.0\r\n */\r\n\r\nexport class Time {\r\n /** milliseconds in a second. */\r\n private static readonly SECOND_MILLIS: number = 1000;\r\n\r\n /** milliseconds in a minute. */\r\n private static readonly MINUTE_MILLIS: number = Time.SECOND_MILLIS * 60;\r\n\r\n /** milliseconds in an hour. */\r\n private static readonly HOUR_MILLIS: number = Time.MINUTE_MILLIS * 60;\r\n\r\n /**\r\n * @see #getHours()\r\n */\r\n private hours: number = 0;\r\n\r\n /**\r\n * @see #getMinutes()\r\n */\r\n private minutes: number = 0;\r\n\r\n /**\r\n * @see #getSeconds()\r\n */\r\n private seconds: number = 0;\r\n\r\n /**\r\n * @see #getMilliseconds()\r\n */\r\n private milliseconds: number = 0;\r\n\r\n /**\r\n * @see #isNegative()\r\n * @see #setIsNegative(boolean)\r\n */\r\n private negative: boolean = false;\r\n\r\n /**\r\n * Constructor with parameters for the hours, minutes, seconds and millisecods.\r\n *\r\n * @param hours the hours to set\r\n * @param minutes the minutes to set\r\n * @param seconds the seconds to set\r\n * @param milliseconds the milliseconds to set\r\n */\r\n constructor(hours: number, minutes: number, seconds: number, milliseconds: number);\r\n /**\r\n * A constructor that sets the time by milliseconds. The milliseconds are converted to hours, minutes, seconds\r\n * and milliseconds. If the milliseconds are negative it will call {@link #setIsNegative(boolean)}.\r\n * @param millis the milliseconds to set.\r\n */\r\n constructor(millis: number);\r\n /**\r\n * A constructor with 2 overloads:\r\n * - A constructor that sets the time by milliseconds.\r\n * The milliseconds are converted to hours, minutes, seconds and milliseconds. If the\r\n * milliseconds are negative it will call {@link #setIsNegative(boolean)}.\r\n * - A constructor with parameters for the hours, minutes, seconds and millisecods.\r\n * @param hoursOrMillis\r\n * @param minutes\r\n * @param seconds\r\n * @param milliseconds\r\n */\r\n constructor(hoursOrMillis: number, minutes?: number, seconds: number = 0, milliseconds: number = 0) {\r\n if (minutes) {\r\n this.hours = hoursOrMillis;\r\n this.minutes = minutes;\r\n this.seconds = seconds;\r\n this.milliseconds = milliseconds;\r\n } else {\r\n let adjustedMillis: number = hoursOrMillis;\r\n if (adjustedMillis < 0) {\r\n this.negative = true;\r\n adjustedMillis = Math.abs(adjustedMillis);\r\n }\r\n this.hours = Math.trunc(adjustedMillis / Time.HOUR_MILLIS);\r\n adjustedMillis = adjustedMillis - this.hours * Time.HOUR_MILLIS;\r\n\r\n this.minutes = Math.trunc(adjustedMillis / Time.MINUTE_MILLIS);\r\n adjustedMillis = adjustedMillis - this.minutes * Time.MINUTE_MILLIS;\r\n\r\n this.seconds = Math.trunc(adjustedMillis / Time.SECOND_MILLIS);\r\n adjustedMillis = adjustedMillis - this.seconds * Time.SECOND_MILLIS;\r\n\r\n this.milliseconds = adjustedMillis;\r\n }\r\n }\r\n\r\n /*\r\n public Time(millis: number) {\r\n this((int) millis);\r\n }\r\n\r\n public Time(millis: number) {\r\n adjustedMillis: number = millis;\r\n if (adjustedMillis < 0) {\r\n this.isNegative = true;\r\n adjustedMillis = Math.abs(adjustedMillis);\r\n }\r\n this.hours = adjustedMillis / HOUR_MILLIS;\r\n adjustedMillis = adjustedMillis - this.hours * HOUR_MILLIS;\r\n\r\n this.minutes = adjustedMillis / MINUTE_MILLIS;\r\n adjustedMillis = adjustedMillis - this.minutes * MINUTE_MILLIS;\r\n\r\n this.seconds = adjustedMillis / SECOND_MILLIS;\r\n adjustedMillis = adjustedMillis - this.seconds * SECOND_MILLIS;\r\n\r\n this.milliseconds = adjustedMillis;\r\n }\r\n */\r\n\r\n /**\r\n * Does the time represent a negative time 9such as using this to subtract time from another Time.\r\n * @return if the time is negative.\r\n */\r\n public isNegative(): boolean {\r\n return this.negative;\r\n }\r\n\r\n /**\r\n * Set this to represent a negative time.\r\n * @param isNegative that the Time represents negative time\r\n */\r\n public setIsNegative(isNegative: boolean): void {\r\n this.negative = isNegative;\r\n }\r\n\r\n /**\r\n * @return Returns the hour.\r\n */\r\n public getHours(): number {\r\n return this.hours;\r\n }\r\n\r\n /**\r\n * @param hours\r\n * The hours to set.\r\n */\r\n public setHours(hours: number): void {\r\n this.hours = hours;\r\n }\r\n\r\n /**\r\n * @return Returns the minutes.\r\n */\r\n public getMinutes(): number {\r\n return this.minutes;\r\n }\r\n\r\n /**\r\n * @param minutes\r\n * The minutes to set.\r\n */\r\n public setMinutes(minutes: number): void {\r\n this.minutes = minutes;\r\n }\r\n\r\n /**\r\n * @return Returns the seconds.\r\n */\r\n public getSeconds(): number {\r\n return this.seconds;\r\n }\r\n\r\n /**\r\n * @param seconds\r\n * The seconds to set.\r\n */\r\n public setSeconds(seconds: number): void {\r\n this.seconds = seconds;\r\n }\r\n\r\n /**\r\n * @return Returns the milliseconds.\r\n */\r\n public getMilliseconds(): number {\r\n return this.milliseconds;\r\n }\r\n\r\n /**\r\n * @param milliseconds\r\n * The milliseconds to set.\r\n */\r\n public setMilliseconds(milliseconds: number): void {\r\n this.milliseconds = milliseconds;\r\n }\r\n\r\n /**\r\n * Returns the time in milliseconds by converting hours, minutes and seconds into milliseconds.\r\n * @return the time in milliseconds\r\n */\r\n public getTime(): number {\r\n return this.hours * Time.HOUR_MILLIS + this.minutes * Time.MINUTE_MILLIS + this.seconds * Time.SECOND_MILLIS\r\n + this.milliseconds;\r\n }\r\n\r\n /**\r\n * @deprecated This depends on a circular dependency. Use new ZmanimFormatter(TimeZone.getTimeZone(\"UTC\")).format(time)instead.\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toString(): string {\r\n throw new UnsupportedError('This method is deprecated, due to the fact that it depends on a circular dependency. '\r\n + 'Use `new ZmanimFormatter(TimeZone.getTimeZone(\\'UTC\\')).format(time)` instead');\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { IntegerUtils, StringUtils } from '../polyfills/Utils.ts';\r\n\r\n/**\r\n * A wrapper class for a astronomical times / zmanim that is mostly intended to allow sorting collections of astronomical times.\r\n * It has fields for both date/time and duration based zmanim, name / labels as well as a longer description or explanation of a\r\n * zman.\r\n *\r\n * Here is an example of various ways of sorting zmanim.\r\n *
First create the Calendar for the location you would like to calculate:\r\n *\r\n *
\r\n * String locationName = "Lakewood, NJ";\r\n * double latitude = 40.0828; // Lakewood, NJ\r\n * double longitude = -74.2094; // Lakewood, NJ\r\n * double elevation = 20; // optional elevation correction in Meters\r\n * // the String parameter in getTimeZone() has to be a valid timezone listed in {@link java.util.TimeZone#getAvailableIDs()}\r\n * TimeZone timeZone = TimeZone.getTimeZone("America/New_York");\r\n * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);\r\n * ComplexZmanimCalendar czc = new ComplexZmanimCalendar(location);\r\n * Zman sunset = new Zman(czc.getSunset(), \"Sunset\");\r\n * Zman shaah16 = new Zman(czc.getShaahZmanis16Point1Degrees(), \"Shaah zmanis 16.1\");\r\n * Zman sunrise = new Zman(czc.getSunrise(), \"Sunrise\");\r\n * Zman shaah = new Zman(czc.getShaahZmanisGra(), \"Shaah zmanis GRA\");\r\n * ArrayList<Zman> zl = new ArrayList<Zman>();\r\n * zl.add(sunset);\r\n * zl.add(shaah16);\r\n * zl.add(sunrise);\r\n * zl.add(shaah);\r\n * //will sort sunset, shaah 1.6, sunrise, shaah GRA\r\n * System.out.println(zl);\r\n * Collections.sort(zl, Zman.DATE_ORDER);\r\n * // will sort sunrise, sunset, shaah, shaah 1.6 (the last 2 are not in any specific order)\r\n * Collections.sort(zl, Zman.DURATION_ORDER);\r\n * // will sort sunrise, sunset (the first 2 are not in any specific order), shaah GRA, shaah 1.6\r\n * Collections.sort(zl, Zman.NAME_ORDER);\r\n * // will sort shaah 1.6, shaah GRA, sunrise, sunset\r\n *\r\n *\r\n * @author © Eliyahu Hershfeld 2007-2020\r\n * @todo Add secondary sorting. As of now the {@code Comparator}s in this class do not sort by secondary order. This means that when sorting a\r\n * {@link java.util.Collection} of zmanim and using the {@link #DATE_ORDER} {@code Comparator} will have the duration based zmanim\r\n * at the end, but they will not be sorted by duration. This should be N/A for label based sorting.\r\n */\r\nexport class Zman {\r\n /**\r\n * The name / label of the zman.\r\n */\r\n label: string | null;\r\n\r\n /**\r\n * The {@link Date} of the zman\r\n */\r\n zman?: Temporal.ZonedDateTime;\r\n\r\n /**\r\n * The duration if the zman is a {@link AstronomicalCalendar#getTemporalHour() temporal hour} (or the various\r\n * shaah zmanis base times such as {@link ZmanimCalendar#getShaahZmanisGra() shaah Zmanis GRA} or\r\n * {@link ComplexZmanimCalendar#getShaahZmanis16Point1Degrees() shaah Zmanis 16.1°}).\r\n */\r\n duration?: number;\r\n\r\n /**\r\n * A longer description or explanation of a zman.\r\n */\r\n description?: string;\r\n\r\n /**\r\n * The constructor setting a {@link Date} based zman and a label.\r\n * @param date the Date of the zman.\r\n * @param label the label of the zman such as \"Sof Zman Krias Shema GRA\".\r\n * @see #Zman(long, String)\r\n */\r\n constructor(date: Temporal.ZonedDateTime, label: string | null);\r\n /**\r\n * The constructor setting a duration based zman such as\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour} (or the various shaah zmanis times such as\r\n * {@link ZmanimCalendar#getShaahZmanisGra() shaah zmanis GRA} or\r\n * {@link ComplexZmanimCalendar#getShaahZmanis16Point1Degrees() shaah Zmanis 16.1°}) and label.\r\n * @param duration a duration based zman such as ({@link AstronomicalCalendar#getTemporalHour()}\r\n * @param label the label of the zman such as \"Shaah Zmanis GRA\".\r\n * @see #Zman(Date, String)\r\n */\r\n constructor(duration: number, label: string | null);\r\n constructor(dateOrDuration: number | Temporal.ZonedDateTime, label: string | null) {\r\n this.label = label;\r\n if (dateOrDuration instanceof Temporal.ZonedDateTime) {\r\n this.zman = dateOrDuration;\r\n } else if (typeof dateOrDuration === 'number') {\r\n this.duration = dateOrDuration;\r\n }\r\n }\r\n\r\n /**\r\n * A {@link Comparator} that will compare and sort zmanim by date/time order. Compares its two arguments by the zman's date/time\r\n * order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater\r\n * than the second.\r\n * Please note that this class will handle cases where either the {@code Zman} is a null or {@link #getZman()} returns a null.\r\n */\r\n static compareDateOrder(zman1: Zman, zman2: Zman): number {\r\n const times = [zman1, zman2].map(zman => zman.zman) as [Temporal.ZonedDateTime, Temporal.ZonedDateTime];\r\n return Temporal.ZonedDateTime.compare(...times)\r\n }\r\n\r\n /**\r\n * A {@link Comparator} that will compare and sort zmanim by zmanim label order. Compares its two arguments by the zmanim label\r\n * name order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater\r\n * than the second.\r\n * Please note that this class will will sort cases where either the {@code Zman} is a null or {@link #label} returns a null\r\n * as empty {@code String}s.\r\n */\r\n static compareNameOrder(zman1: Zman, zman2: Zman): number {\r\n return StringUtils.compareTo(zman1.label || '', zman2.label || '');\r\n }\r\n\r\n /**\r\n * A {@link Comparator} that will compare and sort duration based zmanim such as\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour} (or the various shaah zmanis times\r\n * such as {@link ZmanimCalendar#getShaahZmanisGra() shaah zmanis GRA} or\r\n * {@link ComplexZmanimCalendar#getShaahZmanis16Point1Degrees() shaah zmanis 16.1°}). Returns a negative\r\n * integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.\r\n * Please note that this class will will sort cases where {@code Zman} is a null.\r\n */\r\n static compareDurationOrder(zman1: Zman, zman2: Zman): number {\r\n return IntegerUtils.compare(zman1.duration || 0, zman2.duration || 0);\r\n }\r\n\r\n toString(): string {\r\n return (`\\nLabel:\\t\\t\\t${this.label}`)\r\n .concat(`\\nZman:\\t\\t\\t${this.zman}`)\r\n .concat(`\\nDuration:\\t\\t\\t${this.duration}`)\r\n .concat(`\\nDescription:\\t\\t\\t${this.description}`);\r\n }\r\n}\r\n\r\nexport type ZmanWithZmanDate = Zman & { zman: Temporal.ZonedDateTime };\r\nexport type ZmanWithDuration = Zman & { duration: number };\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { TimeZone, Utils, padZeros } from '../polyfills/Utils.ts';\r\nimport { Time } from './Time.ts';\r\nimport { AstronomicalCalendar } from '../AstronomicalCalendar.ts';\r\nimport { ZmanimCalendar } from '../ZmanimCalendar.ts';\r\nimport { ComplexZmanimCalendar } from '../ComplexZmanimCalendar.ts';\r\nimport { Zman, ZmanWithDuration, ZmanWithZmanDate } from './Zman.ts';\r\nimport { UnsupportedError } from '../polyfills/errors.ts';\r\n\r\nconst methodBlacklist =
String
\r\n */\r\n /*\r\n public format(milliseconds: number): string {\r\n return this.format(milliseconds);\r\n }\r\n */\r\n\r\n /**\r\n * A method that formats milliseconds into a time format.\r\n *\r\n * @param millis\r\n * The time in milliseconds.\r\n * @return String The formatted String
\r\n */\r\n\r\n /*\r\n public format(millis: number): string {\r\n return format(new Time(millis));\r\n }\r\n */\r\n\r\n /**\r\n * A method that formats {@link Time}objects.\r\n *\r\n * @param time\r\n * The time Object
to be formatted.\r\n * @return String The formatted String
\r\n */\r\n public format(timeOrMillis: Time | number): string {\r\n let time: Time;\r\n if (timeOrMillis instanceof Time) {\r\n time = timeOrMillis as Time;\r\n } else {\r\n time = new Time(timeOrMillis as number);\r\n }\r\n\r\n if (this.timeFormat === ZmanimFormatter.XSD_DURATION_FORMAT) {\r\n return ZmanimFormatter.formatXSDDurationTime(time);\r\n }\r\n let sb: string = padZeros(time.getHours(), this.hourNF)\r\n .concat(':')\r\n .concat(padZeros(time.getMinutes(), ZmanimFormatter.minuteSecondNF));\r\n if (this.useSeconds) {\r\n sb = sb.concat(':')\r\n .concat(padZeros(time.getSeconds(), ZmanimFormatter.minuteSecondNF));\r\n }\r\n if (this.useMillis) {\r\n sb = sb.concat('.')\r\n .concat(padZeros(time.getMilliseconds(), ZmanimFormatter.milliNF));\r\n }\r\n return sb;\r\n }\r\n\r\n /**\r\n * Formats a date using this class's {@link #getDateFormat() date format}.\r\n *\r\n * @param dateTime - the date to format\r\n * @return the formatted String\r\n */\r\n public formatDateTime(dateTime: Temporal.ZonedDateTime): string {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n const _dateTime = dateTime.with({ timeZone: this.getTimeZone() });\r\n\r\n // @ts-ignore\r\n return _dateTime.toLocaleString(...this.dateFormat);\r\n }\r\n\r\n /**\r\n * The date:date-time function returns the current date and time as a date/time string. The date/time string that's\r\n * returned must be a string in the format defined as the lexical representation of xs:dateTime in [3.3.8 dateTime] of [XML Schema 1.1 Part 2: Datatypes]. The date/time format is\r\n * basically CCYY-MM-DDThh:mm:ss, although implementers should consult [XML Schema 1.1 Part 2: Datatypes] and [ISO 8601] for details. The date/time string format must include a\r\n * time zone, either a Z to indicate Coordinated Universal Time or a + or - followed by the difference between the\r\n * difference from UTC represented as hh:mm.\r\n * @param dateTime - the UTC Date Object\r\n * @return the XSD dateTime\r\n */\r\n public getXSDateTime(dateTime: Temporal.ZonedDateTime): string {\r\n return dateTime.with({ timeZone: this.getTimeZone() }).toString();\r\n }\r\n\r\n /**\r\n * Represent the hours and minutes with two-digit strings.\r\n *\r\n * @param digits\r\n * hours or minutes.\r\n * @return two-digit String representation of hrs or minutes.\r\n */\r\n private static formatDigits(digits: number): string {\r\n const dd: string = Math.abs(digits).toString();\r\n return dd.length === 1 ? `0${dd}` : dd;\r\n }\r\n\r\n /**\r\n * This returns the xml representation of an xsd:duration object.\r\n *\r\n * @param millis\r\n * the duration in milliseconds\r\n * @return the xsd:duration formatted String\r\n */\r\n\r\n /*\r\n public formatXSDDurationTime(millis: number): string {\r\n return formatXSDDurationTime(new Time(millis));\r\n }\r\n */\r\n\r\n /**\r\n * This returns the xml representation of an xsd:duration object.\r\n *\r\n * @param time\r\n * the duration as a Time object\r\n * @return the xsd:duration formatted String\r\n */\r\n public static formatXSDDurationTime(timeOrMillis: Time | number): string {\r\n let time: Time;\r\n if (timeOrMillis instanceof Time) {\r\n time = timeOrMillis as Time;\r\n } else {\r\n time = new Time(timeOrMillis as number);\r\n }\r\n\r\n let duration: string;\r\n if (time.getHours() !== 0 || time.getMinutes() !== 0 || time.getSeconds() !== 0 || time.getMilliseconds() !== 0) {\r\n duration = 'P'.concat('T');\r\n\r\n if (time.getHours() !== 0) duration = duration.concat(`${time.getHours()}H`);\r\n\r\n if (time.getMinutes() !== 0) duration = duration.concat(`${time.getMinutes()}M`);\r\n\r\n if (time.getSeconds() !== 0 || time.getMilliseconds() !== 0) {\r\n duration = duration.concat(`${time.getSeconds()}.${padZeros(time.getMilliseconds(), ZmanimFormatter.milliNF)}`);\r\n duration = duration.concat('S');\r\n }\r\n\r\n if (duration.length === 1) duration.concat('T0S'); // zero seconds\r\n\r\n if (time.isNegative()) {\r\n duration = '-' + duration;\r\n }\r\n }\r\n return duration!.toString();\r\n }\r\n\r\n public static formatDecimal(num: number): string {\r\n const hasDecimal = num - Math.trunc(num) > 0;\r\n return hasDecimal ? num.toString() : num.toFixed(1);\r\n }\r\n\r\n /**\r\n * A method that returns an XML formatted String
representing the serialized Object
. The\r\n * format used is:\r\n *\r\n * \r\n * <AstronomicalTimes date="1969-02-08" type="AstronomicalCalendar algorithm="US Naval Almanac Algorithm" location="Lakewood, NJ" latitude="40.095965" longitude="-74.22213" elevation="31.0" timeZoneName="Eastern Standard Time" timeZoneID="America/New_York" timeZoneOffset="-5">\r\n * <Sunrise>2007-02-18T06:45:27-05:00</Sunrise>\r\n * <TemporalHour>PT54M17.529S</TemporalHour>\r\n * ...\r\n * </AstronomicalTimes>\r\n *\r\n *\r\n * Note that the output uses the xsd:dateTime format for\r\n * times such as sunrise, and xsd:duration format for\r\n * times that are a duration such as the length of a\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour}. The output of this method is\r\n * returned by the {@link #toString() toString}.\r\n *\r\n * @param astronomicalCalendar the AstronomicalCalendar Object\r\n *\r\n * @return The XML formatted
String
. The format will be:\r\n *\r\n * \r\n * <AstronomicalTimes date="1969-02-08" type="AstronomicalCalendar algorithm="US Naval Almanac Algorithm" location="Lakewood, NJ" latitude="40.095965" longitude="-74.22213" elevation="31.0" timeZoneName="Eastern Standard Time" timeZoneID="America/New_York" timeZoneOffset="-5">\r\n * <Sunrise>2007-02-18T06:45:27-05:00</Sunrise>\r\n * <TemporalHour>PT54M17.529S</TemporalHour>\r\n * ...\r\n * </AstronomicalTimes>\r\n *\r\n *\r\n * TODO: add proper schema, and support for nulls. XSD duration (for solar hours), should probably return\r\n * nil and not P\r\n * @deprecated\r\n */\r\n public static toXML(): void {\r\n throw new UnsupportedError('This method is not supported.');\r\n }\r\n\r\n /**\r\n * A method that returns a JSON formatted
String
representing the serialized Object
. The\r\n * format used is:\r\n * \r\n * {\r\n * "metadata":{\r\n * "date":"1969-02-08",\r\n * "type":"AstronomicalCalendar",\r\n * "algorithm":"US Naval Almanac Algorithm",\r\n * "location":"Lakewood, NJ",\r\n * "latitude":"40.095965",\r\n * "longitude":"-74.22213",\r\n * "elevation:"31.0",\r\n * "timeZoneName":"Eastern Standard Time",\r\n * "timeZoneID":"America/New_York",\r\n * "timeZoneOffset":"-5"},\r\n * "AstronomicalTimes":{\r\n * "Sunrise":"2007-02-18T06:45:27-05:00",\r\n * "TemporalHour":"PT54M17.529S"\r\n * ...\r\n * }\r\n * }\r\n *\r\n *\r\n * Note that the output uses the xsd:dateTime format for\r\n * times such as sunrise, and xsd:duration format for\r\n * times that are a duration such as the length of a\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour}.\r\n *\r\n * @param astronomicalCalendar the AstronomicalCalendar Object\r\n *\r\n * @return The JSON formatted
String
. The format will be:\r\n * \r\n * {\r\n * "metadata":{\r\n * "date":"1969-02-08",\r\n * "type":"AstronomicalCalendar",\r\n * "algorithm":"US Naval Almanac Algorithm",\r\n * "location":"Lakewood, NJ",\r\n * "latitude":"40.095965",\r\n * "longitude":"-74.22213",\r\n * "elevation:"31.0",\r\n * "timeZoneName":"Eastern Standard Time",\r\n * "timeZoneID":"America/New_York",\r\n * "timeZoneOffset":"-5"},\r\n * "AstronomicalTimes":{\r\n * "Sunrise":"2007-02-18T06:45:27-05:00",\r\n * "TemporalHour":"PT54M17.529S"\r\n * ...\r\n * }\r\n * }\r\n *\r\n */\r\n public static toJSON(astronomicalCalendar: AstronomicalCalendar): JsonOutput {\r\n const json: JsonOutput = {\r\n metadata: ZmanimFormatter.getOutputMetadata(astronomicalCalendar),\r\n };\r\n const key: string = ZmanimFormatter.getOutputKey(astronomicalCalendar);\r\n json[key] = ZmanimFormatter.getZmanimOutput(astronomicalCalendar);\r\n\r\n return json;\r\n }\r\n\r\n private static getOutputKey(astronomicalCalendar: AstronomicalCalendar) {\r\n switch (true) {\r\n case astronomicalCalendar instanceof ComplexZmanimCalendar:\r\n return 'Zmanim';\r\n case astronomicalCalendar instanceof ZmanimCalendar:\r\n return 'BasicZmanim';\r\n case astronomicalCalendar instanceof AstronomicalCalendar:\r\n default:\r\n return 'AstronomicalTimes';\r\n }\r\n }\r\n\r\n private static getOutputMetadata(astronomicalCalendar: AstronomicalCalendar): OutputMetadata {\r\n return {\r\n date: astronomicalCalendar.getDate().toString(),\r\n type: astronomicalCalendar.getClassName(),\r\n algorithm: astronomicalCalendar.getAstronomicalCalculator().getCalculatorName(),\r\n location: astronomicalCalendar.getGeoLocation().getLocationName(),\r\n latitude: astronomicalCalendar.getGeoLocation().getLatitude().toString(),\r\n longitude: astronomicalCalendar.getGeoLocation().getLongitude().toString(),\r\n elevation: ZmanimFormatter.formatDecimal(astronomicalCalendar.getGeoLocation().getElevation()),\r\n timeZoneName: TimeZone.getDisplayName(astronomicalCalendar.getGeoLocation().getTimeZone())!,\r\n timeZoneID: astronomicalCalendar.getGeoLocation().getTimeZone(),\r\n timeZoneOffset: ZmanimFormatter.formatDecimal(TimeZone.getOffset(astronomicalCalendar.getGeoLocation().getTimeZone(),\r\n astronomicalCalendar.getDate().toZonedDateTime(astronomicalCalendar.getGeoLocation().getTimeZone()).epochMilliseconds) / ZmanimFormatter.HOUR_MILLIS),\r\n };\r\n }\r\n\r\n private static getZmanimOutput(astronomicalCalendar: AstronomicalCalendar) {\r\n const formatter: ZmanimFormatter = new ZmanimFormatter(ZmanimFormatter.XSD_DURATION_FORMAT, ZmanimFormatter.XSD_DATE_FORMAT,\r\n astronomicalCalendar.getGeoLocation().getTimeZone());\r\n\r\n /*\r\n let dateList: Set
Sample code:\r\n *
\r\n * TefilaRules tr = new TefilaRules();\r\n * JewishCalendar jewishCalendar = new JewishCalendar();\r\n * HebrewDateFormatter hdf = new HebrewDateFormatter();\r\n * jewishCalendar.setJewishDate(5783, JewishDate.TISHREI, 1); // Rosh Hashana\r\n * System.out.println(hdf.format(jewishCalendar) + \": \" + tr.isTachanunRecitedShacharis(jd));\r\n * jewishCalendar.setJewishDate(5783, JewishDate.ADAR, 17);\r\n * System.out.println(hdf.format(jewishCalendar) + \": \" + tr.isTachanunRecitedShacharis(jewishCalendar));\r\n * tr.setTachanunRecitedWeekOfPurim(false);\r\n * System.out.println(hdf.format(jewishCalendar) + \": \" + tr.isTachanunRecitedShacharis(jewishCalendar));\r\n * \r\n * @author © Y. Paritcher 2019 - 2021\r\n * @author © Eliyahu Hershfeld 2019 - 2022\r\n * \r\n * @todo The following items may be added at a future date.\r\n *
true
.\r\n\t * @see #isTachanunRecitedEndOfTishrei()\r\n\t * @see #setTachanunRecitedEndOfTishrei(boolean)\r\n\t */\r\n private tachanunRecitedEndOfTishrei:boolean = true;\r\n\r\n /**\r\n\t * The default value is false
.\r\n\t * @see #isTachanunRecitedWeekAfterShavuos()\r\n\t * @see #setTachanunRecitedWeekAfterShavuos(boolean)\r\n\t */\r\n private tachanunRecitedWeekAfterShavuos:boolean = false;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecited13SivanOutOfIsrael()\r\n\t * @see #setTachanunRecited13SivanOutOfIsrael(boolean)\r\n\t */\r\n private tachanunRecited13SivanOutOfIsrael:boolean = true;\r\n\r\n /**\r\n\t * The default value is false
.\r\n\t * @see #isTachanunRecitedPesachSheni()\r\n\t * @see #setTachanunRecitedPesachSheni(boolean)\r\n\t */\r\n private tachanunRecitedPesachSheni:boolean = false;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecited15IyarOutOfIsrael()\r\n\t * @see #setTachanunRecited15IyarOutOfIsrael(boolean)\r\n\t */\r\n private tachanunRecited15IyarOutOfIsrael:boolean = true;\r\n\r\n /**\r\n\t * The default value is false
.\r\n\t * @see #isTachanunRecitedMinchaErevLagBaomer()\r\n\t * @see #setTachanunRecitedMinchaErevLagBaomer(boolean)\r\n\t */\r\n private tachanunRecitedMinchaErevLagBaomer:boolean = false;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecitedShivasYemeiHamiluim()\r\n\t * @see #setTachanunRecitedShivasYemeiHamiluim(boolean)\r\n\t */\r\n private tachanunRecitedShivasYemeiHamiluim:boolean = true;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecitedWeekOfHod()\r\n\t * @see #setTachanunRecitedWeekOfHod(boolean)\r\n\t */\r\n private tachanunRecitedWeekOfHod:boolean = true;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecitedWeekOfPurim()\r\n\t * @see #setTachanunRecitedWeekOfPurim(boolean)\r\n\t */\r\n private tachanunRecitedWeekOfPurim:boolean = true;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecitedFridays()\r\n\t * @see #setTachanunRecitedFridays(boolean)\r\n\t */\r\n private tachanunRecitedFridays:boolean = true;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecitedSundays()\r\n\t * @see #setTachanunRecitedSundays(boolean)\r\n\t */\r\n private tachanunRecitedSundays:boolean = true;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecitedMinchaAllYear()\r\n\t * @see #setTachanunRecitedMinchaAllYear(boolean)\r\n\t */\r\n private tachanunRecitedMinchaAllYear:boolean = true;\r\n\r\n /**\r\n\t * Returns if tachanun is recited during shacharis on the day in question. See the many\r\n\t * minhag based settings that are available in this class.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if tachanun is recited during shacharis.\r\n\t * @see #isTachanunRecitedMincha(JewishCalendar)\r\n\t */\r\n public isTachanunRecitedShacharis(jewishCalendar: JewishCalendar):boolean {\r\n const holidayIndex:number = jewishCalendar.getYomTovIndex();\r\n const day:number = jewishCalendar.getJewishDayOfMonth();\r\n const month:number = jewishCalendar.getJewishMonth();\r\n\r\n if (jewishCalendar.getDayOfWeek() == SATURDAY\r\n\t\t|| (!this.tachanunRecitedSundays && jewishCalendar.getDayOfWeek() == SUNDAY)\r\n\t\t|| (!this.tachanunRecitedFridays && jewishCalendar.getDayOfWeek() == FRIDAY)\r\n\t\t\t\t|| month == JewishDate.NISSAN\r\n\t\t\t\t|| (month == JewishDate.TISHREI && ((!this.tachanunRecitedEndOfTishrei && day > 8)\r\n\t\t\t\t|| (this.tachanunRecitedEndOfTishrei && (day > 8 && day < 22))))\r\n\t\t\t\t|| (month == JewishDate.SIVAN && (this.tachanunRecitedWeekAfterShavuos && day < 7\r\n\t\t\t\t\t\t|| !this.tachanunRecitedWeekAfterShavuos && day < (!jewishCalendar.getInIsrael()\r\n\t\t\t\t\t\t\t\t&& !this.tachanunRecited13SivanOutOfIsrael ? 14 : 13)))\r\n\t\t\t\t|| (jewishCalendar.isYomTov() && (!jewishCalendar.isTaanis()\r\n\t\t\t\t\t\t|| (!this.tachanunRecitedPesachSheni && holidayIndex == JewishCalendar.PESACH_SHENI))) // Erev YT is included in isYomTov()\r\n\t\t\t\t|| (!jewishCalendar.getInIsrael() && !this.tachanunRecitedPesachSheni && !this.tachanunRecited15IyarOutOfIsrael\r\n\t\t\t\t\t\t&& jewishCalendar.getJewishMonth() == JewishDate.IYAR && day == 15)\r\n\t\t\t\t|| holidayIndex == JewishCalendar.TISHA_BEAV || jewishCalendar.isIsruChag()\r\n\t\t\t\t|| jewishCalendar.isRoshChodesh()\r\n\t\t\t\t|| (!this.tachanunRecitedShivasYemeiHamiluim &&\r\n\t\t\t\t\t\t((!jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR)\r\n\t\t\t\t\t\t\t\t|| (jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR_II)) && day > 22)\r\n\t\t\t\t|| (!this.tachanunRecitedWeekOfPurim &&\r\n\t\t\t\t\t\t((!jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR)\r\n\t\t\t\t\t\t\t\t|| (jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR_II)) && day > 10 && day < 18)\r\n\t\t\t\t|| (jewishCalendar.isUseModernHolidays()\r\n\t\t\t\t\t\t&& (holidayIndex == JewishCalendar.YOM_HAATZMAUT || holidayIndex == JewishCalendar.YOM_YERUSHALAYIM))\r\n\t\t\t\t|| (!this.tachanunRecitedWeekOfHod && month == JewishDate.IYAR && day > 13 && day < 21)) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n\t * Returns if tachanun is recited during mincha on the day in question.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if tachanun is recited during mincha.\r\n\t * @see #isTachanunRecitedShacharis(JewishCalendar)\r\n\t */\r\n public isTachanunRecitedMincha(jewishCalendar: JewishCalendar):boolean {\r\n let tomorrow:JewishCalendar = new JewishCalendar();\r\n tomorrow = jewishCalendar.clone() as JewishCalendar;\r\n tomorrow.forward(Calendar.DATE, 1);\r\n\t\t\r\n if (!this.tachanunRecitedMinchaAllYear\r\n\t\t\t\t\t|| jewishCalendar.getDayOfWeek() == Calendar.FRIDAY\r\n\t\t\t\t\t|| !this.isTachanunRecitedShacharis(jewishCalendar) \r\n\t\t\t\t\t|| (!this.isTachanunRecitedShacharis(tomorrow) && \r\n\t\t\t\t\t\t\t!(tomorrow.getYomTovIndex() == JewishCalendar.EREV_ROSH_HASHANA) &&\r\n\t\t\t\t\t\t\t!(tomorrow.getYomTovIndex() == JewishCalendar.EREV_YOM_KIPPUR) &&\r\n\t\t\t\t\t\t\t!(tomorrow.getYomTovIndex() == JewishCalendar.PESACH_SHENI))\r\n\t\t\t\t\t|| !this.tachanunRecitedMinchaErevLagBaomer && tomorrow.getYomTovIndex() == JewishCalendar.LAG_BAOMER) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\t\r\n /**\r\n\t * Returns if it is the Jewish day (starting the evening before) to start reciting Vesein Tal Umatar Livracha\r\n\t * (Sheailas Geshamim). In Israel this is the 7th day of {@link JewishDate#CHESHVAN Marcheshvan}.\r\n\t * Outside Israel recitation starts on the evening of December 4th (or 5th if it is the year before a civil leap year)\r\n\t * in the 21st century and shifts a day forward every century not evenly divisible by 400. This method will return true\r\n\t * if vesein tal umatar on the current Jewish date that starts on the previous night, so Dec 5/6 will be\r\n\t * returned by this method in the 21st century. vesein tal umatar is not recited on Shabbos and the\r\n\t * start date will be delayed a day when the start day is on a Shabbos (this can only occur out of Israel).\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if it is the first Jewish day (starting the prior evening of reciting Vesein Tal Umatar Livracha\r\n\t * (Sheailas Geshamim).\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartingTonight(JewishCalendar)\r\n\t * @see #isVeseinTalUmatarRecited(JewishCalendar)\r\n\t */\r\n public isVeseinTalUmatarStartDate(jewishCalendar: JewishCalendar):boolean {\r\n if (jewishCalendar.getInIsrael()) {\r\n\t\t\t // The 7th Cheshvan can't occur on Shabbos, so always return true for 7 Cheshvan\r\n if (jewishCalendar.getJewishMonth() == JewishDate.CHESHVAN && jewishCalendar.getJewishDayOfMonth() == 7) {\r\n return true;\r\n }\r\n } else {\r\n if (jewishCalendar.getDayOfWeek() == SATURDAY) { //Not recited on Friday night\r\n return false;\r\n }\r\n if (jewishCalendar.getDayOfWeek() == Calendar.SUNDAY) { // When starting on Sunday, it can be the start date or delayed from Shabbos\r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 48 || jewishCalendar.getTekufasTishreiElapsedDays() == 47;\r\n } \r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 47;\r\n\t\t\t\r\n }\r\n return false; // keep the compiler happy\r\n }\r\n\t\r\n /**\r\n\t * Returns if true if tonight is the first night to start reciting Vesein Tal Umatar Livracha (\r\n\t * Sheailas Geshamim). In Israel this is the 7th day of {@link JewishDate#CHESHVAN\r\n\t * Marcheshvan} (so the 6th will return true). Outside Israel recitation starts on the evening\r\n\t * of December 4th (or 5th if it is the year before a civil leap year) in the 21st century and shifts a\r\n\t * day forward every century not evenly divisible by 400. Vesein tal umatar is not recited on\r\n\t * Shabbos and the start date will be delayed a day when the start day is on a Shabbos\r\n\t * (this can only occur out of Israel).\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if it is the first Jewish day (starting the prior evening of reciting Vesein Tal Umatar\r\n\t * Livracha (Sheailas Geshamim).\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartDate(JewishCalendar)\r\n\t * @see #isVeseinTalUmatarRecited(JewishCalendar)\r\n\t */\r\n public isVeseinTalUmatarStartingTonight(jewishCalendar: JewishCalendar):boolean {\r\n if (jewishCalendar.getInIsrael()) {\r\n // The 7th Cheshvan can't occur on Shabbos, so always return true for 6 Cheshvan\r\n if (jewishCalendar.getJewishMonth() == JewishDate.CHESHVAN && jewishCalendar.getJewishDayOfMonth() == 6) {\r\n return true;\r\n }\r\n } else {\r\n if (jewishCalendar.getDayOfWeek() == Calendar.FRIDAY) { //Not recited on Friday night\r\n return false;\r\n }\r\n if (jewishCalendar.getDayOfWeek() == Calendar.SATURDAY) { // When starting on motzai Shabbos, it can be the start date or delayed from Friday night\r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 47 || jewishCalendar.getTekufasTishreiElapsedDays() == 46;\r\n } \r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 46;\r\n\t\t\t\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n\t * Returns if Vesein Tal Umatar Livracha (Sheailas Geshamim) is recited. This will return\r\n\t * true for the entire season, even on Shabbos when it is not recited.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if Vesein Tal Umatar Livracha (Sheailas Geshamim) is recited.\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartDate(JewishCalendar)\r\n\t * @see #isVeseinTalUmatarStartingTonight(JewishCalendar)\r\n\t */\r\n public isVeseinTalUmatarRecited(jewishCalendar:JewishCalendar):boolean {\r\n if (jewishCalendar.getJewishMonth() == JewishDate.NISSAN && jewishCalendar.getJewishDayOfMonth() < 15) {\r\n return true;\r\n }\r\n if (jewishCalendar.getJewishMonth() < JewishDate.CHESHVAN) {\r\n return false;\r\n }\r\n if (jewishCalendar.getInIsrael()) {\r\n return jewishCalendar.getJewishMonth() != JewishDate.CHESHVAN || jewishCalendar.getJewishDayOfMonth() >= 7;\r\n } \r\n return jewishCalendar.getTekufasTishreiElapsedDays() >= 47;\r\n\t\t\r\n }\r\n\t\r\n /**\r\n\t * Returns if Vesein Beracha is recited. It is recited from 15 {@link JewishDate#NISSAN Nissan} to the\r\n\t * point that {@link #isVeseinTalUmatarRecited(JewishCalendar) vesein tal umatar is recited}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if Vesein Beracha is recited.\r\n\t * @see #isVeseinTalUmatarRecited(JewishCalendar)\r\n\t */\r\n public isVeseinBerachaRecited(jewishCalendar: JewishCalendar):boolean {\r\n return !this.isVeseinTalUmatarRecited(jewishCalendar);\r\n }\r\n\r\n /**\r\n\t * Returns if the date is the start date for reciting Mashiv Haruach Umorid Hageshem. The date is 22\r\n\t * {@link JewishDate#TISHREI Tishrei}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if the date is the start date for reciting Mashiv Haruach Umorid Hageshem.\r\n\t * @see #isMashivHaruachEndDate(JewishCalendar)\r\n\t * @see #isMashivHaruachRecited(JewishCalendar)\r\n\t */\r\n public isMashivHaruachStartDate(jewishCalendar:JewishCalendar):boolean {\r\n return jewishCalendar.getJewishMonth() == JewishDate.TISHREI && jewishCalendar.getJewishDayOfMonth() == 22;\r\n }\r\n\r\n /**\r\n\t * Returns if the date is the end date for reciting Mashiv Haruach Umorid Hageshem. The date is 15\r\n\t * {@link JewishDate#NISSAN Nissan}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if the date is the end date for reciting Mashiv Haruach Umorid Hageshem.\r\n\t * @see #isMashivHaruachStartDate(JewishCalendar)\r\n\t * @see #isMashivHaruachRecited(JewishCalendar)\r\n\t */\r\n public isMashivHaruachEndDate(jewishCalendar:JewishCalendar):boolean {\r\n return jewishCalendar.getJewishMonth() == JewishDate.NISSAN && jewishCalendar.getJewishDayOfMonth() == 15;\r\n }\r\n\r\n /**\r\n\t * Returns if Mashiv Haruach Umorid Hageshem is recited. This period starts on 22 {@link\r\n\t * JewishDate#TISHREI Tishrei} and ends on the 15th day of {@link JewishDate#NISSAN Nissan}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if Mashiv Haruach Umorid Hageshem is recited.\r\n\t * @see #isMashivHaruachStartDate(JewishCalendar)\r\n\t * @see #isMashivHaruachEndDate(JewishCalendar)\r\n\t */\r\n public isMashivHaruachRecited(jewishCalendar:JewishCalendar):boolean {\r\n const startDate:JewishDate = new JewishDate(jewishCalendar.getJewishYear(), JewishDate.TISHREI, 22);\r\n const endDate:JewishDate = new JewishDate(jewishCalendar.getJewishYear(), JewishDate.NISSAN, 15);\r\n return jewishCalendar.compareTo(startDate) > 0 && jewishCalendar.compareTo(endDate) < 0;\r\n }\r\n\r\n /**\r\n\t * Returns if Morid Hatal (or the lack of reciting Mashiv Haruach following nussach Ashkenaz) is\r\n\t * recited. This period starts on the 15th day of {@link JewishDate#NISSAN Nissan} and ends on 22 {@link\r\n\t * JewishDate#TISHREI Tishrei}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if Morid Hatal (or the lack of reciting Mashiv Haruach following nussach Ashkenaz) is recited.\r\n\t */\r\n public isMoridHatalRecited(jewishCalendar:JewishCalendar):boolean {\r\n return !this.isMashivHaruachRecited(jewishCalendar) || this.isMashivHaruachStartDate(jewishCalendar) || this.isMashivHaruachEndDate(jewishCalendar);\r\n }\r\n\t\r\n /**\r\n\t * Returns if Hallel is recited on the day in question. This will return true for both Hallel shalem\r\n\t * and Chatzi Hallel. See {@link #isHallelShalemRecited(JewishCalendar)} to know if the complete Hallel\r\n\t * is recited.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if Hallel is recited.\r\n\t * @see #isHallelShalemRecited(JewishCalendar)\r\n\t */\r\n public isHallelRecited(jewishCalendar:JewishCalendar):boolean {\r\n const day:number = jewishCalendar.getJewishDayOfMonth();\r\n const month:number = jewishCalendar.getJewishMonth();\r\n const holidayIndex:number = jewishCalendar.getYomTovIndex();\r\n const inIsrael:boolean = jewishCalendar.getInIsrael();\r\n\t\t\r\n if (jewishCalendar.isRoshChodesh()) { //RH returns false for RC\r\n return true;\r\n }\r\n if (jewishCalendar.isChanukah()) {\r\n return true;\r\n }\r\n switch (month) {\r\n case JewishDate.NISSAN:\r\n if (day >= 15 && ((inIsrael && day <= 21) || (!inIsrael && day <= 22))) {\r\n return true;\r\n }\r\n break;\r\n case JewishDate.IYAR: // modern holidays\r\n if (jewishCalendar.isUseModernHolidays() && (holidayIndex == JewishCalendar.YOM_HAATZMAUT\r\n\t\t\t\t\t\t|| holidayIndex == JewishCalendar.YOM_YERUSHALAYIM)) {\r\n return true;\r\n }\r\n break;\r\n case JewishDate.SIVAN:\r\n if (day == 6 || (!inIsrael && (day == 7))) {\r\n return true;\r\n }\r\n break;\r\n case JewishDate.TISHREI:\r\n if (day >= 15 && (day <= 22 || (!inIsrael && (day <= 23)))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n\t * Returns if hallel shalem is recited on the day in question. This will always return false if {@link\r\n\t * #isHallelRecited(JewishCalendar)} returns false.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if hallel shalem is recited.\r\n\t * @see #isHallelRecited(JewishCalendar)\r\n\t */\r\n public isHallelShalemRecited(jewishCalendar:JewishCalendar):boolean {\r\n const day:number = jewishCalendar.getJewishDayOfMonth();\r\n const month:number = jewishCalendar.getJewishMonth();\r\n const inIsrael:boolean = jewishCalendar.getInIsrael();\r\n if (this.isHallelRecited(jewishCalendar)) {\r\n if ((jewishCalendar.isRoshChodesh() && ! jewishCalendar.isChanukah())\r\n\t\t\t\t\t|| (month == JewishDate.NISSAN && ((inIsrael && day > 15) || (!inIsrael && day > 16)))) {\r\n return false;\r\n } \r\n return true;\r\n\t\t\t\r\n } \r\n return false;\r\n }\r\n\t\r\n /**\r\n\t * Returns if Al HaNissim is recited on the day in question.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if al hanissim is recited.\r\n\t * @see JewishCalendar#isChanukah()\r\n\t * @see JewishCalendar#isPurim()\r\n\t * @see JewishCalendar#getIsMukafChoma()\r\n\t */\r\n public isAlHanissimRecited(jewishCalendar:JewishCalendar): boolean {\r\n\t return jewishCalendar.isPurim() || jewishCalendar.isChanukah();\r\n }\r\n\t\r\n /**\r\n\t * Returns if Yaaleh Veyavo is recited on the day in question.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if Yaaleh Veyavo is recited.\r\n\t * @see JewishCalendar#isPesach()\r\n\t * @see JewishCalendar#isShavuos()\r\n\t * @see JewishCalendar#isRoshHashana()\r\n\t * @see JewishCalendar#isYomKippur()\r\n\t * @see JewishCalendar#isSuccos()\r\n\t * @see JewishCalendar#isShminiAtzeres()\r\n\t * @see JewishCalendar#isSimchasTorah()\r\n\t * @see JewishCalendar#isRoshChodesh()\r\n\t */\r\n public isYaalehVeyavoRecited(jewishCalendar:JewishCalendar):boolean {\r\n\t return jewishCalendar.isPesach() || jewishCalendar.isShavuos() || jewishCalendar.isRoshHashana() || jewishCalendar.isYomKippur()\r\n\t \t\t|| jewishCalendar.isSuccos() || jewishCalendar.isShminiAtzeres() || jewishCalendar.isSimchasTorah()\r\n\t \t\t|| jewishCalendar.isRoshChodesh();\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited during the week of Purim, from the 11th through the 17th of {@link\r\n\t * JewishDate#ADAR Adar} (on a non-leap year, or {@link JewishDate#ADAR_II Adar II} on a leap year). Some\r\n\t * chasidishe communities do not recite tachanun during this period. See the Minhag Yisrael Torah 131 and Darkei Chaim Veshalom 191who discuss the\r\n\t * minhag not to recite tachanun. Also see the Mishmeres Shalom (Hadras Shalom) who discusses the\r\n\t * minhag of not reciting it on the 16th and 17th.\r\n\t * @return If tachanun is set to be recited during the week of Purim from the 11th through the 17th of {@link\r\n\t * JewishDate#ADAR Adar} (on a non-leap year, or {@link JewishDate#ADAR_II Adar II} on a leap year).\r\n\t * @see #setTachanunRecitedWeekOfPurim(boolean)\r\n\t */\r\n public isTachanunRecitedWeekOfPurim():boolean {\r\n return this.tachanunRecitedWeekOfPurim;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the week of Purim from the 11th through the 17th of {@link\r\n\t * JewishDate#ADAR Adar} (on a non-leap year), or {@link JewishDate#ADAR_II Adar II} (on a leap year).\r\n\t * @param tachanunRecitedWeekOfPurim Sets if tachanun is to recited during the week of Purim from the 11th\r\n\t * through the 17th of {@link JewishDate#ADAR Adar} (on a non-leap year), or {@link JewishDate#ADAR_II\r\n\t * Adar II} (on a leap year). Some chasidishe communities do not recite tachanun\r\n\t * during this period.\r\n\t * @see #isTachanunRecitedWeekOfPurim()\r\n\t */\r\n public setTachanunRecitedWeekOfPurim(tachanunRecitedWeekOfPurim:boolean):void {\r\n this.tachanunRecitedWeekOfPurim = tachanunRecitedWeekOfPurim;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited during the sefira week of Hod (14 - 20 {@link JewishDate#IYAR Iyar},\r\n\t * or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}). Some chasidishe communities\r\n\t * do not recite tachanun during this week. See Minhag Yisrael Torah 131:Iyar.\r\n\t * @return If tachanun is set to be recited during the sefira week of Hod (14 - 20 {@link\r\n\t * JewishDate#IYAR Iyar}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}).\r\n\t * @see #setTachanunRecitedWeekOfHod(boolean)\r\n\t */\r\n public isTachanunRecitedWeekOfHod():boolean {\r\n return this.tachanunRecitedWeekOfHod;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the sefira week of Hod (14 - 20 {@link JewishDate#IYAR\r\n\t * Iyar}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}).\r\n\t * @param tachanunRecitedWeekOfHod Sets if tachanun should be recited during the sefira week of\r\n\t * Hod.\r\n\t * @see #isTachanunRecitedWeekOfHod()\r\n\t */\r\n public setTachanunRecitedWeekOfHod(tachanunRecitedWeekOfHod:boolean):void {\r\n this.tachanunRecitedWeekOfHod = tachanunRecitedWeekOfHod;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited at the end Of {@link JewishDate#TISHREI Tishrei}.The Magen Avraham 669:1 and the Pri\r\n\t * Chadash 131:7 state that some places to not recite tachanun during this period. The Sh\"UT Chasam Sofer on Choshen\r\n\t * Mishpat 77 writes that this is the minhag in Ashkenaz. The Shaarei Teshuva 131:19 quotes the Sheyarie Kneses\r\n\t * Hagdola who also states that it should not be recited. The Aderes wanted to institute saying tachanun during this\r\n\t * period, but was dissuaded from this by Rav Shmuel Salant who did not want to change the minhag in Yerushalayim.\r\n\t * The Aruch Hashulchan is of the opinion that that this minhag is incorrect, and it should be recited, and The Chazon\r\n\t * Ish also recited tachanun during this period. See the Dirshu edition of the Mishna Berurah for details.\r\n\t * @return If tachanun is set to be recited at the end of {@link JewishDate#TISHREI Tishrei}.\r\n\t * @see #setTachanunRecitedEndOfTishrei(tachanunRecitedEndOfTishrei)\r\n\t */\r\n public isTachanunRecitedEndOfTishrei():boolean {\r\n return this.tachanunRecitedEndOfTishrei;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited at the end of {@link JewishDate#TISHREI Tishrei}.\r\n\t * @param tachanunRecitedEndOfTishrei is tachanun recited at the end of {@link JewishDate#TISHREI Tishrei}.\r\n\t * @see #isTachanunRecitedEndOfTishrei()\r\n\t */\r\n public setTachanunRecitedEndOfTishrei(tachanunRecitedEndOfTishrei:boolean):void {\r\n this.tachanunRecitedEndOfTishrei = tachanunRecitedEndOfTishrei;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited during the week after Shavuos. This is the opinion of the Pri Megadim\r\n\t * quoted by the Mishna Berurah. This is since karbanos of Shavuos have tashlumim for\r\n\t * 7 days, it is still considered like a Yom Tov. The Chazon Ish quoted in the Orchos Rabainu vol. 1 page 68\r\n\t * recited tachanun during this week.\r\n\t * \r\n\t * @return If tachanun is set to be recited during the week after Shavuos.\r\n\t * @see #setTachanunRecitedWeekAfterShavuos(boolean)\r\n\t */\r\n public isTachanunRecitedWeekAfterShavuos():boolean {\r\n return this.tachanunRecitedWeekAfterShavuos;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the week after Shavuos.\r\n\t * @param tachanunRecitedWeekAfterShavuos is tachanun recited during the week after Shavuos.\r\n\t * @see #isTachanunRecitedWeekAfterShavuos()\r\n\t */\r\n public setTachanunRecitedWeekAfterShavuos(tachanunRecitedWeekAfterShavuos:boolean):void {\r\n this.tachanunRecitedWeekAfterShavuos = tachanunRecitedWeekAfterShavuos;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun is recited on the 13th of {@link JewishDate#SIVAN Sivan} (Yom Tov Sheni shel Galuyos of the 7th\r\n\t * day) outside Israel. This is brought down by the Shaarie Teshuva 131:19 quoting the Sheyarei Kneses Hagedola 131:12that\r\n\t * tachanun should not be recited on this day. Rav Shlomo Zalman Orbach in Halichos Shlomo on\r\n\t * Shavuos 12:16:25 is of the opinion that even in chutz laaretz it should be recited since the yemei\r\n\t * Tashlumin are counted based on Israel since that is where the karbanos are brought. Both\r\n\t * {@link #isTachanunRecitedShacharis(JewishCalendar)} and {@link #isTachanunRecitedMincha(JewishCalendar)}\r\n\t * only return false if the location is not set to {@link JewishCalendar#getInIsrael() Israel} and both\r\n\t * {@link #tachanunRecitedWeekAfterShavuos} and {@link #setTachanunRecited13SivanOutOfIsrael} are set to false.\r\n\t * \r\n\t * @return If tachanun is set to be recited on the 13th of {@link JewishDate#SIVAN Sivan} out of Israel.\r\n\t * @see #setTachanunRecited13SivanOutOfIsrael(isTachanunRecitedThirteenSivanOutOfIsrael)\r\n\t * @see #isTachanunRecitedWeekAfterShavuos()\r\n\t */\r\n public isTachanunRecited13SivanOutOfIsrael():boolean {\r\n return this.tachanunRecited13SivanOutOfIsrael;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on the 13th of {@link JewishDate#SIVAN Sivan} (Yom Tov Sheni shel Galuyos of the 7th\r\n\t * day) outside Israel. \r\n\t * @param tachanunRecitedThirteenSivanOutOfIsrael sets if tachanun should be recited on the 13th of {@link\r\n\t * JewishDate#SIVAN Sivan} out of Israel. Both {@link #isTachanunRecitedShacharis(JewishCalendar)} and\r\n\t * {@link #isTachanunRecitedMincha(JewishCalendar)} only return false if the location is not set to {@link\r\n\t * JewishCalendar#getInIsrael() Israel} and both {@link #tachanunRecitedWeekAfterShavuos} and\r\n\t * {@link #setTachanunRecited13SivanOutOfIsrael} are set to false.\r\n\t * @see #isTachanunRecited13SivanOutOfIsrael()\r\n\t */\r\n public setTachanunRecited13SivanOutOfIsrael(tachanunRecitedThirteenSivanOutOfIsrael:boolean):void {\r\n this.tachanunRecited13SivanOutOfIsrael = tachanunRecitedThirteenSivanOutOfIsrael;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}. The Pri Chadash 131:7 states\r\n\t * that tachanun should not be recited. The Aruch Hashulchan states that this is the minhag of the sephardim.\r\n\t * the Shaarei Efraim 10:27 also mentions that it is not recited, as does the Siddur Yaavetz (Shaar Hayesod, Chodesh Iyar).\r\n\t * The Pri Megadim (Mishbetzes Hazahav 131:15) and the Chazon Ish (Erev Pesahc Shchal Beshabos, page 203 in Rav Sheraya\r\n\t * Devlitzky's comments).\r\n\t * \r\n\t * @return If tachanun is recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}.\r\n\t * @see #setTachanunRecitedPesachSheni(boolean)\r\n\t */\r\n public isTachanunRecitedPesachSheni():boolean {\r\n return this.tachanunRecitedPesachSheni;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}.\r\n\t * @param tachanunRecitedPesachSheni sets if tachanun should be recited on Pesach Sheni.\r\n\t * @see #isTachanunRecitedPesachSheni()\r\n\t */\r\n public setTachanunRecitedPesachSheni(tachanunRecitedPesachSheni:boolean):void {\r\n this.tachanunRecitedPesachSheni = tachanunRecitedPesachSheni;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited on 15 {@link JewishDate#IYAR Iyar} (sfaika deyoma of {@link JewishCalendar#PESACH_SHENI\r\n\t * Pesach Sheni}) out of Israel. If {@link #isTachanunRecitedPesachSheni()} is true
this will be\r\n\t * ignored even if false
.\r\n\t * \r\n\t * @return if tachanun is recited on 15 {@link JewishDate#IYAR Iyar} (sfaika deyoma of {@link\r\n\t * JewishCalendar#PESACH_SHENI Pesach Sheni} out of Israel. If {@link #isTachanunRecitedPesachSheni()}\r\n\t * is true
this will be ignored even if false
.\r\n\t * @see #setTachanunRecited15IyarOutOfIsrael(boolean)\r\n\t * @see #setTachanunRecitedPesachSheni(boolean)\r\n\t * @see #isTachanunRecitedPesachSheni()\r\n\t */\r\n public isTachanunRecited15IyarOutOfIsrael():boolean {\r\n return this.tachanunRecited15IyarOutOfIsrael;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on the 15th of {@link JewishDate#IYAR Iyar} (Yom Tov Sheni shel Galuyos of\r\n\t * {@link JewishCalendar#PESACH_SHENI Pesach Sheni}) out of Israel. Ignored if {@link\r\n\t * #isTachanunRecitedPesachSheni()} is true
.\r\n\t * \r\n\t * @param tachanunRecited15IyarOutOfIsrael if tachanun should be recited on the 15th of {@link JewishDate#IYAR\r\n\t * Iyar} (sfaika deyoma of {@link JewishCalendar#PESACH_SHENI Pesach Sheni}) out of Israel.\r\n\t * @see #isTachanunRecited15IyarOutOfIsrael()\r\n\t */\r\n public setTachanunRecited15IyarOutOfIsrael(tachanunRecited15IyarOutOfIsrael: boolean): void {\r\n this.tachanunRecited15IyarOutOfIsrael = tachanunRecited15IyarOutOfIsrael;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited on mincha on erev {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @return if tachanun is recited in mincha on erev\r\n\t * {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @see #setTachanunRecitedMinchaErevLagBaomer(boolean)\r\n\t */\r\n public isTachanunRecitedMinchaErevLagBaomer():boolean {\r\n return this.tachanunRecitedMinchaErevLagBaomer;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on erev {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @param tachanunRecitedMinchaErevLagBaomer sets if tachanun should be recited on mincha\r\n\t * of erev {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @see #isTachanunRecitedMinchaErevLagBaomer()\r\n\t */\r\n public setTachanunRecitedMinchaErevLagBaomer(tachanunRecitedMinchaErevLagBaomer:boolean): void {\r\n this.tachanunRecitedMinchaErevLagBaomer = tachanunRecitedMinchaErevLagBaomer;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited during the Shivas Yemei Hamiluim, from the 23 of {@link\r\n\t * JewishDate#ADAR Adar} on a non-leap-year or {@link JewishDate#ADAR_II Adar II} on a\r\n\t * leap year to the end of the month. Some chasidishe communities do not say tachanun\r\n\t * during this week. See Darkei\r\n\t * Chaim Veshalom 191.\r\n\t * @return if tachanun is recited during the Shivas Yemei Hamiluim, from the 23 of {@link\r\n\t * JewishDate#ADAR Adar} on a non-leap-year or {@link JewishDate#ADAR_II Adar II}\r\n\t * on a leap year to the end of the month.\r\n\t * @see #setTachanunRecitedShivasYemeiHamiluim(boolean)\r\n\t */\r\n public isTachanunRecitedShivasYemeiHamiluim():boolean {\r\n return this.tachanunRecitedShivasYemeiHamiluim;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the Shivas Yemei Hamiluim, from the 23 of\r\n\t * {@link JewishDate#ADAR Adar} on a non-leap-year or {@link JewishDate#ADAR_II Adar II}\r\n\t * on a leap year to the end of the month.\r\n\t * @param tachanunRecitedShivasYemeiHamiluim sets if tachanun should be recited during the\r\n\t * Shivas Yemei Hamiluim.\r\n\t * @see #isTachanunRecitedShivasYemeiHamiluim()\r\n\t */\r\n public setTachanunRecitedShivasYemeiHamiluim(tachanunRecitedShivasYemeiHamiluim:boolean):void {\r\n this.tachanunRecitedShivasYemeiHamiluim = tachanunRecitedShivasYemeiHamiluim;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited on Fridays. Some chasidishe communities do not recite\r\n\t * tachanun on Fridays. See Likutei\r\n\t * Maharich Vol 2 Seder Hanhagos Erev Shabbos. This is also the minhag in Satmar.\r\n\t * @return if tachanun is recited on Fridays.\r\n\t * @see #setTachanunRecitedFridays(boolean)\r\n\t */\r\n public isTachanunRecitedFridays():boolean {\r\n return this.tachanunRecitedFridays;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on Fridays. \r\n\t * @param tachanunRecitedFridays sets if tachanun should be recited on Fridays. Some chasidishe\r\n\t * communities do not recite tachanun on Fridays.\r\n\t * @see #isTachanunRecitedFridays()\r\n\t */\r\n public setTachanunRecitedFridays(tachanunRecitedFridays:boolean):void {\r\n this.tachanunRecitedFridays = tachanunRecitedFridays;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited on Sundays. Some chasidishe communities do not recite\r\n\t * tachanun on Sundays. See Likutei\r\n\t * Maharich Vol 2 Seder Hanhagos Erev Shabbos. \r\n\t * @return if tachanun is recited on Sundays.\r\n\t * @see #setTachanunRecitedSundays(boolean)\r\n\t */\r\n public isTachanunRecitedSundays():boolean {\r\n return this.tachanunRecitedSundays;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on Sundays. \r\n\t * @param tachanunRecitedSundays sets if tachanun should be recited on Sundays. Some chasidishe\r\n\t * communities do not recite tachanun on Sundays.\r\n\t * @see #isTachanunRecitedSundays()\r\n\t */\r\n public setTachanunRecitedSundays(tachanunRecitedSundays:boolean):void {\r\n this.tachanunRecitedSundays = tachanunRecitedSundays;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited in Mincha the entire year. Some chasidishe communities do not recite\r\n\t * tachanun by Mincha all year round. SeeNemukei Orach Chaim 131:3.\r\n\t * @return if tachanun is recited in Mincha the entire year.\r\n\t * @see #setTachanunRecitedMinchaAllYear(boolean)\r\n\t */\r\n public isTachanunRecitedMinchaAllYear():boolean {\r\n return this.tachanunRecitedMinchaAllYear;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited in Mincha the entire year.\r\n\t * @param tachanunRecitedMinchaAllYear sets if tachanun should be recited by mincha all year. If set\r\n\t * to false, {@link #isTachanunRecitedMincha(JewishCalendar)} will always return false. If set to true (the\r\n\t * default), it will use the regular rules.\r\n\t * @see #isTachanunRecitedMinchaAllYear()\r\n\t */\r\n public setTachanunRecitedMinchaAllYear(tachanunRecitedMinchaAllYear:boolean):void {\r\n this.tachanunRecitedMinchaAllYear = tachanunRecitedMinchaAllYear;\r\n }\r\n}", "import { Daf } from './limud/Daf.ts';\r\nimport { JewishDate } from './JewishDate.ts';\r\nimport { JewishCalendar, Parsha } from './JewishCalendar.ts';\r\nimport { IllegalArgumentException } from '../polyfills/errors.ts';\r\nimport { DafYomiYerushalmi } from './limud/YerushalmiYomiCalculator.ts';\r\n\r\n/**\r\n * The HebrewDateFormatter class formats a {@link JewishDate}.\r\n *\r\n * The class formats Jewish dates, numbers, Daf Yomi (Bavli and Yerushalmi), the Omer,\r\n * Parshas Hashavua (including the special parshiyos of Shekalim, Zachor, Parah\r\n * and Hachodesh), Yomim Tovim and the Molad (experimental) in Hebrew or Latin chars, and has various settings.\r\n * Sample full date output includes (using various options):\r\n * \"בראשית, נח, לך לך,\r\n * וירא, חיי שרה,\r\n * תולדות, ויצא, וישלח,\r\n * וישב, מקץ, ויגש, ויחי,\r\n * שמות, וארא, בא, בשלח,\r\n * יתרו, משפטים, תרומה,\r\n * תצוה, כי תשא, ויקהל,\r\n * פקודי, ויקרא, צו,\r\n * שמיני, תזריע, מצרע,\r\n * אחרי מות, קדושים,\r\n * אמור, בהר, בחקתי,\r\n * במדבר, נשא, בהעלתך,\r\n * שלח לך, קרח, חוקת, בלק,\r\n * פינחס, מטות, מסעי,\r\n * דברים, ואתחנן, עקב,\r\n * ראה, שופטים, כי תצא,\r\n * כי תבוא, D9;צבים, וילך,\r\n * האזינו, וזאת הברכה,\r\n * ויקהל פקודי, תזריע\r\n * מצרע, אחרי מות\r\n * קדושים, בהר בחקתי,\r\n * חוקת בלק, מטות מסעי,\r\n * נצבים וילך, שקלים,\r\n\t * זכור, פרה, החדש,\r\n\t * שובה,שירה,הגדול,\r\n\t * חזון,נחמו\"
\r\n */\r\n private readonly hebrewParshaMap: Record[\"ערב פסח\",\r\n * \"פסח\", \"חול המועד\r\n * פסח\", \"פסח שני\", \"ערב\r\n * שבועות\", \"שבועות\",\r\n * \"שבעה עשר בתמוז\",\r\n * \"תשעה באב\",\r\n * \"ט״ו באב\",\r\n * \"ערב ראש השנה\",\r\n * \"ראש השנה\",\r\n * \"צום גדליה\",\r\n * \"ערב יום כיפור\",\r\n * \"יום כיפור\",\r\n * \"ערב סוכות\",\r\n * \"סוכות\",\r\n * \"חול המועד סוכות\",\r\n * \"הושענא רבה\",\r\n * \"שמיני עצרת\",\r\n * \"שמחת תורה\",\r\n * \"ערב חנוכה\",\r\n * \"חנוכה\", \"עשרה בטבת\",\r\n * \"ט״ו בשבט\",\r\n * \"תענית אסתר\",\r\n * \"פורים\",\r\n * \"פורים שושן\",\r\n * \"פורים קטן\",\r\n * \"ראש חודש\",\r\n * \"יום השואה\",\r\n * \"יום הזיכרון\",\r\n * \"יום העצמאות\",\r\n * \"יום ירושלים\",\r\n * \"ל״ג בעומר\",\r\n * \"פורים שושן קטן\"]
\r\n */\r\n private static readonly hebrewHolidays: string[] = ['\\u05E2\\u05E8\\u05D1 \\u05E4\\u05E1\\u05D7', '\\u05E4\\u05E1\\u05D7',\r\n '\\u05D7\\u05D5\\u05DC \\u05D4\\u05DE\\u05D5\\u05E2\\u05D3 \\u05E4\\u05E1\\u05D7',\r\n '\\u05E4\\u05E1\\u05D7 \\u05E9\\u05E0\\u05D9', '\\u05E2\\u05E8\\u05D1 \\u05E9\\u05D1\\u05D5\\u05E2\\u05D5\\u05EA',\r\n '\\u05E9\\u05D1\\u05D5\\u05E2\\u05D5\\u05EA',\r\n '\\u05E9\\u05D1\\u05E2\\u05D4 \\u05E2\\u05E9\\u05E8 \\u05D1\\u05EA\\u05DE\\u05D5\\u05D6',\r\n '\\u05EA\\u05E9\\u05E2\\u05D4 \\u05D1\\u05D0\\u05D1', '\\u05D8\\u05F4\\u05D5 \\u05D1\\u05D0\\u05D1',\r\n '\\u05E2\\u05E8\\u05D1 \\u05E8\\u05D0\\u05E9 \\u05D4\\u05E9\\u05E0\\u05D4',\r\n '\\u05E8\\u05D0\\u05E9 \\u05D4\\u05E9\\u05E0\\u05D4', '\\u05E6\\u05D5\\u05DD \\u05D2\\u05D3\\u05DC\\u05D9\\u05D4',\r\n '\\u05E2\\u05E8\\u05D1 \\u05D9\\u05D5\\u05DD \\u05DB\\u05D9\\u05E4\\u05D5\\u05E8',\r\n '\\u05D9\\u05D5\\u05DD \\u05DB\\u05D9\\u05E4\\u05D5\\u05E8', '\\u05E2\\u05E8\\u05D1 \\u05E1\\u05D5\\u05DB\\u05D5\\u05EA',\r\n '\\u05E1\\u05D5\\u05DB\\u05D5\\u05EA',\r\n '\\u05D7\\u05D5\\u05DC \\u05D4\\u05DE\\u05D5\\u05E2\\u05D3 \\u05E1\\u05D5\\u05DB\\u05D5\\u05EA',\r\n '\\u05D4\\u05D5\\u05E9\\u05E2\\u05E0\\u05D0 \\u05E8\\u05D1\\u05D4',\r\n '\\u05E9\\u05DE\\u05D9\\u05E0\\u05D9 \\u05E2\\u05E6\\u05E8\\u05EA',\r\n '\\u05E9\\u05DE\\u05D7\\u05EA \\u05EA\\u05D5\\u05E8\\u05D4', '\\u05E2\\u05E8\\u05D1 \\u05D7\\u05E0\\u05D5\\u05DB\\u05D4',\r\n '\\u05D7\\u05E0\\u05D5\\u05DB\\u05D4', '\\u05E2\\u05E9\\u05E8\\u05D4 \\u05D1\\u05D8\\u05D1\\u05EA',\r\n '\\u05D8\\u05F4\\u05D5 \\u05D1\\u05E9\\u05D1\\u05D8', '\\u05EA\\u05E2\\u05E0\\u05D9\\u05EA \\u05D0\\u05E1\\u05EA\\u05E8',\r\n '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD', '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD \\u05E9\\u05D5\\u05E9\\u05DF',\r\n '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD \\u05E7\\u05D8\\u05DF', '\\u05E8\\u05D0\\u05E9 \\u05D7\\u05D5\\u05D3\\u05E9',\r\n '\\u05D9\\u05D5\\u05DD \\u05D4\\u05E9\\u05D5\\u05D0\\u05D4',\r\n '\\u05D9\\u05D5\\u05DD \\u05D4\\u05D6\\u05D9\\u05DB\\u05E8\\u05D5\\u05DF',\r\n '\\u05D9\\u05D5\\u05DD \\u05D4\\u05E2\\u05E6\\u05DE\\u05D0\\u05D5\\u05EA',\r\n '\\u05D9\\u05D5\\u05DD \\u05D9\\u05E8\\u05D5\\u05E9\\u05DC\\u05D9\\u05DD',\r\n '\\u05DC\\u05F4\\u05D2 \\u05D1\\u05E2\\u05D5\\u05DE\\u05E8',\r\n '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD \\u05E9\\u05D5\\u05E9\\u05DF \\u05E7\\u05D8\\u05DF',\r\n '\\u05D0\\u05E1\\u05E8\\u05D5 \\u05D7\\u05D2'];\r\n\r\n /**\r\n * Formats the Yom Tov (holiday) in Hebrew or transliterated Latin characters.\r\n *\r\n * @param jewishCalendar the JewishCalendar\r\n * @return the formatted holiday or an empty String if the day is not a holiday.\r\n * @see #isHebrewFormat()\r\n */\r\n public formatYomTov(jewishCalendar: JewishCalendar): string {\r\n const index: number = jewishCalendar.getYomTovIndex();\r\n if (index === JewishCalendar.CHANUKAH) {\r\n const dayOfChanukah: number = jewishCalendar.getDayOfChanukah();\r\n return this.hebrewFormat\r\n ? (`${this.formatHebrewNumber(dayOfChanukah)} ${HebrewDateFormatter.hebrewHolidays[index]}`)\r\n : (`${this.transliteratedHolidays[index]} ${dayOfChanukah}`);\r\n }\r\n if (index === -1) return '';\r\n return this.hebrewFormat ? HebrewDateFormatter.hebrewHolidays[index] : this.transliteratedHolidays[index];\r\n }\r\n\r\n /**\r\n * Formats a day as Rosh Chodesh in the format of in the format of ראש\r\n * חודש שבט or Rosh Chodesh Shevat. If it\r\n * is not Rosh Chodesh, an empty String
will be returned.\r\n * @param jewishCalendar the JewishCalendar\r\n * @return The formatted String
in the format of ראש\r\n * חודש שבט or Rosh Chodesh Shevat. If it\r\n * is not Rosh Chodesh, an empty String
will be returned.\r\n */\r\n public formatRoshChodesh(jewishCalendar: JewishCalendar): string {\r\n if (!jewishCalendar.isRoshChodesh()) return '';\r\n\r\n let formattedRoshChodesh: string;\r\n let month: number = jewishCalendar.getJewishMonth();\r\n if (jewishCalendar.getJewishDayOfMonth() === 30) {\r\n if (month < JewishCalendar.ADAR || (month === JewishCalendar.ADAR && jewishCalendar.isJewishLeapYear())) {\r\n month++;\r\n } else { // roll to Nissan\r\n month = JewishCalendar.NISSAN;\r\n }\r\n }\r\n\r\n // This method is only about formatting, so we shouldn't make any changes to the params passed in...\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n const _jewishCalendar = jewishCalendar.clone() as JewishCalendar;\r\n _jewishCalendar.setJewishMonth(month);\r\n formattedRoshChodesh = this.hebrewFormat ? HebrewDateFormatter.hebrewHolidays[JewishCalendar.ROSH_CHODESH]\r\n : this.transliteratedHolidays[JewishCalendar.ROSH_CHODESH];\r\n formattedRoshChodesh += ` ${this.formatMonth(_jewishCalendar)}`;\r\n return formattedRoshChodesh;\r\n }\r\n\r\n /**\r\n * Returns if the formatter is set to use Hebrew formatting in the various formatting methods.\r\n *\r\n * @return the hebrewFormat\r\n * @see #setHebrewFormat(boolean)\r\n * @see #format(JewishDate)\r\n * @see #formatDayOfWeek(JewishDate)\r\n * @see #formatMonth(JewishDate)\r\n * @see #formatOmer(JewishCalendar)\r\n * @see #formatParsha(JewishCalendar)\r\n * @see #formatYomTov(JewishCalendar)\r\n */\r\n public isHebrewFormat(): boolean {\r\n return this.hebrewFormat;\r\n }\r\n\r\n /**\r\n * Sets the formatter to format in Hebrew in the various formatting methods.\r\n *\r\n * @param hebrewFormat\r\n * the hebrewFormat to set\r\n * @see #isHebrewFormat()\r\n * @see #format(JewishDate)\r\n * @see #formatDayOfWeek(JewishDate)\r\n * @see #formatMonth(JewishDate)\r\n * @see #formatOmer(JewishCalendar)\r\n * @see #formatParsha(JewishCalendar)\r\n * @see #formatYomTov(JewishCalendar)\r\n */\r\n public setHebrewFormat(hebrewFormat: boolean): void {\r\n this.hebrewFormat = hebrewFormat;\r\n }\r\n\r\n /**\r\n * Returns the Hebrew Omer prefix. By default it is the letter ב producing\r\n * בעומר, but it can be set to ל to produce\r\n * לעומר (or any other prefix) using the {@link #setHebrewOmerPrefix(String)}.\r\n *\r\n * @return the hebrewOmerPrefix\r\n *\r\n * @see #hebrewOmerPrefix\r\n * @see #setHebrewOmerPrefix(String)\r\n * @see #formatOmer(JewishCalendar)\r\n */\r\n public getHebrewOmerPrefix(): string {\r\n return this.hebrewOmerPrefix;\r\n }\r\n\r\n /**\r\n * Method to set the Hebrew Omer prefix. By default it is the letter ב, but this allows setting it to a\r\n * ל (or any other prefix).\r\n *\r\n * @param hebrewOmerPrefix\r\n * the hebrewOmerPrefix to set. You can use the Unicode \u05DC to set it to ל.\r\n * @see #getHebrewOmerPrefix()\r\n * @see #formatOmer(JewishCalendar)\r\n */\r\n public setHebrewOmerPrefix(hebrewOmerPrefix: string): void {\r\n this.hebrewOmerPrefix = hebrewOmerPrefix;\r\n }\r\n\r\n /**\r\n * Returns the list of months transliterated into Latin chars. The default list of months uses Ashkenazi\r\n * pronunciation in typical American English spelling. This list has a length of 14 with 3 variations for Adar -\r\n * \"Adar\", \"Adar II\", \"Adar I\"\r\n *\r\n * @return the list of months beginning in Nissan and ending in in \"Adar\", \"Adar II\", \"Adar I\". The default list is\r\n * currently [\"Nissan\", \"Iyar\", \"Sivan\", \"Tammuz\", \"Av\", \"Elul\", \"Tishrei\", \"Cheshvan\", \"Kislev\", \"Teves\",\r\n * \"Shevat\", \"Adar\", \"Adar II\", \"Adar I\"].\r\n * @see #setTransliteratedMonthList(String[])\r\n */\r\n public getTransliteratedMonthList(): string[] {\r\n return this.transliteratedMonths;\r\n }\r\n\r\n /**\r\n * Setter method to allow overriding of the default list of months transliterated into into Latin chars. The default\r\n * uses Ashkenazi American English transliteration.\r\n *\r\n * @param transliteratedMonths\r\n * an array of 14 month names that defaults to [\"Nissan\", \"Iyar\", \"Sivan\", \"Tamuz\", \"Av\", \"Elul\", \"Tishrei\",\r\n * \"Heshvan\", \"Kislev\", \"Tevet\", \"Shevat\", \"Adar\", \"Adar II\", \"Adar I\"].\r\n * @see #getTransliteratedMonthList()\r\n */\r\n public setTransliteratedMonthList(transliteratedMonths: string[]): void {\r\n this.transliteratedMonths = transliteratedMonths;\r\n }\r\n\r\n /**\r\n * Unicode list of Hebrew months in the following format [\"\\u05E0\\u05D9\\u05E1\\u05DF\",\"\\u05D0\\u05D9\\u05D9\\u05E8\",\r\n * \"\\u05E1\\u05D9\\u05D5\\u05DF\",\"\\u05EA\\u05DE\\u05D5\\u05D6\",\"\\u05D0\\u05D1\",\"\\u05D0\\u05DC\\u05D5\\u05DC\",\r\n * \"\\u05EA\\u05E9\\u05E8\\u05D9\",\"\\u05D7\\u05E9\\u05D5\\u05DF\",\"\\u05DB\\u05E1\\u05DC\\u05D5\",\"\\u05D8\\u05D1\\u05EA\",\r\n * \"\\u05E9\\u05D1\\u05D8\",\"\\u05D0\\u05D3\\u05E8\",\"\\u05D0\\u05D3\\u05E8 \\u05D1\",\"\\u05D0\\u05D3\\u05E8 \\u05D0\"]
\r\n *\r\n * @see #formatMonth(JewishDate)\r\n */\r\n private hebrewMonths: string[] = ['\\u05E0\\u05D9\\u05E1\\u05DF', '\\u05D0\\u05D9\\u05D9\\u05E8',\r\n '\\u05E1\\u05D9\\u05D5\\u05DF', '\\u05EA\\u05DE\\u05D5\\u05D6', '\\u05D0\\u05D1', '\\u05D0\\u05DC\\u05D5\\u05DC',\r\n '\\u05EA\\u05E9\\u05E8\\u05D9', '\\u05D7\\u05E9\\u05D5\\u05DF', '\\u05DB\\u05E1\\u05DC\\u05D5',\r\n '\\u05D8\\u05D1\\u05EA', '\\u05E9\\u05D1\\u05D8', '\\u05D0\\u05D3\\u05E8', '\\u05D0\\u05D3\\u05E8 \\u05D1',\r\n '\\u05D0\\u05D3\\u05E8 \\u05D0'];\r\n\r\n /**\r\n * Unicode list of Hebrew days of week in the format of [\"ראשון\",\r\n * \"שני\",\"שלישי\",\"רביעי\",\r\n * \"חמישי\",\"ששי\",\"שבת\"]
\r\n */\r\n private static readonly hebrewDaysOfWeek: string[] = ['\\u05E8\\u05D0\\u05E9\\u05D5\\u05DF', '\\u05E9\\u05E0\\u05D9',\r\n '\\u05E9\\u05DC\\u05D9\\u05E9\\u05D9', '\\u05E8\\u05D1\\u05D9\\u05E2\\u05D9', '\\u05D7\\u05DE\\u05D9\\u05E9\\u05D9',\r\n '\\u05E9\\u05E9\\u05D9', '\\u05E9\\u05D1\\u05EA'];\r\n\r\n /**\r\n * Formats the day of week. If {@link #isHebrewFormat() Hebrew formatting} is set, it will display in the format\r\n * ראשון etc. If Hebrew formatting is not in use it will return it in the format\r\n * of Sunday etc. There are various formatting options that will affect the output.\r\n *\r\n * @param jewishDate the JewishDate Object\r\n * @return the formatted day of week\r\n * @see #isHebrewFormat()\r\n * @see #isLongWeekFormat()\r\n */\r\n public formatDayOfWeek(jewishDate: JewishDate): string {\r\n if (this.hebrewFormat) {\r\n if (this.isLongWeekFormat()) {\r\n return HebrewDateFormatter.hebrewDaysOfWeek[jewishDate.getDayOfWeek() - 1];\r\n }\r\n\r\n if (jewishDate.getDayOfWeek() === 7) {\r\n return this.formatHebrewNumber(300);\r\n }\r\n\r\n return this.formatHebrewNumber(jewishDate.getDayOfWeek());\r\n }\r\n\r\n if (jewishDate.getDayOfWeek() === 7) {\r\n if (this.isLongWeekFormat()) {\r\n return this.getTransliteratedShabbosDayOfWeek();\r\n }\r\n\r\n return this.getTransliteratedShabbosDayOfWeek().substring(0, 3);\r\n }\r\n\r\n const dateTime = jewishDate.getDate();\r\n return this.weekFormat\r\n ? dateTime.toLocaleString(undefined, this.weekFormat)\r\n : dateTime.toString();\r\n }\r\n\r\n /**\r\n * Returns whether the class is set to use the Geresh ׳ and Gershayim ״ in formatting Hebrew dates and\r\n * numbers. When true and output would look like כ״א שבט תש״כ\r\n * (or כ״א שבט תש״ך). When set to false, this output\r\n * would display as כא שבט תשכ.\r\n *\r\n * @return true if set to use the Geresh ׳ and Gershayim ״ in formatting Hebrew dates and numbers.\r\n */\r\n public isUseGershGershayim(): boolean {\r\n return this.useGershGershayim;\r\n }\r\n\r\n /**\r\n * Sets whether to use the Geresh ׳ and Gershayim ״ in formatting Hebrew dates and numbers. The default\r\n * value is true and output would look like כ״א שבט תש״כ\r\n * (or כ״א שבט תש״ך). When set to false, this output would\r\n * display as כא שבט תשכ (or\r\n * כא שבט תשך). Single digit days or month or years such as כ׳\r\n * שבט ו׳ אלפים show the use of the Geresh.\r\n *\r\n * @param useGershGershayim\r\n * set to false to omit the Geresh ׳ and Gershayim ״ in formatting\r\n */\r\n public setUseGershGershayim(useGershGershayim: boolean): void {\r\n this.useGershGershayim = useGershGershayim;\r\n }\r\n\r\n /**\r\n * Returns whether the class is set to use the מנצפ״ך letters when\r\n * formatting years ending in 20, 40, 50, 80 and 90 to produce תש״פ if false or\r\n * or תש״ף if true. Traditionally non-final form letters are used, so the year\r\n * 5780 would be formatted as תש״פ if the default false is used here. If this returns\r\n * true, the format תש״ף would be used.\r\n *\r\n * @return true if set to use final form letters when formatting Hebrew years. The default value is false.\r\n */\r\n public isUseFinalFormLetters(): boolean {\r\n return this.useFinalFormLetters;\r\n }\r\n\r\n /**\r\n * When formatting a Hebrew Year, traditionally years ending in 20, 40, 50, 80 and 90 are formatted using non-final\r\n * form letters for example תש״פ for the year 5780. Setting this to true (the default\r\n * is false) will use the final form letters for מנצפ״ך and will format\r\n * the year 5780 as תש״ף.\r\n *\r\n * @param useFinalFormLetters\r\n * Set this to true to use final form letters when formatting Hebrew years.\r\n */\r\n public setUseFinalFormLetters(useFinalFormLetters: boolean): void {\r\n this.useFinalFormLetters = useFinalFormLetters;\r\n }\r\n\r\n /**\r\n * Returns whether the class is set to use the thousands digit when formatting. When formatting a Hebrew Year,\r\n * traditionally the thousands digit is omitted and output for a year such as 5729 (1969 Gregorian) would be\r\n * calculated for 729 and format as תשכ״ט. When set to true the long format year such\r\n * as ה׳ תשכ״ט for 5729/1969 is returned.\r\n *\r\n * @return true if set to use the thousands digit when formatting Hebrew dates and numbers.\r\n */\r\n public isUseLongHebrewYears(): boolean {\r\n return this.useLonghebrewYears;\r\n }\r\n\r\n /**\r\n * When formatting a Hebrew Year, traditionally the thousands digit is omitted and output for a year such as 5729\r\n * (1969 Gregorian) would be calculated for 729 and format as תשכ״ט. This method\r\n * allows setting this to true to return the long format year such as ה׳\r\n * תשכ״ט for 5729/1969.\r\n *\r\n * @param useLongHebrewYears\r\n * Set this to true to use the long formatting\r\n */\r\n public setUseLongHebrewYears(useLongHebrewYears: boolean): void {\r\n this.useLonghebrewYears = useLongHebrewYears;\r\n }\r\n\r\n /**\r\n * Formats the Jewish date. If the formatter is set to Hebrew, it will format in the form, \"day Month year\" for\r\n * example כ״א שבט תשכ״ט, and the format\r\n * \"21 Shevat, 5729\" if not.\r\n *\r\n * @param jewishDate\r\n * the JewishDate to be formatted\r\n * @return the formatted date. If the formatter is set to Hebrew, it will format in the form, \"day Month year\" for\r\n * example כ״א שבט תשכ״ט, and the format\r\n * \"21 Shevat, 5729\" if not.\r\n */\r\n public format(jewishDate: JewishDate): string {\r\n if (this.isHebrewFormat()) {\r\n return `${this.formatHebrewNumber(jewishDate.getJewishDayOfMonth())} ${this.formatMonth(jewishDate)} ${this.formatHebrewNumber(jewishDate.getJewishYear())}`;\r\n }\r\n return `${jewishDate.getJewishDayOfMonth()} ${this.formatMonth(jewishDate)}, ${jewishDate.getJewishYear()}`;\r\n }\r\n\r\n /**\r\n * Returns a string of the current Hebrew month such as \"Tishrei\". Returns a string of the current Hebrew month such\r\n * as \"אדר ב׳\".\r\n *\r\n * @param jewishDate\r\n * the JewishDate to format\r\n * @return the formatted month name\r\n * @see #isHebrewFormat()\r\n * @see #setHebrewFormat(boolean)\r\n * @see #getTransliteratedMonthList()\r\n * @see #setTransliteratedMonthList(String[])\r\n */\r\n public formatMonth(jewishDate: JewishDate): string {\r\n const month: number = jewishDate.getJewishMonth();\r\n if (this.isHebrewFormat()) {\r\n if (jewishDate.isJewishLeapYear() && month === JewishDate.ADAR) {\r\n return this.hebrewMonths[13] + (this.useGershGershayim ? HebrewDateFormatter.GERESH : ''); // return Adar I, not Adar in a leap year\r\n } else if (jewishDate.isJewishLeapYear() && month === JewishDate.ADAR_II) {\r\n return this.hebrewMonths[12] + (this.useGershGershayim ? HebrewDateFormatter.GERESH : '');\r\n }\r\n return this.hebrewMonths[month - 1];\r\n }\r\n\r\n if (jewishDate.isJewishLeapYear() && month === JewishDate.ADAR) {\r\n return this.transliteratedMonths[13]; // return Adar I, not Adar in a leap year\r\n }\r\n\r\n return this.transliteratedMonths[month - 1];\r\n }\r\n\r\n /**\r\n * Returns a String of the Omer day in the form ל״ג בעומר if\r\n * Hebrew Format is set, or \"Omer X\" or \"Lag B'Omer\" if not. An empty string if there is no Omer this day.\r\n *\r\n * @param jewishCalendar\r\n * the JewishCalendar to be formatted\r\n *\r\n * @return a String of the Omer day in the form or an empty string if there is no Omer this day. The default\r\n * formatting has a ב׳ prefix that would output בעומר, but this\r\n * can be set via the {@link #setHebrewOmerPrefix(String)} method to use a ל and output\r\n * ל״ג לעומר.\r\n * @see #isHebrewFormat()\r\n * @see #getHebrewOmerPrefix()\r\n * @see #setHebrewOmerPrefix(String)\r\n */\r\n public formatOmer(jewishCalendar: JewishCalendar): string {\r\n const omer: number = jewishCalendar.getDayOfOmer();\r\n if (omer === -1) {\r\n return '';\r\n }\r\n\r\n if (this.hebrewFormat) {\r\n return `${this.formatHebrewNumber(omer)} ${this.hebrewOmerPrefix}\u05E2\u05D5\u05DE\u05E8`;\r\n }\r\n\r\n if (omer === 33) { // if Lag B'Omer\r\n return this.transliteratedHolidays[33];\r\n }\r\n\r\n return `Omer ${omer}`;\r\n }\r\n\r\n /**\r\n * Formats a molad.\r\n * TODO: Experimental and incomplete\r\n *\r\n * @param moladChalakim - the chalakim of the molad\r\n * @return the formatted molad. FIXME: define proper format in English and Hebrew.\r\n */\r\n private static formatMolad(moladChalakim: number): string {\r\n let adjustedChalakim: number = moladChalakim;\r\n const MINUTE_CHALAKIM: number = 18;\r\n const HOUR_CHALAKIM: number = 1080;\r\n const DAY_CHALAKIM: number = 24 * HOUR_CHALAKIM;\r\n\r\n let days: number = adjustedChalakim / DAY_CHALAKIM;\r\n adjustedChalakim -= (days * DAY_CHALAKIM);\r\n const hours: number = Math.trunc(adjustedChalakim / HOUR_CHALAKIM);\r\n if (hours >= 6) {\r\n days += 1;\r\n }\r\n adjustedChalakim -= (hours * HOUR_CHALAKIM);\r\n const minutes: number = Math.trunc(adjustedChalakim / MINUTE_CHALAKIM);\r\n adjustedChalakim -= minutes * MINUTE_CHALAKIM;\r\n return `Day: ${days % 7} hours: ${hours}, minutes: ${minutes}, chalakim: ${adjustedChalakim}`;\r\n }\r\n\r\n /**\r\n * Returns the kviah in the traditional 3 letter Hebrew format where the first letter represents the day of week of\r\n * Rosh Hashana, the second letter represents the lengths of Cheshvan and Kislev ({@link JewishDate#SHELAIMIM\r\n * Shelaimim} , {@link JewishDate#KESIDRAN Kesidran} or {@link JewishDate#CHASERIM Chaserim}) and the 3rd letter\r\n * represents the day of week of Pesach. For example 5729 (1969) would return בשה (Rosh Hashana on\r\n * Monday, Shelaimim, and Pesach on Thursday), while 5771 (2011) would return השג (Rosh Hashana on\r\n * Thursday, Shelaimim, and Pesach on Tuesday).\r\n *\r\n * @param jewishYear\r\n * the Jewish year\r\n * @return the Hebrew String such as בשה for 5729 (1969) and השג for 5771\r\n * (2011).\r\n */\r\n public getFormattedKviah(jewishYear: number): string {\r\n const jewishDate: JewishDate = new JewishDate(jewishYear, JewishDate.TISHREI, 1); // set date to Rosh Hashana\r\n const kviah: number = jewishDate.getCheshvanKislevKviah();\r\n const roshHashanaDayOfweek: number = jewishDate.getDayOfWeek();\r\n let returnValue: string = this.formatHebrewNumber(roshHashanaDayOfweek);\r\n returnValue += (kviah === JewishDate.CHASERIM ? '\\u05D7' : kviah === JewishDate.SHELAIMIM ? '\\u05E9' : '\\u05DB');\r\n jewishDate.setJewishDate(jewishYear, JewishDate.NISSAN, 15); // set to Pesach of the given year\r\n const pesachDayOfweek: number = jewishDate.getDayOfWeek();\r\n returnValue += this.formatHebrewNumber(pesachDayOfweek);\r\n returnValue = returnValue.replace(new RegExp(HebrewDateFormatter.GERESH, 'g'), ''); // geresh is never used in the kviah format\r\n // boolean isLeapYear = JewishDate.isJewishLeapYear(jewishYear);\r\n // for efficiency we can avoid the expensive recalculation of the pesach day of week by adding 1 day to Rosh\r\n // Hashana for a 353 day year, 2 for a 354 day year, 3 for a 355 or 383 day year, 4 for a 384 day year and 5 for\r\n // a 385 day year\r\n return returnValue;\r\n }\r\n\r\n /**\r\n * Formats the Daf Yomi Yerushalmi in the format\r\n * of \"עירובין נ״ב\" in {@link #isHebrewFormat() Hebrew}, or\r\n * the transliterated format of \"Eruvin 52\".\r\n *\r\n * @param daf the Daf to be formatted.\r\n * @return the formatted daf.\r\n */\r\n public formatDafYomi(daf: Daf): string {\r\n if (daf == null) {\r\n if (this.hebrewFormat) {\r\n return DafYomiYerushalmi.getMasechtos()[39];\r\n }\r\n\r\n return DafYomiYerushalmi.getMasechtosTransliterated()[39];\r\n }\r\n\r\n if (this.hebrewFormat) {\r\n return daf.getMasechta() + ' ' + this.formatHebrewNumber(daf.getDaf());\r\n }\r\n\r\n return daf.getMasechtaTransliterated() + ' ' + daf.getDaf();\r\n }\r\n\r\n /**\r\n * Returns a Hebrew formatted string of a number. The method can calculate from 0 - 9999.\r\n * \r\n * This is the definition of lexicographic ordering. If two strings are\r\n * different, then either they have different characters at some index\r\n * that is a valid index for both strings, or their lengths are different,\r\n * or both. If they have different characters at one or more index\r\n * positions, let k be the smallest such index; then the string\r\n * whose character at position k has the smaller value, as\r\n * determined by using the < operator, lexicographically precedes the\r\n * other string. In this case, {@code compareTo} returns the\r\n * difference of the two character values at position {@code k} in\r\n * the two string -- that is, the value:\r\n *
\r\n * If there is no index position at which they differ, then the shorter\r\n * string lexicographically precedes the longer string. In this case,\r\n * {@code compareTo} returns the difference of the lengths of the\r\n * strings -- that is, the value:\r\n *\r\n * this.charAt(k)-anotherString.charAt(k)\r\n *
\r\n *\r\n * @param string1\r\n * @param string2 the {@code String} to be compared.\r\n * @return the value {@code 0} if the argument string is equal to\r\n * this string; a value less than {@code 0} if this string\r\n * is lexicographically less than the string argument; and a\r\n * value greater than {@code 0} if this string is\r\n * lexicographically greater than the string argument.\r\n */\r\n export function compareTo(string1: string, string2: string): number {\r\n let k: number = 0;\r\n while (k < Math.min(string1.length, string2.length)) {\r\n if (string1.substr(k, 1) !== string2.substr(k, 1)) {\r\n return string1.charCodeAt(k) - string2.charCodeAt(k);\r\n }\r\n k++;\r\n }\r\n return string1.length - string2.length;\r\n }\r\n}\r\n\r\nexport namespace IntegerUtils {\r\n /**\r\n * Compares 2 numbers\r\n * @param x\r\n * @param y\r\n */\r\n export function compare(x: number, y: number): number {\r\n if (x === y) return 0;\r\n return x > y ? 1 : -1;\r\n }\r\n\r\n}\r\n\r\n// export const Long_MIN_VALUE = 0;\r\nexport const Long_MIN_VALUE = NaN;\r\n\r\n/**\r\n * @param {number} num\r\n * @param {number} places - The number of places to pad with zeros\r\n * @returns {string} - The formatted integer\r\n */\r\nexport function padZeros(num: number, places: number): string {\r\n const int = Math.trunc(num);\r\n if (int >= Math.pow(10, places)) return int.toString();\r\n return '0'.repeat(places).concat(int.toString()).slice(-places);\r\n}", "/* eslint-disable max-classes-per-file */\r\nclass BaseCustomError extends Error {\r\n constructor(message?: string) {\r\n super(message);\r\n this.name = this.constructor.name;\r\n }\r\n}\r\n\r\nexport class NullPointerException extends BaseCustomError {\r\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\r\n constructor() {\r\n super();\r\n }\r\n}\r\n\r\nexport class IllegalArgumentException extends BaseCustomError {}\r\n\r\nexport class UnsupportedError extends BaseCustomError {}\r\n", "import { MathUtils, TimeZone } from '../polyfills/Utils.ts';\r\nimport { IllegalArgumentException, UnsupportedError } from '../polyfills/errors.ts';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\n/**\r\n * A class that contains location information such as latitude and longitude required for astronomical calculations. The\r\n * elevation field may not be used by some calculation engines and would be ignored if set. Check the documentation for\r\n * specific implementations of the {@link AstronomicalCalculator} to see if elevation is calculated as part of the\r\n * algorithm.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2016\r\n * @version 1.1\r\n */\r\nexport class GeoLocation {\r\n /**\r\n * @see #getLatitude()\r\n * @see #setLatitude(double)\r\n * @see #setLatitude(int, int, double, String)\r\n */\r\n private latitude!: number;\r\n\r\n /**\r\n * @see #getLongitude()\r\n * @see #setLongitude(double)\r\n * @see #setLongitude(int, int, double, String)\r\n */\r\n private longitude!: number;\r\n\r\n /**\r\n * @see #getLocationName()\r\n * @see #setLocationName(String)\r\n */\r\n private locationName: string | null = null;\r\n\r\n /**\r\n * @see #getTimeZone()\r\n * @see #setTimeZone(TimeZone)\r\n */\r\n private timeZoneId!: string;\r\n\r\n /**\r\n * @see #getElevation()\r\n * @see #setElevation(double)\r\n */\r\n private elevation!: number;\r\n\r\n /**\r\n * Constant for a distance type calculation.\r\n * @see #getGeodesicDistance(GeoLocation)\r\n */\r\n private static readonly DISTANCE: number = 0;\r\n\r\n /**\r\n * Constant for a initial bearing type calculation.\r\n * @see #getGeodesicInitialBearing(GeoLocation)\r\n */\r\n private static readonly INITIAL_BEARING: number = 1;\r\n\r\n /**\r\n * Constant for a final bearing type calculation.\r\n * @see #getGeodesicFinalBearing(GeoLocation)\r\n */\r\n private static readonly FINAL_BEARING: number = 2;\r\n\r\n /** constant for nanoseconds in a minute (60 * 1000 * 1000 * 1000) */\r\n private static readonly MINUTE_NANOS = Temporal.Duration.from({ minutes: 1 }).total('nanoseconds');\r\n\r\n /** constant for nanoseconds in an hour (3,600,000) */\r\n private static readonly HOUR_NANOS: number = Temporal.Duration.from({ hours: 1 }).total('nanoseconds');\r\n\r\n /**\r\n * Method to get the elevation in Meters.\r\n *\r\n * @return Returns the elevation in Meters.\r\n */\r\n public getElevation(): number {\r\n return this.elevation;\r\n }\r\n\r\n /**\r\n * Method to set the elevation in Meters above sea level.\r\n *\r\n * @param elevation\r\n * The elevation to set in Meters. An IllegalArgumentException will be thrown if the value is a negative.\r\n */\r\n public setElevation(elevation: number): void {\r\n if (elevation < 0) {\r\n throw new IllegalArgumentException('Elevation cannot be negative');\r\n }\r\n this.elevation = elevation;\r\n }\r\n\r\n /**\r\n * GeoLocation constructor with parameters for all required fields.\r\n *\r\n * @param name\r\n * The location name for display use such as "Lakewood, NJ"\r\n * @param latitude\r\n * the latitude in a double format such as 40.095965 for Lakewood, NJ.\r\n * Note: For latitudes south of the equator, a negative value should be used.\r\n * @param longitude\r\n * double the longitude in a double format such as -74.222130 for Lakewood, NJ.\r\n * Note: For longitudes east of the Prime\r\n * Meridian (Greenwich), a negative value should be used.\r\n * @param timeZone\r\n * the\r\n * this.length()-anotherString.length()\r\n *
TimeZone
for the location.\r\n */\r\n\r\n /*\r\n public GeoLocation(String name, double latitude, double longitude, TimeZone timeZone) {\r\n this(name, latitude, longitude, 0, timeZone);\r\n }\r\n */\r\n\r\n /**\r\n * GeoLocation constructor with parameters for all required fields.\r\n *\r\n * @param name\r\n * The location name for display use such as "Lakewood, NJ"\r\n * @param latitude\r\n * the latitude in a double format such as 40.095965 for Lakewood, NJ.\r\n * Note: For latitudes south of the equator, a negative value should be used.\r\n * @param longitude\r\n * double the longitude in a double format such as -74.222130 for Lakewood, NJ.\r\n * Note: For longitudes east of the Prime\r\n * Meridian (Greenwich), a negative value should be used.\r\n * @param elevation\r\n * the elevation above sea level in Meters. Elevation is not used in most algorithms used for calculating\r\n * sunrise and set.\r\n * @param timeZoneId\r\n * the TimeZone
for the location.\r\n */\r\n constructor(name: string | null, latitude: number, longitude: number, elevation: number, timeZoneId?: string);\r\n constructor(name: string | null, latitude: number, longitude: number, timeZoneId: string);\r\n constructor(name: string | null, latitude: number, longitude: number, elevationOrTimeZoneId?: number | string, timeZoneId?: string) {\r\n let elevation: number = 0;\r\n if (timeZoneId) {\r\n elevation = elevationOrTimeZoneId as number;\r\n } else {\r\n timeZoneId = elevationOrTimeZoneId as string;\r\n }\r\n\r\n this.setLocationName(name);\r\n this.setLatitude(latitude);\r\n this.setLongitude(longitude);\r\n this.setElevation(elevation);\r\n this.setTimeZone(timeZoneId);\r\n }\r\n\r\n /**\r\n * Default GeoLocation constructor will set location to the Prime Meridian at Greenwich, England and a TimeZone of\r\n * GMT. The longitude will be set to 0 and the latitude will be 51.4772 to match the location of the Royal Observatory, Greenwich . No daylight savings time will be used.\r\n */\r\n /*\r\n public GeoLocation() {\r\n setLocationName(\"Greenwich, England\");\r\n setLongitude(0); // added for clarity\r\n setLatitude(51.4772);\r\n setTimeZone(TimeZone.getTimeZone(\"GMT\"));\r\n }\r\n */\r\n\r\n /**\r\n * Method to set the latitude.\r\n *\r\n * @param latitude\r\n * The degrees of latitude to set. The values should be between -90° and 90°. An\r\n * IllegalArgumentException will be thrown if the value exceeds the limit. For example 40.095965 would be\r\n * used for Lakewood, NJ. Note: For latitudes south of the equator, a negative value should be\r\n * used.\r\n */\r\n\r\n /*\r\n public setLatitude(latitude: number): void {\r\n if (latitude > 90 || latitude < -90) {\r\n throw new IllegalArgumentException(\"Latitude must be between -90 and 90\");\r\n }\r\n this.latitude = latitude;\r\n }\r\n */\r\n\r\n /**\r\n * Method to set the latitude in degrees, minutes and seconds.\r\n *\r\n * @param degrees\r\n * The degrees of latitude to set between 0° and 90°. For example 40 would be used for Lakewood, NJ.\r\n * An IllegalArgumentException will be thrown if the value exceeds the limit.\r\n * @param minutes\r\n * minutes of arc\r\n * @param seconds\r\n * seconds of arc\r\n * @param direction\r\n * N for north and S for south. An IllegalArgumentException will be thrown if the value is not S or N.\r\n */\r\n public setLatitude(degrees: number, minutes: number, seconds: number, direction: 'N' | 'S'): void;\r\n public setLatitude(latitude: number): void;\r\n public setLatitude(degreesOrLatitude: number, minutes?: number, seconds?: number, direction?: 'N' | 'S'): void {\r\n if (!minutes) {\r\n const latitude: number = degreesOrLatitude;\r\n\r\n if (latitude > 90 || latitude < -90) {\r\n throw new IllegalArgumentException('Latitude must be between -90 and 90');\r\n }\r\n\r\n this.latitude = latitude;\r\n } else {\r\n const degrees: number = degreesOrLatitude;\r\n\r\n let tempLat: number = degrees + ((minutes + (seconds! / 60)) / 60);\r\n if (tempLat > 90 || tempLat < 0) { // FIXME An exception should be thrown if degrees, minutes or seconds are negative\r\n throw new IllegalArgumentException('Latitude must be between 0 and 90. Use direction of S instead of negative.');\r\n }\r\n if (direction === 'S') {\r\n tempLat *= -1;\r\n } else if (!(direction === 'N')) {\r\n throw new IllegalArgumentException('Latitude direction must be N or S');\r\n }\r\n this.latitude = tempLat;\r\n }\r\n }\r\n\r\n /**\r\n * @return Returns the latitude.\r\n */\r\n public getLatitude(): number {\r\n return this.latitude;\r\n }\r\n\r\n /**\r\n * Method to set the longitude in a double format.\r\n *\r\n * @param longitude\r\n * The degrees of longitude to set in a double format between -180° and 180°. An\r\n * IllegalArgumentException will be thrown if the value exceeds the limit. For example -74.2094 would be\r\n * used for Lakewood, NJ. Note: for longitudes east of the Prime Meridian (Greenwich) a negative value\r\n * should be used.\r\n */\r\n\r\n /*\r\n public setLongitude(longitude: number): void {\r\n if (longitude > 180 || longitude < -180) {\r\n throw new IllegalArgumentException(\"Longitude must be between -180 and 180\");\r\n }\r\n this.longitude = longitude;\r\n }\r\n */\r\n\r\n /**\r\n * Method to set the longitude in degrees, minutes and seconds.\r\n *\r\n * @param degrees\r\n * The degrees of longitude to set between 0° and 180°. As an example 74 would be set for Lakewood, NJ.\r\n * An IllegalArgumentException will be thrown if the value exceeds the limits.\r\n * @param minutes\r\n * minutes of arc\r\n * @param seconds\r\n * seconds of arc\r\n * @param direction\r\n * E for east of the Prime Meridian or W for west of it.\r\n * An IllegalArgumentException will be thrown if\r\n * the value is not E or W.\r\n */\r\n public setLongitude(degrees: number, minutes: number, seconds: number, direction: 'E' | 'W'): void;\r\n public setLongitude(longitude: number): void;\r\n public setLongitude(degreesOrLongitude: number, minutes?: number, seconds?: number, direction?: 'E' | 'W'): void {\r\n if (!minutes) {\r\n const longitude: number = degreesOrLongitude;\r\n\r\n if (longitude > 180 || longitude < -180) {\r\n throw new IllegalArgumentException('Longitude must be between -180 and 180');\r\n }\r\n\r\n this.longitude = longitude;\r\n } else {\r\n const degrees: number = degreesOrLongitude;\r\n\r\n let longTemp: number = degrees + ((minutes + (seconds! / 60)) / 60);\r\n if (longTemp > 180 || this.longitude < 0) { // FIXME An exception should be thrown if degrees, minutes or seconds are negative\r\n throw new IllegalArgumentException('Longitude must be between 0 and 180. Use a direction of W instead of negative.');\r\n }\r\n if (direction === 'W') {\r\n longTemp *= -1;\r\n } else if (!(direction === 'E')) {\r\n throw new IllegalArgumentException('Longitude direction must be E or W');\r\n }\r\n this.longitude = longTemp;\r\n }\r\n }\r\n\r\n /**\r\n * @return Returns the longitude.\r\n */\r\n public getLongitude(): number {\r\n return this.longitude;\r\n }\r\n\r\n /**\r\n * @return Returns the location name.\r\n */\r\n public getLocationName(): string | null {\r\n return this.locationName;\r\n }\r\n\r\n /**\r\n * @param name\r\n * The setter method for the display name.\r\n */\r\n public setLocationName(name: string | null): void {\r\n this.locationName = name;\r\n }\r\n\r\n /**\r\n * @return Returns the timeZone.\r\n */\r\n public getTimeZone(): string {\r\n return this.timeZoneId;\r\n }\r\n\r\n /**\r\n * Method to set the TimeZone. If this is ever set after the GeoLocation is set in the\r\n * {@link AstronomicalCalendar}, it is critical that\r\n * {@link AstronomicalCalendar#getCalendar()}.\r\n * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} be called in order for the\r\n * AstronomicalCalendar to output times in the expected offset. This situation will arise if the\r\n * AstronomicalCalendar is ever {@link AstronomicalCalendar#clone() cloned}.\r\n *\r\n * @param timeZone\r\n * The timeZone to set.\r\n */\r\n public setTimeZone(timeZoneId: string): void {\r\n this.timeZoneId = timeZoneId;\r\n }\r\n\r\n /**\r\n * A method that will return the location's local mean time offset in nanoseconds from local standard time. The globe is split into 360°, with\r\n * 15° per hour of the day. For a local that is at a longitude that is evenly divisible by 15 (longitude % 15 ==\r\n * 0), at solar {@link AstronomicalCalendar#getSunTransit() noon} (with adjustment for the equation of time) the sun should be directly overhead,\r\n * so a user who is 1° west of this will have noon at 4 minutes after standard time noon, and conversely, a user\r\n * who is 1° east of the 15° longitude will have noon at 11:56 AM. Lakewood, N.J., whose longitude is\r\n * -74.2094, is 0.7906 away from the closest multiple of 15 at -75°. This is multiplied by 4 to yield 3 minutes\r\n * and 10 seconds earlier than standard time. The offset returned does not account for the Daylight saving time offset since this class is\r\n * unaware of dates.\r\n *\r\n * @return the offset in nanoseconds not accounting for Daylight saving time. A positive value will be returned\r\n * East of the 15° timezone line, and a negative value West of it.\r\n * @since 1.1\r\n */\r\n public getLocalMeanTimeOffset(): number {\r\n return this.getLongitude() * 4 * GeoLocation.MINUTE_NANOS - TimeZone.getRawOffset(this.getTimeZone());\r\n }\r\n\r\n /**\r\n * Adjust the date for antimeridian crossover. This is\r\n * needed to deal with edge cases such as Samoa that use a different calendar date than expected based on their\r\n * geographic location.\r\n *\r\n * The actual Time Zone offset may deviate from the expected offset based on the longitude. Since the 'absolute time'\r\n * calculations are always based on longitudinal offset from UTC for a given date, the date is presumed to only\r\n * increase East of the Prime Meridian, and to only decrease West of it. For Time Zones that cross the antimeridian,\r\n * the date will be artificially adjusted before calculation to conform with this presumption.\r\n *\r\n * For example, Apia, Samoa with a longitude of -171.75 uses a local offset of +14:00. When calculating sunrise for\r\n * 2018-02-03, the calculator should operate using 2018-02-02 since the expected zone is -11. After determining the\r\n * UTC time, the local DST offset of UTC+14:00 should be applied\r\n * to bring the date back to 2018-02-03.\r\n *\r\n * @return the number of days to adjust the date This will typically be 0 unless the date crosses the antimeridian\r\n */\r\n public getAntimeridianAdjustment(): -1 | 1 | 0 {\r\n const localHoursOffset: number = this.getLocalMeanTimeOffset() / GeoLocation.HOUR_NANOS;\r\n\r\n // if the offset is 20 hours or more in the future (never expected anywhere other\r\n // than a location using a timezone across the anti meridian to the east such as Samoa)\r\n if (localHoursOffset >= 20) {\r\n // roll the date forward a day\r\n return 1;\r\n } else if (localHoursOffset <= -20) {\r\n // if the offset is 20 hours or more in the past (no current location is known\r\n // that crosses the antimeridian to the west, but better safe than sorry)\r\n // roll the date back a day\r\n return -1;\r\n }\r\n // 99.999% of the world will have no adjustment\r\n return 0;\r\n }\r\n\r\n /**\r\n * Calculate the initial geodesic bearing between this\r\n * Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics on the Ellipsoid\r\n * with application of nested equations\", Survey Review, vol XXII no 176, 1975\r\n *\r\n * @param location\r\n * the destination location\r\n * @return the initial bearing\r\n */\r\n public getGeodesicInitialBearing(location: GeoLocation): number {\r\n return this.vincentyFormula(location, GeoLocation.INITIAL_BEARING);\r\n }\r\n\r\n /**\r\n * Calculate the final geodesic bearing between this Object\r\n * and a second Object passed to this method using Thaddeus\r\n * Vincenty's inverse formula See T Vincenty, \"Direct and\r\n * Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations\", Survey Review, vol\r\n * XXII no 176, 1975\r\n *\r\n * @param location\r\n * the destination location\r\n * @return the final bearing\r\n */\r\n public getGeodesicFinalBearing(location: GeoLocation): number {\r\n return this.vincentyFormula(location, GeoLocation.FINAL_BEARING);\r\n }\r\n\r\n /**\r\n * Calculate geodesic distance in Meters between\r\n * this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics on the Ellipsoid\r\n * with application of nested equations\", Survey Review, vol XXII no 176, 1975\r\n *\r\n * @see #vincentyFormula(GeoLocation, int)\r\n * @param location\r\n * the destination location\r\n * @return the geodesic distance in Meters\r\n */\r\n public getGeodesicDistance(location: GeoLocation): number {\r\n return this.vincentyFormula(location, GeoLocation.DISTANCE);\r\n }\r\n\r\n /**\r\n * Calculate geodesic distance in Meters between\r\n * this Object and a second Object passed to this method using Thaddeus Vincenty's inverse formula See T Vincenty, \"Direct and Inverse Solutions of Geodesics on the Ellipsoid\r\n * with application of nested equations\", Survey Review, vol XXII no 176, 1975\r\n *\r\n * @param location\r\n * the destination location\r\n * @param formula\r\n * This formula calculates initial bearing ({@link #INITIAL_BEARING}), final bearing (\r\n * {@link #FINAL_BEARING}) and distance ({@link #DISTANCE}).\r\n * @return geodesic distance in Meters\r\n */\r\n private vincentyFormula(location: GeoLocation, formula: number): number {\r\n const a: number = 6378137;\r\n const b: number = 6356752.3142;\r\n const f: number = 1 / 298.257223563; // WGS-84 ellipsiod\r\n const L: number = MathUtils.degreesToRadians(location.getLongitude() - this.getLongitude());\r\n const U1: number = Math.atan((1 - f) * Math.tan(MathUtils.degreesToRadians(this.getLatitude())));\r\n const U2: number = Math.atan((1 - f) * Math.tan(MathUtils.degreesToRadians(location.getLatitude())));\r\n const sinU1: number = Math.sin(U1);\r\n const cosU1: number = Math.cos(U1);\r\n const sinU2: number = Math.sin(U2);\r\n const cosU2: number = Math.cos(U2);\r\n\r\n let lambda: number = L;\r\n let lambdaP: number = 2 * Math.PI;\r\n let iterLimit: number = 20;\r\n let sinLambda: number = 0;\r\n let cosLambda: number = 0;\r\n let sinSigma: number = 0;\r\n let cosSigma: number = 0;\r\n let sigma: number = 0;\r\n let sinAlpha: number = 0;\r\n let cosSqAlpha: number = 0;\r\n let cos2SigmaM: number = 0;\r\n let C: number;\r\n\r\n while (Math.abs(lambda - lambdaP) > 1e-12 && --iterLimit > 0) {\r\n sinLambda = Math.sin(lambda);\r\n cosLambda = Math.cos(lambda);\r\n sinSigma = Math.sqrt((cosU2 * sinLambda) * (cosU2 * sinLambda)\r\n + (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda) * (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda));\r\n if (sinSigma === 0) return 0; // co-incident points\r\n cosSigma = sinU1 * sinU2 + cosU1 * cosU2 * cosLambda;\r\n sigma = Math.atan2(sinSigma, cosSigma);\r\n sinAlpha = (cosU1 * cosU2 * sinLambda) / sinSigma;\r\n cosSqAlpha = 1 - sinAlpha * sinAlpha;\r\n cos2SigmaM = cosSigma - 2 * sinU1 * sinU2 / cosSqAlpha;\r\n if (Number.isNaN(cos2SigmaM)) cos2SigmaM = 0; // equatorial line: cosSqAlpha=0 (\u00A76)\r\n C = f / 16 * cosSqAlpha * (4 + f * (4 - 3 * cosSqAlpha));\r\n lambdaP = lambda;\r\n lambda = L + (1 - C) * f * sinAlpha\r\n * (sigma + C * sinSigma * (cos2SigmaM + C * cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM)));\r\n }\r\n if (iterLimit === 0) return Number.NaN; // formula failed to converge\r\n\r\n const uSq: number = cosSqAlpha * (a * a - b * b) / (b * b);\r\n const A: number = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));\r\n const B: number = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));\r\n const deltaSigma: number = B * sinSigma\r\n * (cos2SigmaM + B / 4\r\n * (cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM) - B / 6 * cos2SigmaM\r\n * (-3 + 4 * sinSigma * sinSigma) * (-3 + 4 * cos2SigmaM * cos2SigmaM)));\r\n const distance: number = b * A * (sigma - deltaSigma);\r\n\r\n // initial bearing\r\n const fwdAz: number = MathUtils.radiansToDegrees(Math.atan2(cosU2 * sinLambda, cosU1 * sinU2 - sinU1 * cosU2 * cosLambda));\r\n // final bearing\r\n const revAz: number = MathUtils.radiansToDegrees(Math.atan2(cosU1 * sinLambda, -sinU1 * cosU2 + cosU1 * sinU2 * cosLambda));\r\n if (formula === GeoLocation.DISTANCE) {\r\n return distance;\r\n } else if (formula === GeoLocation.INITIAL_BEARING) {\r\n return fwdAz;\r\n } else if (formula === GeoLocation.FINAL_BEARING) {\r\n return revAz;\r\n }\r\n // should never happen\r\n return Number.NaN;\r\n }\r\n\r\n /**\r\n * Returns the rhumb line bearing from the current location to\r\n * the GeoLocation passed in.\r\n *\r\n * @param location\r\n * destination location\r\n * @return the bearing in degrees\r\n */\r\n public getRhumbLineBearing(location: GeoLocation): number {\r\n let dLon: number = MathUtils.degreesToRadians(location.getLongitude() - this.getLongitude());\r\n const dPhi: number = Math.log(Math.tan(MathUtils.degreesToRadians(location.getLatitude()) / 2 + Math.PI / 4)\r\n / Math.tan(MathUtils.degreesToRadians(this.getLatitude()) / 2 + Math.PI / 4));\r\n if (Math.abs(dLon) > Math.PI) dLon = dLon > 0 ? -(2 * Math.PI - dLon) : (2 * Math.PI + dLon);\r\n return MathUtils.radiansToDegrees(Math.atan2(dLon, dPhi));\r\n }\r\n\r\n /**\r\n * Returns the rhumb line distance from the current location\r\n * to the GeoLocation passed in.\r\n *\r\n * @param location\r\n * the destination location\r\n * @return the distance in Meters\r\n */\r\n public getRhumbLineDistance(location: GeoLocation): number {\r\n const earthRadius: number = 6378137; // earth's mean radius in km\r\n const dLat: number = MathUtils.degreesToRadians(location.getLatitude()) - MathUtils.degreesToRadians(this.getLatitude());\r\n let dLon: number = Math.abs(MathUtils.degreesToRadians(location.getLongitude()) - MathUtils.degreesToRadians(this.getLongitude()));\r\n const dPhi: number = Math.log(Math.tan(MathUtils.degreesToRadians(location.getLatitude()) / 2 + Math.PI / 4)\r\n / Math.tan(MathUtils.degreesToRadians(this.getLatitude()) / 2 + Math.PI / 4));\r\n\r\n let q: number = dLat / dPhi;\r\n if (!Number.isFinite(q)) {\r\n q = Math.cos(MathUtils.degreesToRadians(this.getLatitude()));\r\n }\r\n\r\n // if dLon over 180\u00B0 take shorter rhumb across 180\u00B0 meridian:\r\n if (dLon > Math.PI) {\r\n dLon = 2 * Math.PI - dLon;\r\n }\r\n const d: number = Math.sqrt(dLat * dLat + q * q * dLon * dLon);\r\n return d * earthRadius;\r\n }\r\n\r\n /**\r\n * A method that returns an XML formatted String
representing the serialized Object
. Very\r\n * similar to the toString method but the return value is in an xml format. The format currently used (subject to\r\n * change) is:\r\n *\r\n * \r\n * <GeoLocation>\r\n * <LocationName>Lakewood, NJ</LocationName>\r\n * <Latitude>40.0828°</Latitude>\r\n * <Longitude>-74.2094°</Longitude>\r\n * <Elevation>0 Meters</Elevation>\r\n * <TimezoneName>America/New_York</TimezoneName>\r\n * <TimeZoneDisplayName>Eastern Standard Time</TimeZoneDisplayName>\r\n * <TimezoneGMTOffset>-5</TimezoneGMTOffset>\r\n * <TimezoneDSTOffset>1</TimezoneDSTOffset>\r\n * </GeoLocation>\r\n *\r\n *\r\n * @return The XML formatted
String
.\r\n * @deprecated\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toXML(): void {\r\n throw new UnsupportedError('This method is deprecated');\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#equals(Object)\r\n */\r\n public equals(object: object): boolean {\r\n if (this === object) return true;\r\n if (!(object instanceof GeoLocation)) return false;\r\n\r\n const geo: GeoLocation = object as GeoLocation;\r\n return this.latitude === geo.latitude\r\n && this.longitude === geo.longitude\r\n && this.elevation === geo.elevation\r\n && this.locationName === geo.locationName\r\n && this.timeZoneId === geo.getTimeZone();\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#toString()\r\n */\r\n public toString(): string {\r\n return (`Location Name:\\t\\t\\t${this.getLocationName()}`)\r\n .concat(`\\nLatitude:\\t\\t\\t${this.getLatitude().toString()}\\u00B0`)\r\n .concat(`\\nLongitude:\\t\\t\\t${this.getLongitude().toString()}\\u00B0`)\r\n .concat(`\\nElevation:\\t\\t\\t${this.getElevation().toString()} Meters`)\r\n .concat(`\\nTimezone ID:\\t\\t\\t${this.getTimeZone()}`)\r\n .concat(`\\nTimezone Display Name:\\t\\t${TimeZone.getDisplayName(this.getTimeZone())}`)\r\n .concat(`\\nTimezone GMT Offset:\\t\\t${(TimeZone.getRawOffset(this.getTimeZone()) / GeoLocation.HOUR_NANOS).toString()}`)\r\n .concat(`\\nTimezone DST Offset:\\t\\t${(TimeZone.getDSTSavings(this.getTimeZone()) / GeoLocation.HOUR_NANOS).toString()}`);\r\n }\r\n\r\n /**\r\n * An implementation of the {@link java.lang.Object#clone()} method that creates a deep copy of the object.\r\n * Note: If the {@link java.util.TimeZone} in the clone will be changed from the original, it is critical\r\n * that {@link AstronomicalCalendar#getCalendar()}.\r\n * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} is called after cloning in order for the\r\n * AstronomicalCalendar to output times in the expected offset.\r\n *\r\n * @see java.lang.Object#clone()\r\n * @since 1.1\r\n */\r\n public clone(): GeoLocation {\r\n return JSON.parse(JSON.stringify(this));\r\n }\r\n}\r\n", "import { GeoLocation } from './GeoLocation.ts';\r\nimport { MathUtils } from '../polyfills/Utils.ts';\r\nimport { UnsupportedError } from '../polyfills/errors.ts';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\n/**\r\n * An abstract class that all sun time calculating classes extend. This allows the algorithm used to be changed at\r\n * runtime, easily allowing comparison the results of using different algorithms.\r\n * TODO: Consider methods that would allow atmospheric modeling. This can currently be adjusted by {@link\r\n * #setRefraction(double) setting the refraction}.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2020\r\n */\r\nexport abstract class AstronomicalCalculator {\r\n /**\r\n * The commonly used average solar refraction. Calendrical Calculations lists a more accurate global average of\r\n * 34.478885263888294\r\n *\r\n * @see #getRefraction()\r\n */\r\n private refraction: number = 34 / 60;\r\n // private double refraction = 34.478885263888294 / 60d;\r\n\r\n /**\r\n * The commonly used average solar radius in minutes of a degree.\r\n *\r\n * @see #getSolarRadius()\r\n */\r\n private solarRadius: number = 16 / 60;\r\n\r\n /**\r\n * The commonly used average earth radius in KM. At this time, this only affects elevation adjustment and not the\r\n * sunrise and sunset calculations. The value currently defaults to 6356.9 KM.\r\n *\r\n * @see #getEarthRadius()\r\n * @see #setEarthRadius(double)\r\n */\r\n private earthRadius: number = 6356.9; // in KM\r\n\r\n /**\r\n * A method that returns the earth radius in KM. The value currently defaults to 6356.9 KM if not set.\r\n *\r\n * @return the earthRadius the earth radius in KM.\r\n */\r\n public getEarthRadius(): number {\r\n return this.earthRadius;\r\n }\r\n\r\n /**\r\n * A method that allows setting the earth's radius.\r\n *\r\n * @param earthRadius\r\n * the earthRadius to set in KM\r\n */\r\n public setEarthRadius(earthRadius: number): void {\r\n this.earthRadius = earthRadius;\r\n }\r\n\r\n /**\r\n * The zenith of astronomical sunrise and sunset. The sun is 90° from the vertical 0°\r\n */\r\n private static readonly GEOMETRIC_ZENITH: number = 90;\r\n\r\n /**\r\n * Returns the default class for calculating sunrise and sunset. This is currently the {@link NOAACalculator},\r\n * but this may change.\r\n *\r\n * @return AstronomicalCalculator the default class for calculating sunrise and sunset. In the current\r\n * implementation the default calculator returned is the {@link NOAACalculator}.\r\n * @deprecated This depends on a circular dependency. Use new NOAACalculator()instead\r\n */\r\n public static getDefault(): void {\r\n throw new UnsupportedError('This method is deprecated, due to the fact that it depends on a circular dependency. '\r\n + 'Use `new NOAACalculator()` instead.');\r\n }\r\n\r\n /**\r\n * Returns the name of the algorithm.\r\n *\r\n * @return the descriptive name of the algorithm.\r\n */\r\n public abstract getCalculatorName(): string;\r\n\r\n /**\r\n * Setter method for the descriptive name of the calculator. This will typically not have to be set\r\n *\r\n * @param calculatorName\r\n * descriptive name of the algorithm.\r\n */\r\n\r\n /**\r\n * A method that calculates UTC sunrise as well as any time based on an angle above or below sunrise. This abstract\r\n * method is implemented by the classes that extend this class.\r\n *\r\n * @param calendar\r\n * Used to calculate day of year.\r\n * @param geoLocation\r\n * The location information used for astronomical calculating sun times.\r\n * @param zenith\r\n * the azimuth below the vertical zenith of 90 degrees. for sunrise typically the {@link #adjustZenith\r\n * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts}\r\n * this slightly to account for solar refraction and the sun's radius. Another example would be\r\n * {@link AstronomicalCalendar#getBeginNauticalTwilight()} that passes\r\n * {@link AstronomicalCalendar#NAUTICAL_ZENITH} to this method.\r\n * @param adjustForElevation\r\n * Should the time be adjusted for elevation\r\n * @return The UTC time of sunrise in 24 hour format. 5:45:00 AM will return 5.75.0. If an error was encountered in\r\n * the calculation (expected behavior for some locations such as near the poles,\r\n * {@link java.lang.Double#NaN} will be returned.\r\n * @see #getElevationAdjustment(double)\r\n */\r\n public abstract getUTCSunrise(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number,\r\n adjustForElevation: boolean): number; // eslint-disable-line @typescript-eslint/indent\r\n\r\n /**\r\n * A method that calculates UTC sunset as well as any time based on an angle above or below sunset. This abstract\r\n * method is implemented by the classes that extend this class.\r\n *\r\n * @param calendar\r\n * Used to calculate day of year.\r\n * @param geoLocation\r\n * The location information used for astronomical calculating sun times.\r\n * @param zenith\r\n * the azimuth below the vertical zenith of 90°. For sunset typically the {@link #adjustZenith\r\n * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts}\r\n * this slightly to account for solar refraction and the sun's radius. Another example would be\r\n * {@link AstronomicalCalendar#getEndNauticalTwilight()} that passes\r\n * {@link AstronomicalCalendar#NAUTICAL_ZENITH} to this method.\r\n * @param adjustForElevation\r\n * Should the time be adjusted for elevation\r\n * @return The UTC time of sunset in 24 hour format. 5:45:00 AM will return 5.75.0. If an error was encountered in\r\n * the calculation (expected behavior for some locations such as near the poles,\r\n * {@link java.lang.Double#NaN} will be returned.\r\n * @see #getElevationAdjustment(double)\r\n */\r\n public abstract getUTCSunset(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number;\r\n\r\n /**\r\n\t * Return solar noon (UTC) for the given day at the\r\n\t * given location on earth. The the {@link com.kosherjava.zmanim.util.NOAACalculator} implementation calculates\r\n\t * true solar noon, while the {@link com.kosherjava.zmanim.util.SunTimesCalculator} approximates it, calculating\r\n\t * the time as halfway between sunrise and sunset.\r\n\t * \r\n\t * @param calendar\r\n\t * Used to calculate day of year.\r\n\t * @param geoLocation\r\n\t * The location information used for astronomical calculating sun times. \r\n\t * \r\n\t * @return the time in minutes from zero UTC\r\n\t */\r\n public abstract getUTCNoon(calendar: Temporal.PlainDate, geoLocation: GeoLocation): number;\r\n\r\n /**\r\n * Method to return the adjustment to the zenith required to account for the elevation. Since a person at a higher\r\n * elevation can see farther below the horizon, the calculation for sunrise / sunset is calculated below the horizon\r\n * used at sea level. This is only used for sunrise and sunset and not times before or after it such as\r\n * {@link AstronomicalCalendar#getBeginNauticalTwilight() nautical twilight} since those\r\n * calculations are based on the level of available light at the given dip below the horizon, something that is not\r\n * affected by elevation, the adjustment should only made if the zenith == 90° {@link #adjustZenith adjusted}\r\n * for refraction and solar radius. The algorithm used is\r\n *\r\n *
\r\n * elevationAdjustment = Math.toDegrees(Math.acos(earthRadiusInMeters / (earthRadiusInMeters + elevationMeters)));\r\n *\r\n *\r\n * The source of this algorithm is Calendrical Calculations by Edward M.\r\n * Reingold and Nachum Dershowitz. An alternate algorithm that produces an almost identical (but not accurate)\r\n * result found in Ma'aglay Tzedek by Moishe Kosower and other sources is:\r\n *\r\n *
\r\n * elevationAdjustment = 0.0347 * Math.sqrt(elevationMeters);\r\n *\r\n *\r\n * @param elevation\r\n * elevation in Meters.\r\n * @return the adjusted zenith\r\n */\r\n public getElevationAdjustment(elevation: number): number {\r\n // double elevationAdjustment = 0.0347 * Math.sqrt(elevation);\r\n const elevationAdjustment: number = MathUtils.radiansToDegrees(Math.acos(this.earthRadius / (this.earthRadius + (elevation / 1000))));\r\n return elevationAdjustment;\r\n }\r\n\r\n /**\r\n * Adjusts the zenith of astronomical sunrise and sunset to account for solar refraction, solar radius and\r\n * elevation. The value for Sun's zenith and true rise/set Zenith (used in this class and subclasses) is the angle\r\n * that the center of the Sun makes to a line perpendicular to the Earth's surface. If the Sun were a point and the\r\n * Earth were without an atmosphere, true sunset and sunrise would correspond to a 90° zenith. Because the Sun\r\n * is not a point, and because the atmosphere refracts light, this 90° zenith does not, in fact, correspond to\r\n * true sunset or sunrise, instead the centre of the Sun's disk must lie just below the horizon for the upper edge\r\n * to be obscured. This means that a zenith of just above 90° must be used. The Sun subtends an angle of 16\r\n * minutes of arc (this can be changed via the {@link #setSolarRadius(double)} method , and atmospheric refraction\r\n * accounts for 34 minutes or so (this can be changed via the {@link #setRefraction(double)} method), giving a total\r\n * of 50 arcminutes. The total value for ZENITH is 90+(5/6) or 90.8333333° for true sunrise/sunset. Since a\r\n * person at an elevation can see blow the horizon of a person at sea level, this will also adjust the zenith to\r\n * account for elevation if available. Note that this will only adjust the value if the zenith is exactly 90 degrees.\r\n * For values below and above this no correction is done. As an example, astronomical twilight is when the sun is\r\n * 18° below the horizon or {@link AstronomicalCalendar#ASTRONOMICAL_ZENITH 108°\r\n * below the zenith}. This is traditionally calculated with none of the above mentioned adjustments. The same goes\r\n * for various tzais and alos times such as the\r\n * {@link ZmanimCalendar#ZENITH_16_POINT_1 16.1°} dip used in\r\n * {@link ComplexZmanimCalendar#getAlos16Point1Degrees()}.\r\n *\r\n * @param zenith\r\n * the azimuth below the vertical zenith of 90°. For sunset typically the {@link #adjustZenith\r\n * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts}\r\n * this slightly to account for solar refraction and the sun's radius. Another example would be\r\n * {@link AstronomicalCalendar#getEndNauticalTwilight()} that passes\r\n * {@link AstronomicalCalendar#NAUTICAL_ZENITH} to this method.\r\n * @param elevation\r\n * elevation in Meters.\r\n * @return The zenith adjusted to include the {@link #getSolarRadius sun's radius}, {@link #getRefraction\r\n * refraction} and {@link #getElevationAdjustment elevation} adjustment. This will only be adjusted for\r\n * sunrise and sunset (if the zenith == 90°)\r\n * @see #getElevationAdjustment(double)\r\n */\r\n public adjustZenith(zenith: number, elevation: number) {\r\n let adjustedZenith: number = zenith;\r\n if (zenith === AstronomicalCalculator.GEOMETRIC_ZENITH) { // only adjust if it is exactly sunrise or sunset\r\n adjustedZenith = zenith + (this.getSolarRadius() + this.getRefraction() + this.getElevationAdjustment(elevation));\r\n }\r\n return adjustedZenith;\r\n }\r\n\r\n /**\r\n * Method to get the refraction value to be used when calculating sunrise and sunset. The default value is 34 arc\r\n * minutes. The Errata and\r\n * Notes for Calendrical Calculations: The Millennium Edition by Edward M. Reingold and Nachum Dershowitz lists\r\n * the actual average refraction value as 34.478885263888294 or approximately 34' 29\". The refraction value as well\r\n * as the solarRadius and elevation adjustment are added to the zenith used to calculate sunrise and sunset.\r\n *\r\n * @return The refraction in arc minutes.\r\n */\r\n public getRefraction(): number {\r\n return this.refraction;\r\n }\r\n\r\n /**\r\n * A method to allow overriding the default refraction of the calculator.\r\n * @todo At some point in the future, an AtmosphericModel or Refraction object that models the atmosphere of different\r\n * locations might be used for increased accuracy.\r\n *\r\n * @param refraction\r\n * The refraction in arc minutes.\r\n * @see #getRefraction()\r\n */\r\n public setRefraction(refraction: number): void {\r\n this.refraction = refraction;\r\n }\r\n\r\n /**\r\n * Method to get the sun's radius. The default value is 16 arc minutes. The sun's radius as it appears from earth is\r\n * almost universally given as 16 arc minutes but in fact it differs by the time of the year. At the perihelion it has an apparent radius of 16.293, while at the\r\n * aphelion it has an apparent radius of 15.755. There is little\r\n * affect for most location, but at high and low latitudes the difference becomes more apparent. My Calculations for\r\n * the difference at the location of the Royal Observatory, Greenwich show\r\n * only a 4.494 second difference between the perihelion and aphelion radii, but moving into the arctic circle the\r\n * difference becomes more noticeable. Tests for Tromso, Norway (latitude 69.672312, longitude 19.049787) show that\r\n * on May 17, the rise of the midnight sun, a 2 minute 23 second difference is observed between the perihelion and\r\n * aphelion radii using the USNO algorithm, but only 1 minute and 6 seconds difference using the NOAA algorithm.\r\n * Areas farther north show an even greater difference. Note that these test are not real valid test cases because\r\n * they show the extreme difference on days that are not the perihelion or aphelion, but are shown for illustrative\r\n * purposes only.\r\n *\r\n * @return The sun's radius in arc minutes.\r\n */\r\n public getSolarRadius(): number {\r\n return this.solarRadius;\r\n }\r\n\r\n /**\r\n * Method to set the sun's radius.\r\n *\r\n * @param solarRadius\r\n * The sun's radius in arc minutes.\r\n * @see #getSolarRadius()\r\n */\r\n public setSolarRadius(solarRadius: number): void {\r\n this.solarRadius = solarRadius;\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#clone()\r\n * @since 1.1\r\n */\r\n public clone(): AstronomicalCalculator {\r\n return JSON.parse(JSON.stringify(this));\r\n }\r\n\r\n public equals(object: object) {\r\n return this === object;\r\n }\r\n}\r\n", "import { GeoLocation } from './GeoLocation.ts';\r\nimport { AstronomicalCalculator } from './AstronomicalCalculator.ts';\r\nimport { MathUtils } from '../polyfills/Utils.ts';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\n/**\r\n * Implementation of sunrise and sunset methods to calculate astronomical times based on the NOAA algorithm. This calculator uses the Java algorithm based on the implementation by NOAA - National Oceanic and Atmospheric Administration's Surface Radiation Research Branch. NOAA's implementation is based on equations from Astronomical Algorithms by Jean Meeus. Added to the algorithm is an adjustment of the zenith\r\n * to account for elevation. The algorithm can be found in the Wikipedia Sunrise Equation article.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport class NOAACalculator extends AstronomicalCalculator {\r\n /**\r\n * The Julian day of January 1, 2000\r\n */\r\n private static readonly JULIAN_DAY_JAN_1_2000: number = 2451545;\r\n\r\n /**\r\n * Julian days per century\r\n */\r\n private static readonly JULIAN_DAYS_PER_CENTURY: number = 36525;\r\n\r\n /**\r\n * @see AstronomicalCalculator#getCalculatorName()\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public getCalculatorName(): string {\r\n return 'US National Oceanic and Atmospheric Administration Algorithm';\r\n }\r\n\r\n /**\r\n * @see AstronomicalCalculator#getUTCSunrise(Calendar, GeoLocation, double, boolean)\r\n */\r\n public getUTCSunrise(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number {\r\n const elevation: number = adjustForElevation ? geoLocation.getElevation() : 0;\r\n const adjustedZenith: number = this.adjustZenith(zenith, elevation);\r\n\r\n let sunrise: number = NOAACalculator.getSunriseUTC(NOAACalculator.getJulianDay(date), geoLocation.getLatitude(), -geoLocation.getLongitude(),\r\n adjustedZenith);\r\n sunrise = sunrise / 60;\r\n\r\n // ensure that the time is >= 0 and < 24\r\n while (sunrise < 0) {\r\n sunrise += 24;\r\n }\r\n while (sunrise >= 24) {\r\n sunrise -= 24;\r\n }\r\n return sunrise;\r\n }\r\n\r\n /**\r\n * @see AstronomicalCalculator#getUTCSunset(Calendar, GeoLocation, double, boolean)\r\n */\r\n public getUTCSunset(date: Temporal.PlainDate, geoLocation: GeoLocation, zenith: number, adjustForElevation: boolean): number {\r\n const elevation: number = adjustForElevation ? geoLocation.getElevation() : 0;\r\n const adjustedZenith: number = this.adjustZenith(zenith, elevation);\r\n\r\n let sunset: number = NOAACalculator.getSunsetUTC(NOAACalculator.getJulianDay(date), geoLocation.getLatitude(), -geoLocation.getLongitude(),\r\n adjustedZenith);\r\n sunset = sunset / 60;\r\n\r\n // ensure that the time is >= 0 and < 24\r\n while (sunset < 0) {\r\n sunset += 24;\r\n }\r\n while (sunset >= 24) {\r\n sunset -= 24;\r\n }\r\n return sunset;\r\n }\r\n\r\n /**\r\n * Return the Julian day from a Java Calendar\r\n *\r\n * @param calendar\r\n * The Java Calendar\r\n * @return the Julian day corresponding to the date Note: Number is returned for start of day. Fractional days\r\n * should be added later.\r\n */\r\n private static getJulianDay(date: Temporal.PlainDate): number {\r\n let { year, month } = date;\r\n const { day } = date;\r\n if (month <= 2) {\r\n year -= 1;\r\n month += 12;\r\n }\r\n const a: number = Math.trunc(year / 100);\r\n const b: number = Math.trunc(2 - a + a / 4);\r\n\r\n return Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + b - 1524.5;\r\n }\r\n\r\n /**\r\n * Convert Julian day to centuries since J2000.0.\r\n *\r\n * @param julianDay\r\n * the Julian Day to convert\r\n * @return the centuries since 2000 Julian corresponding to the Julian Day\r\n */\r\n private static getJulianCenturiesFromJulianDay(julianDay: number): number {\r\n return (julianDay - NOAACalculator.JULIAN_DAY_JAN_1_2000) / NOAACalculator.JULIAN_DAYS_PER_CENTURY;\r\n }\r\n\r\n /**\r\n * Convert centuries since J2000.0 to Julian day.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the Julian Day corresponding to the Julian centuries passed in\r\n */\r\n private static getJulianDayFromJulianCenturies(julianCenturies: number): number {\r\n return julianCenturies * NOAACalculator.JULIAN_DAYS_PER_CENTURY + NOAACalculator.JULIAN_DAY_JAN_1_2000;\r\n }\r\n\r\n /**\r\n * Returns the Geometric Mean Longitude of the Sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the Geometric Mean Longitude of the Sun in degrees\r\n */\r\n private static getSunGeometricMeanLongitude(julianCenturies: number): number {\r\n let longitude: number = 280.46646 + julianCenturies * (36000.76983 + 0.0003032 * julianCenturies);\r\n while (longitude > 360) {\r\n longitude -= 360;\r\n }\r\n while (longitude < 0) {\r\n longitude += 360;\r\n }\r\n\r\n return longitude; // in degrees\r\n }\r\n\r\n /**\r\n * Returns the Geometric Mean Anomaly of the Sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the Geometric Mean Anomaly of the Sun in degrees\r\n */\r\n private static getSunGeometricMeanAnomaly(julianCenturies: number): number {\r\n return 357.52911 + julianCenturies * (35999.05029 - 0.0001537 * julianCenturies); // in degrees\r\n }\r\n\r\n /**\r\n * Return the eccentricity of earth's orbit.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the unitless eccentricity\r\n */\r\n private static getEarthOrbitEccentricity(julianCenturies: number): number {\r\n return 0.016708634 - julianCenturies * (0.000042037 + 0.0000001267 * julianCenturies); // unitless\r\n }\r\n\r\n /**\r\n * Returns the equation of center for the sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the equation of center for the sun in degrees\r\n */\r\n private static getSunEquationOfCenter(julianCenturies: number): number {\r\n const m: number = NOAACalculator.getSunGeometricMeanAnomaly(julianCenturies);\r\n\r\n const mrad: number = MathUtils.degreesToRadians(m);\r\n const sinm: number = Math.sin(mrad);\r\n const sin2m: number = Math.sin(mrad + mrad);\r\n const sin3m: number = Math.sin(mrad + mrad + mrad);\r\n\r\n return sinm * (1.914602 - julianCenturies * (0.004817 + 0.000014 * julianCenturies)) + sin2m\r\n * (0.019993 - 0.000101 * julianCenturies) + sin3m * 0.000289; // in degrees\r\n }\r\n\r\n /**\r\n * Return the true longitude of the sun\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the sun's true longitude in degrees\r\n */\r\n private static getSunTrueLongitude(julianCenturies: number): number {\r\n const sunLongitude: number = NOAACalculator.getSunGeometricMeanLongitude(julianCenturies);\r\n const center: number = NOAACalculator.getSunEquationOfCenter(julianCenturies);\r\n\r\n return sunLongitude + center; // in degrees\r\n }\r\n\r\n // /**\r\n // * Returns the true anamoly of the sun.\r\n // *\r\n // * @param julianCenturies\r\n // * the number of Julian centuries since J2000.0\r\n // * @return the sun's true anamoly in degrees\r\n // */\r\n // private static double getSunTrueAnomaly(double julianCenturies) {\r\n // double meanAnomaly = getSunGeometricMeanAnomaly(julianCenturies);\r\n // double equationOfCenter = getSunEquationOfCenter(julianCenturies);\r\n //\r\n // return meanAnomaly + equationOfCenter; // in degrees\r\n // }\r\n\r\n /**\r\n * Return the apparent longitude of the sun\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return sun's apparent longitude in degrees\r\n */\r\n private static getSunApparentLongitude(julianCenturies: number): number {\r\n const sunTrueLongitude: number = NOAACalculator.getSunTrueLongitude(julianCenturies);\r\n\r\n const omega: number = 125.04 - 1934.136 * julianCenturies;\r\n const lambda: number = sunTrueLongitude - 0.00569 - 0.00478 * Math.sin(MathUtils.degreesToRadians(omega));\r\n return lambda; // in degrees\r\n }\r\n\r\n /**\r\n * Returns the mean obliquity of the ecliptic (Axial tilt).\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the mean obliquity in degrees\r\n */\r\n private static getMeanObliquityOfEcliptic(julianCenturies: number): number {\r\n const seconds: number = 21.448 - julianCenturies\r\n * (46.8150 + julianCenturies * (0.00059 - julianCenturies * (0.001813)));\r\n return 23 + (26 + (seconds / 60)) / 60; // in degrees\r\n }\r\n\r\n /**\r\n * Returns the corrected obliquity of the ecliptic (Axial\r\n * tilt).\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return the corrected obliquity in degrees\r\n */\r\n private static getObliquityCorrection(julianCenturies: number): number {\r\n const obliquityOfEcliptic: number = NOAACalculator.getMeanObliquityOfEcliptic(julianCenturies);\r\n\r\n const omega: number = 125.04 - 1934.136 * julianCenturies;\r\n return obliquityOfEcliptic + 0.00256 * Math.cos(MathUtils.degreesToRadians(omega)); // in degrees\r\n }\r\n\r\n /**\r\n * Return the declination of the sun.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return\r\n * the sun's declination in degrees\r\n */\r\n private static getSunDeclination(julianCenturies: number): number {\r\n const obliquityCorrection: number = NOAACalculator.getObliquityCorrection(julianCenturies);\r\n const lambda: number = NOAACalculator.getSunApparentLongitude(julianCenturies);\r\n\r\n const sint: number = Math.sin(MathUtils.degreesToRadians(obliquityCorrection)) * Math.sin(MathUtils.degreesToRadians(lambda));\r\n const theta: number = MathUtils.radiansToDegrees(Math.asin(sint));\r\n return theta; // in degrees\r\n }\r\n\r\n /**\r\n * Return the Equation of Time - the difference between\r\n * true solar time and mean solar time\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @return equation of time in minutes of time\r\n */\r\n private static getEquationOfTime(julianCenturies: number): number {\r\n const epsilon: number = NOAACalculator.getObliquityCorrection(julianCenturies);\r\n const geomMeanLongSun: number = NOAACalculator.getSunGeometricMeanLongitude(julianCenturies);\r\n const eccentricityEarthOrbit: number = NOAACalculator.getEarthOrbitEccentricity(julianCenturies);\r\n const geomMeanAnomalySun: number = NOAACalculator.getSunGeometricMeanAnomaly(julianCenturies);\r\n\r\n let y: number = Math.tan(MathUtils.degreesToRadians(epsilon) / 2);\r\n y *= y;\r\n\r\n const sin2l0: number = Math.sin(2 * MathUtils.degreesToRadians(geomMeanLongSun));\r\n const sinm: number = Math.sin(MathUtils.degreesToRadians(geomMeanAnomalySun));\r\n const cos2l0: number = Math.cos(2 * MathUtils.degreesToRadians(geomMeanLongSun));\r\n const sin4l0: number = Math.sin(4 * MathUtils.degreesToRadians(geomMeanLongSun));\r\n const sin2m: number = Math.sin(2 * MathUtils.degreesToRadians(geomMeanAnomalySun));\r\n\r\n const equationOfTime: number = y * sin2l0 - 2 * eccentricityEarthOrbit * sinm + 4 * eccentricityEarthOrbit * y\r\n * sinm * cos2l0 - 0.5 * y * y * sin4l0 - 1.25 * eccentricityEarthOrbit * eccentricityEarthOrbit * sin2m;\r\n return MathUtils.radiansToDegrees(equationOfTime) * 4; // in minutes of time\r\n }\r\n\r\n /**\r\n * Return the hour angle of the sun at sunrise for the\r\n * latitude.\r\n *\r\n * @param lat\r\n * , the latitude of observer in degrees\r\n * @param solarDec\r\n * the declination angle of sun in degrees\r\n * @param zenith\r\n * the zenith\r\n * @return hour angle of sunrise in radians\r\n */\r\n private static getSunHourAngleAtSunrise(lat: number, solarDec: number, zenith: number): number {\r\n const latRad: number = MathUtils.degreesToRadians(lat);\r\n const sdRad: number = MathUtils.degreesToRadians(solarDec);\r\n\r\n return (Math.acos(Math.cos(MathUtils.degreesToRadians(zenith)) / (Math.cos(latRad) * Math.cos(sdRad))\r\n - Math.tan(latRad) * Math.tan(sdRad))); // in radians\r\n }\r\n\r\n /**\r\n * Returns the hour angle of the sun at sunset for the\r\n * latitude. TODO: use - {@link #getSunHourAngleAtSunrise(double, double, double)} implementation to avoid\r\n * duplication of code.\r\n *\r\n * @param lat\r\n * the latitude of observer in degrees\r\n * @param solarDec\r\n * the declination angle of sun in degrees\r\n * @param zenith\r\n * the zenith\r\n * @return the hour angle of sunset in radians\r\n */\r\n private static getSunHourAngleAtSunset(lat: number, solarDec: number, zenith: number): number {\r\n const latRad: number = MathUtils.degreesToRadians(lat);\r\n const sdRad: number = MathUtils.degreesToRadians(solarDec);\r\n\r\n const hourAngle: number = (Math.acos(Math.cos(MathUtils.degreesToRadians(zenith)) / (Math.cos(latRad) * Math.cos(sdRad))\r\n - Math.tan(latRad) * Math.tan(sdRad)));\r\n return -hourAngle; // in radians\r\n }\r\n\r\n /**\r\n * Return the Solar Elevation for the\r\n * horizontal coordinate system at the given location at the given time. Can be negative if the sun is below the\r\n * horizon. Not corrected for altitude.\r\n *\r\n * @param cal\r\n * time of calculation\r\n * @param lat\r\n * latitude of location for calculation\r\n * @param lon\r\n * longitude of location for calculation\r\n * @return solar elevation in degrees - horizon is 0 degrees, civil twilight is -6 degrees\r\n */\r\n\r\n /*public static getSolarElevation(date: Temporal.PlainDate, lat: number, lon: number): number {\r\n const julianDay: number = NOAACalculator.getJulianDay(date);\r\n const julianCenturies: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\r\n const equationOfTime: number = NOAACalculator.getEquationOfTime(julianCenturies);\r\n\r\n let longitude: number = (date.hour + 12) + (date.minute + equationOfTime + date.second / 60) / 60;\r\n\r\n longitude = -(longitude * 360 / 24) % 360;\r\n const hourAngleRad: number = MathUtils.degreesToRadians(lon - longitude);\r\n const declination: number = NOAACalculator.getSunDeclination(julianCenturies);\r\n const decRad: number = MathUtils.degreesToRadians(declination);\r\n const latRad: number = MathUtils.degreesToRadians(lat);\r\n return MathUtils.radiansToDegrees(Math.asin((Math.sin(latRad) * Math.sin(decRad))\r\n + (Math.cos(latRad) * Math.cos(decRad) * Math.cos(hourAngleRad))));\r\n } */\r\n\r\n /**\r\n * Return the Solar Azimuth for the\r\n * horizontal coordinate system at the given location at the given time. Not corrected for altitude. True south is 0\r\n * degrees.\r\n *\r\n * @param cal\r\n * time of calculation\r\n * @param latitude\r\n * latitude of location for calculation\r\n * @param lon\r\n * longitude of location for calculation\r\n * @return FIXME\r\n */\r\n\r\n /* public static getSolarAzimuth(date: Temporal.PlainDate, latitude: number, lon: number): number {\r\n const julianDay: number = NOAACalculator.getJulianDay(date);\r\n const julianCenturies: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\r\n const equationOfTime: number = NOAACalculator.getEquationOfTime(julianCenturies);\r\n\r\n let longitude: number = (date.hour + 12) + (date.minute + equationOfTime + date.second / 60) / 60;\r\n\r\n longitude = -(longitude * 360 / 24) % 360;\r\n const hourAngleRad: number = MathUtils.degreesToRadians(lon - longitude);\r\n const declination: number = NOAACalculator.getSunDeclination(julianCenturies);\r\n const decRad: number = MathUtils.degreesToRadians(declination);\r\n const latRad: number = MathUtils.degreesToRadians(latitude);\r\n\r\n return MathUtils.radiansToDegrees(Math.atan(Math.sin(hourAngleRad)\r\n / ((Math.cos(hourAngleRad) * Math.sin(latRad)) - (Math.tan(decRad) * Math.cos(latRad))))) + 180;\r\n } */\r\n\r\n /**\r\n * Return the Universal Coordinated Time (UTC)\r\n * of sunrise for the given day at the given location on earth\r\n *\r\n * @param julianDay\r\n * the Julian day\r\n * @param latitude\r\n * the latitude of observer in degrees\r\n * @param longitude\r\n * the longitude of observer in degrees\r\n * @param zenith\r\n * the zenith\r\n * @return the time in minutes from zero UTC\r\n */\r\n private static getSunriseUTC(julianDay: number, latitude: number, longitude: number, zenith: number): number {\r\n const julianCenturies: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\r\n // Find the time of solar noon at the location, and use that declination. This is better than start of the\r\n // Julian day\r\n\r\n const noonmin: number = NOAACalculator.getSolarNoonUTC(julianCenturies, longitude);\r\n const tnoon: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay + noonmin / 1440);\r\n\r\n // First pass to approximate sunrise (using solar noon)\r\n\r\n let eqTime: number = NOAACalculator.getEquationOfTime(tnoon);\r\n let solarDec: number = NOAACalculator.getSunDeclination(tnoon);\r\n let hourAngle: number = NOAACalculator.getSunHourAngleAtSunrise(latitude, solarDec, zenith);\r\n\r\n let delta: number = longitude - MathUtils.radiansToDegrees(hourAngle);\r\n let timeDiff: number = 4 * delta; // in minutes of time\r\n let timeUTC: number = 720 + timeDiff - eqTime; // in minutes\r\n\r\n // Second pass includes fractional Julian Day in gamma calc\r\n\r\n const newt: number = NOAACalculator.getJulianCenturiesFromJulianDay(\r\n NOAACalculator.getJulianDayFromJulianCenturies(julianCenturies) + timeUTC / 1440);\r\n eqTime = NOAACalculator.getEquationOfTime(newt);\r\n solarDec = NOAACalculator.getSunDeclination(newt);\r\n hourAngle = NOAACalculator.getSunHourAngleAtSunrise(latitude, solarDec, zenith);\r\n delta = longitude - MathUtils.radiansToDegrees(hourAngle);\r\n timeDiff = 4 * delta;\r\n timeUTC = 720 + timeDiff - eqTime; // in minutes\r\n return timeUTC;\r\n }\r\n\r\n public getUTCNoon(calendar: Temporal.PlainDate, geoLocation: GeoLocation) {\r\n const julianDay = NOAACalculator.getJulianDay(calendar);\r\n const julianCenturies = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\t\t\r\n let noon = NOAACalculator.getSolarNoonUTC(julianCenturies, -geoLocation.getLongitude());\r\n noon = noon / 60;\r\n\r\n // ensure that the time is >= 0 and < 24\r\n while (noon < 0.0) {\r\n noon += 24.0;\r\n }\r\n while (noon >= 24.0) {\r\n noon -= 24.0;\r\n }\r\n return noon;\r\n }\r\n\r\n /**\r\n * Return the Universal Coordinated Time (UTC)\r\n * of solar noon for the given day at the given location\r\n * on earth.\r\n *\r\n * @param julianCenturies\r\n * the number of Julian centuries since J2000.0\r\n * @param longitude\r\n * the longitude of observer in degrees\r\n * @return the time in minutes from zero UTC\r\n */\r\n private static getSolarNoonUTC(julianCenturies: number, longitude: number): number {\r\n // First pass uses approximate solar noon to calculate eqtime\r\n const tnoon: number = NOAACalculator.getJulianCenturiesFromJulianDay(\r\n NOAACalculator.getJulianDayFromJulianCenturies(julianCenturies) + longitude / 360);\r\n let eqTime: number = NOAACalculator.getEquationOfTime(tnoon);\r\n const solNoonUTC: number = 720 + (longitude * 4) - eqTime; // min\r\n\r\n const newt: number = NOAACalculator.getJulianCenturiesFromJulianDay(\r\n NOAACalculator.getJulianDayFromJulianCenturies(julianCenturies) - 0.5 + solNoonUTC / 1440);\r\n\r\n eqTime = NOAACalculator.getEquationOfTime(newt);\r\n return 720 + (longitude * 4) - eqTime; // min\r\n }\r\n\r\n /**\r\n * Return the Universal Coordinated Time (UTC)\r\n * of sunset for the given day at the given location on earth\r\n *\r\n * @param julianDay\r\n * the Julian day\r\n * @param latitude\r\n * the latitude of observer in degrees\r\n * @param longitude\r\n * : longitude of observer in degrees\r\n * @param zenith\r\n * the zenith\r\n * @return the time in minutes from zero Universal Coordinated Time (UTC)\r\n */\r\n private static getSunsetUTC(julianDay: number, latitude: number, longitude: number, zenith: number): number {\r\n const julianCenturies: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay);\r\n\r\n // Find the time of solar noon at the location, and use that declination. This is better than start of the\r\n // Julian day\r\n\r\n const noonmin: number = NOAACalculator.getSolarNoonUTC(julianCenturies, longitude);\r\n const tnoon: number = NOAACalculator.getJulianCenturiesFromJulianDay(julianDay + noonmin / 1440);\r\n\r\n // First calculates sunrise and approx length of day\r\n\r\n let eqTime: number = NOAACalculator.getEquationOfTime(tnoon);\r\n let solarDec: number = NOAACalculator.getSunDeclination(tnoon);\r\n let hourAngle: number = NOAACalculator.getSunHourAngleAtSunset(latitude, solarDec, zenith);\r\n\r\n let delta: number = longitude - MathUtils.radiansToDegrees(hourAngle);\r\n let timeDiff: number = 4 * delta;\r\n let timeUTC: number = 720 + timeDiff - eqTime;\r\n\r\n // Second pass includes fractional Julian Day in gamma calc\r\n\r\n const newt: number = NOAACalculator.getJulianCenturiesFromJulianDay(\r\n NOAACalculator.getJulianDayFromJulianCenturies(julianCenturies) + timeUTC / 1440);\r\n eqTime = NOAACalculator.getEquationOfTime(newt);\r\n solarDec = NOAACalculator.getSunDeclination(newt);\r\n hourAngle = NOAACalculator.getSunHourAngleAtSunset(latitude, solarDec, zenith);\r\n\r\n delta = longitude - MathUtils.radiansToDegrees(hourAngle);\r\n timeDiff = 4 * delta;\r\n timeUTC = 720 + timeDiff - eqTime; // in minutes\r\n return timeUTC;\r\n }\r\n}\r\n", "import { Big } from 'big.js';\r\nimport { Temporal } from 'temporal-polyfill'\r\n\r\nimport { GeoLocation } from './util/GeoLocation.ts';\r\nimport { AstronomicalCalculator } from './util/AstronomicalCalculator.ts';\r\nimport { NOAACalculator } from './util/NOAACalculator.ts';\r\nimport { IllegalArgumentException, UnsupportedError } from './polyfills/errors.ts';\r\nimport { TimeZone } from './polyfills/Utils.ts';\r\n\r\n/**\r\n * A Java calendar that calculates astronomical times such as {@link #getSunrise() sunrise} and {@link #getSunset()\r\n * sunset} times. This class contains a {@link #getCalendar() Calendar} and can therefore use the standard Calendar\r\n * functionality to change dates etc... The calculation engine used to calculate the astronomical times can be changed\r\n * to a different implementation by implementing the abstract {@link AstronomicalCalculator} and setting it with the\r\n * {@link #setAstronomicalCalculator(AstronomicalCalculator)}. A number of different calculation engine implementations\r\n * are included in the util package.\r\n * Note: There are times when the algorithms can't calculate proper values for sunrise, sunset and twilight. This\r\n * is usually caused by trying to calculate times for areas either very far North or South, where sunrise / sunset never\r\n * happen on that date. This is common when calculating twilight with a deep dip below the horizon for locations as far\r\n * south of the North Pole as London, in the northern hemisphere. The sun never reaches this dip at certain times of the\r\n * year. When the calculations encounter this condition a null will be returned when a\r\n *
{@link java.util.Date}
is expected and {@link Long#MIN_VALUE} when a long
is expected. The\r\n * reason that Exception
s are not thrown in these cases is because the lack of a rise/set or twilight is\r\n * not an exception, but an expected condition in many parts of the world.\r\n *\r\n * Here is a simple example of how to use the API to calculate sunrise.\r\n * First create the Calendar for the location you would like to calculate sunrise or sunset times for:\r\n *\r\n * \r\n * String locationName = "Lakewood, NJ";\r\n * double latitude = 40.0828; // Lakewood, NJ\r\n * double longitude = -74.2094; // Lakewood, NJ\r\n * double elevation = 20; // optional elevation correction in Meters\r\n * // the String parameter in getTimeZone() has to be a valid timezone listed in\r\n * // {@link java.util.TimeZone#getAvailableIDs()}\r\n * TimeZone timeZone = TimeZone.getTimeZone("America/New_York");\r\n * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);\r\n * AstronomicalCalendar ac = new AstronomicalCalendar(location);\r\n *\r\n *\r\n * To get the time of sunrise, first set the date you want (if not set, the date will default to today):\r\n *\r\n *
\r\n * ac.getCalendar().set(Calendar.MONTH, Calendar.FEBRUARY);\r\n * ac.getCalendar().set(Calendar.DAY_OF_MONTH, 8);\r\n * Date sunrise = ac.getSunrise();\r\n *\r\n *\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2016\r\n */\r\nexport class AstronomicalCalendar {\r\n /**\r\n * 90° below the vertical. Used as a basis for most calculations since the location of the sun is 90° below\r\n * the horizon at sunrise and sunset.\r\n * Note : it is important to note that for sunrise and sunset the {@link AstronomicalCalculator#adjustZenith\r\n * adjusted zenith} is required to account for the radius of the sun and refraction. The adjusted zenith should not\r\n * be used for calculations above or below 90° since they are usually calculated as an offset to 90°.\r\n */\r\n public static readonly GEOMETRIC_ZENITH: number = 90;\r\n\r\n /** Sun's zenith at civil twilight (96°). */\r\n public static readonly CIVIL_ZENITH: number = 96;\r\n\r\n /** Sun's zenith at nautical twilight (102°). */\r\n public static readonly NAUTICAL_ZENITH: number = 102;\r\n\r\n /** Sun's zenith at astronomical twilight (108°). */\r\n public static readonly ASTRONOMICAL_ZENITH: number = 108;\r\n\r\n /** constant for nanoseconds in an hour (3,600,000) */\r\n public static readonly HOUR_NANOS: number = Temporal.Duration.from({ hours: 1 }).total('nanosecond');\r\n\r\n /**\r\n * The Java Calendar encapsulated by this class to track the current date used by the class\r\n */\r\n private date!: Temporal.PlainDate;\r\n\r\n /**\r\n * the {@link GeoLocation} used for calculations.\r\n */\r\n private geoLocation!: GeoLocation;\r\n\r\n /**\r\n * the internal {@link AstronomicalCalculator} used for calculating solar based times.\r\n */\r\n private astronomicalCalculator!: AstronomicalCalculator;\r\n\r\n /**\r\n * The getSunrise method Returns a
Date
representing the\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunrise time. The zenith used\r\n * for the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90° plus\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the\r\n * {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction\r\n * and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}.\r\n * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using.\r\n *\r\n * @return the Date
representing the exact sunrise time. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalculator#adjustZenith\r\n * @see #getSeaLevelSunrise()\r\n * @see AstronomicalCalendar#getUTCSunrise\r\n */\r\n public getSunrise(): Temporal.ZonedDateTime | null {\r\n const sunrise: number = this.getUTCSunrise(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunrise)) return null;\r\n return this.getDateFromTime(sunrise, true);\r\n }\r\n\r\n /**\r\n * A method that returns the sunrise without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation\r\n * adjustment}. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,\r\n * something that is not affected by elevation. This method returns sunrise calculated at sea level. This forms the\r\n * base for dawn calculations that are calculated as a dip below the horizon before sunrise.\r\n *\r\n * @return the Date
representing the exact sea-level sunrise time. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getSunrise\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunrise\r\n * @see #getSeaLevelSunset()\r\n */\r\n public getSeaLevelSunrise(): Temporal.ZonedDateTime | null {\r\n const sunrise: number = this.getUTCSeaLevelSunrise(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunrise)) return null;\r\n return this.getDateFromTime(sunrise, true);\r\n }\r\n\r\n /**\r\n * A method that returns the beginning of civil twilight\r\n\t * (dawn) using a zenith of {@link #CIVIL_ZENITH 96°}.\r\n\t * \r\n\t * @return The Date
of the beginning of civil twilight using a zenith of 96°. If the calculation\r\n\t * can't be computed, null will be returned. See detailed explanation on top of the page.\r\n\t * @see #CIVIL_ZENITH\r\n\t */\r\n public getBeginCivilTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(AstronomicalCalendar.CIVIL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the beginning of nautical twilight using a zenith of {@link\r\n * #NAUTICAL_ZENITH 102°}.\r\n * \r\n * @return The Date
of the beginning of nautical twilight using a zenith of 102°. If the\r\n * calculation can't be computed null will be returned. See detailed explanation on top of the page.\r\n * @see #NAUTICAL_ZENITH\r\n */\r\n public getBeginNauticalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(AstronomicalCalendar.NAUTICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the beginning of astronomical twilight using a zenith of\r\n\t * {@link #ASTRONOMICAL_ZENITH 108°}.\r\n *\r\n * @return The Date
of the beginning of astronomical twilight using a zenith of 108°. If the\r\n * calculation can't be computed, null will be returned. See detailed explanation on top of the page.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getBeginAstronomicalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(AstronomicalCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * The getSunset method Returns a Date
representing the\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunset time. The zenith used for\r\n * the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90° plus\r\n * {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the\r\n * {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction\r\n * and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}.\r\n * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using. Note:\r\n * In certain cases the calculates sunset will occur before sunrise. This will typically happen when a timezone\r\n * other than the local timezone is used (calculating Los Angeles sunset using a GMT timezone for example). In this\r\n * case the sunset date will be incremented to the following date.\r\n *\r\n * @return the Date
representing the exact sunset time. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalculator#adjustZenith\r\n * @see #getSeaLevelSunset()\r\n * @see AstronomicalCalendar#getUTCSunset\r\n */\r\n public getSunset(): Temporal.ZonedDateTime | null {\r\n const sunset: number = this.getUTCSunset(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunset)) return null;\r\n return this.getDateFromTime(sunset, false);\r\n }\r\n\r\n /**\r\n * A method that returns the sunset without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation\r\n * adjustment}. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light,\r\n * something that is not affected by elevation. This method returns sunset calculated at sea level. This forms the\r\n * base for dusk calculations that are calculated as a dip below the horizon after sunset.\r\n *\r\n * @return the Date
representing the exact sea-level sunset time. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getSunset\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunset 2see {@link #getSunset()}\r\n */\r\n public getSeaLevelSunset(): Temporal.ZonedDateTime | null {\r\n const sunset: number = this.getUTCSeaLevelSunset(AstronomicalCalendar.GEOMETRIC_ZENITH);\r\n if (Number.isNaN(sunset)) return null;\r\n return this.getDateFromTime(sunset, false);\r\n }\r\n\r\n /**\r\n * A method that returns the end of civil twilight\r\n\t * using a zenith of {@link #CIVIL_ZENITH 96°}.\r\n *\r\n * @return The Date
of the end of civil twilight using a zenith of {@link #CIVIL_ZENITH 96°}. If\r\n * the calculation can't be computed, null will be returned. See detailed explanation on top of the page.\r\n * @see #CIVIL_ZENITH\r\n */\r\n public getEndCivilTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(AstronomicalCalendar.CIVIL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}.\r\n *\r\n * @return The Date
of the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}\r\n * . If the calculation can't be computed, null will be returned. See detailed explanation on top of the\r\n * page.\r\n * @see #NAUTICAL_ZENITH\r\n */\r\n public getEndNauticalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(AstronomicalCalendar.NAUTICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method that returns the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH 108°}.\r\n *\r\n * @return the Date
of the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH\r\n * 108°}. If the calculation can't be computed, null will be returned. See detailed explanation on top\r\n * of the page.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getEndAstronomicalTwilight(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(AstronomicalCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A utility method that returns the time of an offset by degrees below or above the horizon of\r\n * {@link #getSunrise() sunrise}. Note that the degree offset is from the vertical, so for a calculation of 14°\r\n * before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.\r\n *\r\n * @param offsetZenith\r\n * the degrees before {@link #getSunrise()} to use in the calculation. For time after sunrise use\r\n * negative numbers. Note that the degree offset is from the vertical, so for a calculation of 14°\r\n * before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a\r\n * parameter.\r\n * @return The {@link java.util.Date} of the offset after (or before) {@link #getSunrise()}. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does\r\n * not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * page.\r\n */\r\n public getSunriseOffsetByDegrees(offsetZenith: number): Temporal.ZonedDateTime | null {\r\n const dawn: number = this.getUTCSunrise(offsetZenith);\r\n if (Number.isNaN(dawn)) return null;\r\n return this.getDateFromTime(dawn, true);\r\n }\r\n\r\n /**\r\n * A utility method that returns the time of an offset by degrees below or above the horizon of {@link #getSunset()\r\n * sunset}. Note that the degree offset is from the vertical, so for a calculation of 14° after sunset, an\r\n * offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.\r\n *\r\n * @param offsetZenith\r\n * the degrees after {@link #getSunset()} to use in the calculation. For time before sunset use negative\r\n * numbers. Note that the degree offset is from the vertical, so for a calculation of 14° after\r\n * sunset, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter.\r\n * @return The {@link java.util.Date}of the offset after (or before) {@link #getSunset()}. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * page.\r\n */\r\n public getSunsetOffsetByDegrees(offsetZenith: number): Temporal.ZonedDateTime | null {\r\n const sunset: number = this.getUTCSunset(offsetZenith);\r\n if (Number.isNaN(sunset)) return null;\r\n return this.getDateFromTime(sunset, false);\r\n }\r\n\r\n /**\r\n * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default\r\n * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.\r\n */\r\n\r\n /*\r\n constructor() {\r\n this(new GeoLocation());\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that takes in geolocation information as a\r\n * parameter. The default {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} used for solar\r\n * calculations is the the {@link NOAACalculator}.\r\n *\r\n * @param geoLocation\r\n * The location information used for calculating astronomical sun times.\r\n *\r\n * @see #setAstronomicalCalculator(AstronomicalCalculator) for changing the calculator class.\r\n */\r\n constructor(geoLocation: GeoLocation) {\r\n this.setDate(Temporal.Now.plainDateISO());\r\n this.setGeoLocation(geoLocation); // duplicate call\r\n this.setAstronomicalCalculator(new NOAACalculator());\r\n }\r\n\r\n /**\r\n * A method that returns the sunrise in UTC time without correction for time zone offset from GMT and without using\r\n * daylight savings time.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time after sunrise use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n */\r\n public getUTCSunrise(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunrise(this.getAdjustedDate(), this.getGeoLocation(), zenith, true);\r\n }\r\n\r\n /**\r\n * A method that returns the sunrise in UTC time without correction for time zone offset from GMT and without using\r\n * daylight savings time. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible\r\n * light, something that is not affected by elevation. This method returns UTC sunrise calculated at sea level. This\r\n * forms the base for dawn calculations that are calculated as a dip below the horizon before sunrise.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time after sunrise use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getUTCSunrise\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunset\r\n */\r\n public getUTCSeaLevelSunrise(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunrise(this.getAdjustedDate(), this.getGeoLocation(), zenith, false);\r\n }\r\n\r\n /**\r\n * A method that returns the sunset in UTC time without correction for time zone offset from GMT and without using\r\n * daylight savings time.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time after sunset use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunset\r\n */\r\n public getUTCSunset(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunset(this.getAdjustedDate(), this.getGeoLocation(), zenith, true);\r\n }\r\n\r\n /**\r\n * A method that returns the sunset in UTC time without correction for elevation, time zone offset from GMT and\r\n * without using daylight savings time. Non-sunrise and sunset calculations such as dawn and dusk, depend on the\r\n * amount of visible light, something that is not affected by elevation. This method returns UTC sunset calculated\r\n * at sea level. This forms the base for dusk calculations that are calculated as a dip below the horizon after\r\n * sunset.\r\n *\r\n * @param zenith\r\n * the degrees below the horizon. For time before sunset use negative numbers.\r\n * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page.\r\n * @see AstronomicalCalendar#getUTCSunset\r\n * @see AstronomicalCalendar#getUTCSeaLevelSunrise\r\n */\r\n public getUTCSeaLevelSunset(zenith: number): number {\r\n return this.getAstronomicalCalculator()\r\n .getUTCSunset(this.getAdjustedDate(), this.getGeoLocation(), zenith, false);\r\n }\r\n\r\n /**\r\n * A method that returns an {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted}\r\n * temporal (solar) hour. The day from {@link #getSunrise() sunrise} to {@link #getSunset() sunset} is split into 12\r\n * equal parts with each one being a temporal hour.\r\n *\r\n * @see #getSunrise()\r\n * @see #getSunset()\r\n * @see #getTemporalHour(Date, Date)\r\n *\r\n * @return the long
millisecond length of a temporal hour. If the calculation can't be computed,\r\n * {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the page.\r\n *\r\n * @see #getTemporalHour(Date, Date)\r\n */\r\n\r\n /*\r\n public getTemporalHour(): number {\r\n return this.getTemporalHour(this.getSeaLevelSunrise(), this.getSeaLevelSunset());\r\n }\r\n */\r\n\r\n /**\r\n * A utility method that will allow the calculation of a temporal (solar) hour based on the sunrise and sunset\r\n * passed as parameters to this method. An example of the use of this method would be the calculation of a\r\n * non-elevation adjusted temporal hour by passing in {@link #getSeaLevelSunrise() sea level sunrise} and\r\n * {@link #getSeaLevelSunset() sea level sunset} as parameters.\r\n *\r\n * @param startOfday\r\n * The start of the day.\r\n * @param endOfDay\r\n * The end of the day.\r\n *\r\n * @return the long
millisecond length of the temporal hour. If the calculation can't be computed a\r\n * {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the page.\r\n *\r\n * @see #getTemporalHour()\r\n */\r\n public getTemporalHour(startOfday: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise(), endOfDay: Temporal.ZonedDateTime | null = this.getSeaLevelSunset()) {\r\n if (startOfday === null || endOfDay === null) {\r\n return;\r\n }\r\n const intValue = startOfday.until(endOfDay).total({ unit: 'nanoseconds' }) / 12;\r\n return Temporal.Duration.from({ nanoseconds: Math.trunc(intValue) })\r\n }\r\n\r\n /**\r\n * A method that returns \"solar\" midnight, or the time when the sun is at its nadir.\r\n * Note: this method is experimental and might be removed.\r\n * \r\n * @return the Date
of Solar Midnight (chatzos layla). If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSolarMidnight(): Temporal.ZonedDateTime | null {\r\n const clonedCal = this.clone();\r\n clonedCal.setDate(this.getDate().add({ days: 1 }));\r\n return this.getSunTransit()!\r\n .add({nanoseconds: Math.trunc(this.getSunTransit()?.until(clonedCal.getSunTransit()!).total({ unit: \"nanoseconds\" })! / 2)});\r\n }\r\n\r\n /**\r\n * A method that returns sundial or solar noon. It occurs when the Sun is transiting the celestial meridian. In this class it is\r\n * calculated as halfway between the sunrise and sunset passed to this method. This time can be slightly off the\r\n * real transit time due to changes in declination (the lengthening or shortening day).\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating the sun's transit. This can be sea level sunrise, visual sunrise (or\r\n * any arbitrary start of day) passed to this method.\r\n * @param endOfDay\r\n * the end of day for calculating the sun's transit. This can be sea level sunset, visual sunset (or any\r\n * arbitrary end of day) passed to this method.\r\n *\r\n * @return the Date
representing Sun's transit. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, null will be returned. See detailed explanation on top of the page.\r\n */\r\n public getSunTransit(startOfDay?: Temporal.ZonedDateTime, endOfDay?: Temporal.ZonedDateTime): Temporal.ZonedDateTime | null {\r\n if (startOfDay) {\r\n if (!endOfDay)\r\n throw new IllegalArgumentException('No argument for the end of day provided');\r\n\r\n const temporalHour = this.getTemporalHour(startOfDay, endOfDay)!;\r\n let offsetTime = startOfDay;\r\n for (let index = 0; index < 6; index++) {\r\n offsetTime = offsetTime.add(temporalHour);\r\n }\r\n\r\n return offsetTime;\r\n }\r\n\r\n const noon = this.getAstronomicalCalculator().getUTCNoon(this.getAdjustedDate(), this.getGeoLocation());\r\n return this.getDateFromTime(noon, false); \r\n }\r\n\r\n /**\r\n * A method that returns a Date
from the time passed in as a parameter.\r\n *\r\n * @param time\r\n * The time to be set as the time for the Date
. The time expected is in the format: 18.75\r\n * for 6:45:00 PM.\r\n * @param isSunrise true if the time is sunrise, and false if it is sunset\r\n * @return The Date.\r\n */\r\n protected getDateFromTime(time: number, isSunrise: boolean): Temporal.ZonedDateTime | null {\r\n if (Number.isNaN(time)) {\r\n return null;\r\n }\r\n let calculatedTime: number = time;\r\n\r\n const adjustedDate: Temporal.PlainDate = this.getAdjustedDate();\r\n let cal = adjustedDate.toZonedDateTime(\"UTC\");\r\n\r\n const hours: number = Math.trunc(calculatedTime); // retain only the hours\r\n calculatedTime -= hours;\r\n const minutes: number = Math.trunc(calculatedTime *= 60); // retain only the minutes\r\n calculatedTime -= minutes;\r\n const seconds: number = Math.trunc(calculatedTime *= 60); // retain only the seconds\r\n calculatedTime -= seconds; // remaining milliseconds\r\n const milliseconds = Math.trunc(calculatedTime *= 1000)\r\n calculatedTime -= milliseconds;\r\n const microseconds = Math.trunc(calculatedTime *= 1000)\r\n calculatedTime -= microseconds; // remaining nanoseconds\r\n\r\n\r\n // Check if a date transition has occurred, or is about to occur - this indicates the date of the event is\r\n // actually not the target date, but the day prior or after\r\n const localTimeHours: number = Math.trunc(this.getGeoLocation().getLongitude() / 15);\r\n if (isSunrise && localTimeHours + hours > 18) {\r\n cal = cal.subtract({ days: 1 });\r\n } else if (!isSunrise && localTimeHours + hours < 6) {\r\n cal = cal.add({ days: 1 });\r\n }\r\n\r\n return cal.with({\r\n hour: hours,\r\n minute: minutes,\r\n second: seconds,\r\n millisecond: milliseconds,\r\n microsecond: microseconds,\r\n nanosecond: Math.trunc(calculatedTime * 1000)\r\n }).withTimeZone(this.geoLocation.getTimeZone());\r\n }\r\n\r\n /**\r\n * Returns the dip below the horizon before sunrise that matches the offset minutes on passed in as a parameter. For\r\n * example passing in 72 minutes for a calendar set to the equinox in Jerusalem returns a value close to 16.1°\r\n * Please note that this method is very slow and inefficient and should NEVER be used in a loop. TODO: Improve\r\n * efficiency.\r\n *\r\n * @param minutes\r\n * offset\r\n * @return the degrees below the horizon before sunrise that match the offset in minutes passed it as a parameter.\r\n * @see #getSunsetSolarDipFromOffset(double)\r\n */\r\n public getSunriseSolarDipFromOffset(minutes: number): number | null {\r\n if (Number.isNaN(minutes)) return null;\r\n\r\n let offsetByDegrees: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise();\r\n const offsetByTime: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise()?.subtract({ minutes })!;\r\n\r\n let degrees: Big = new Big(0);\r\n const incrementor: Big = new Big('0.0001');\r\n\r\n // If `minutes` is not `NaN` and `offsetByDegrees` is not null, `offsetByTime` should not be null\r\n while (offsetByDegrees === null || ((minutes < 0 && offsetByDegrees < offsetByTime!)\r\n || (minutes > 0 && offsetByDegrees > offsetByTime!))) {\r\n if (minutes > 0) {\r\n degrees = degrees.add(incrementor);\r\n } else {\r\n degrees = degrees.sub(incrementor);\r\n }\r\n\r\n offsetByDegrees = this.getSunriseOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + degrees.toNumber());\r\n }\r\n\r\n return degrees.toNumber();\r\n }\r\n\r\n /**\r\n * Returns the dip below the horizon after sunset that matches the offset minutes on passed in as a parameter. For\r\n * example passing in 72 minutes for a calendar set to the equinox in Jerusalem returns a value close to 16.1°\r\n * Please note that this method is very slow and inefficient and should NEVER be used in a loop. TODO: Improve\r\n * efficiency.\r\n *\r\n * @param minutes\r\n * offset\r\n * @return the degrees below the horizon after sunset that match the offset in minutes passed it as a parameter.\r\n * @see #getSunriseSolarDipFromOffset(double)\r\n */\r\n public getSunsetSolarDipFromOffset(minutes: number): number | null {\r\n if (Number.isNaN(minutes)) return null;\r\n\r\n let offsetByDegrees: Temporal.ZonedDateTime | null = this.getSeaLevelSunset();\r\n const offsetByTime: Temporal.ZonedDateTime | null = this.getSeaLevelSunset()?.add({ minutes })!\r\n\r\n let degrees: Big = new Big(0);\r\n const incrementor: Big = new Big('0.001');\r\n\r\n // If `minutes` is not `NaN` and `offsetByDegrees` is not null, `offsetByTime` should not be null\r\n while (offsetByDegrees == null || ((minutes > 0 && offsetByDegrees < offsetByTime!)\r\n || (minutes < 0 && offsetByDegrees > offsetByTime!))) {\r\n if (minutes > 0) {\r\n degrees = degrees.add(incrementor);\r\n } else {\r\n degrees = degrees.sub(incrementor);\r\n }\r\n\r\n offsetByDegrees = this.getSunsetOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + degrees.toNumber());\r\n }\r\n\r\n return degrees.toNumber();\r\n }\r\n\r\n /**\r\n * FIXME broken for czc.getRiseSetSolarDipFromOffset(-72, czc.getSunrise());\r\n * and broken in other was as well\r\n * @param minutes\r\n * @param riseSet\r\n * @return\r\n */\r\n /*\r\n public getRiseSetSolarDipFromOffset(minutes: number, riseSet: DateTime): number {\r\n let offsetByDegrees: DateTime | null = riseSet;\r\n const offsetByTime: DateTime | null = AstronomicalCalendar.getTimeOffset(riseSet, minutes * AstronomicalCalendar.MIUTE_MILLIS);\r\n\r\n let degrees: Big = new Big(0);\r\n const incrementor: Big = new Big('0.001');\r\n\r\n while (offsetByDegrees == null || ((minutes > 0 && offsetByDegrees < offsetByTime!)\r\n || (minutes < 0 && offsetByDegrees > offsetByTime!))) {\r\n if (minutes > 0) {\r\n degrees = degrees.add(incrementor);\r\n } else {\r\n degrees = degrees.sub(incrementor);\r\n }\r\n offsetByDegrees = this.getSunsetOffsetByDegrees(AstronomicalCalendar.GEOMETRIC_ZENITH + degrees.toNumber());\r\n }\r\n return degrees.valueOf();\r\n }\r\n */\r\n\r\n /**\r\n\t * A method that returns local mean time (LMT) time\r\n\t * converted to regular clock time for the number of hours (0.0 to 23.999...) passed to this method. This time is\r\n\t * adjusted from standard time to account for the local latitude. The 360° of the globe divided by 24 calculates\r\n\t * to 15° per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... noon is at exactly 12:00pm.\r\n\t * Lakewood, N.J., with a longitude of -74.222, is 0.7906 away from the closest multiple of 15 at -75°. This is\r\n\t * multiplied by 4 clock minutes (per degree) to yield 3 minutes and 7 seconds for a noon time of 11:56:53am. This\r\n\t * method is not tied to the theoretical 15° time zones, but will adjust to the actual time zone and Daylight saving time to return LMT.\r\n\t * \r\n\t * @param hours\r\n\t * \t\t\tthe hour (such as 12.0 for noon and 0.0 for midnight) to calculate as LMT. Valid values are in the range of\r\n\t * \t\t\t0.0 to 23.999.... An IllegalArgumentException will be thrown if the value does not fit in the expected range.\r\n\t * @return the Date representing the local mean time (LMT) for the number of hours passed in. In Lakewood, NJ, passing 12\r\n\t * (noon) will return 11:56:50am.\r\n\t * @see GeoLocation#getLocalMeanTimeOffset()\r\n\t */\r\n\tpublic getLocalMeanTime(hours:number): Temporal.ZonedDateTime | null {\r\n\t\tif(hours < 0 || hours >= 24) {\r\n\t\t\tthrow new IllegalArgumentException(\"Hours must between 0 and 23.9999...\");\r\n\t\t}\r\n \r\n const geoLocation: GeoLocation = this.getGeoLocation();\r\n const rawOffsetHours = TimeZone.getRawOffset(geoLocation.getTimeZone()) / AstronomicalCalendar.HOUR_NANOS;\r\n return this.getDateFromTime(hours - rawOffsetHours, true)?.subtract({ nanoseconds: geoLocation.getLocalMeanTimeOffset() })!;\r\n\t}\r\n\r\n /**\r\n * Adjusts the Calendar
to deal with edge cases where the location crosses the antimeridian.\r\n *\r\n * @see GeoLocation#getAntimeridianAdjustment()\r\n * @return the adjusted Calendar\r\n */\r\n private getAdjustedDate(): Temporal.PlainDate {\r\n const offset: -1 | 0 | 1 = this.getGeoLocation().getAntimeridianAdjustment();\r\n if (offset === 0) return this.getDate();\r\n return this.getDate().add({ days: offset });\r\n }\r\n\r\n /**\r\n * @return an XML formatted representation of the class. It returns the default output of the\r\n * {@link ZmanimFormatter#toXML(AstronomicalCalendar) toXML} method.\r\n * @see ZmanimFormatter#toXML(AstronomicalCalendar)\r\n * @see java.lang.Object#toString()\r\n * @deprecated (This depends on a circular dependency).\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toString(): void {\r\n throw new UnsupportedError('This method is unsupported, due to the fact that it depends on a circular dependency.');\r\n }\r\n\r\n /**\r\n * @return a JSON formatted representation of the class. It returns the default output of the\r\n * {@link ZmanimFormatter#toJSON(AstronomicalCalendar) toJSON} method.\r\n * @see ZmanimFormatter#toJSON(AstronomicalCalendar)\r\n * @see java.lang.Object#toString()\r\n * @deprecated This depends on a circular dependency. Use ZmanimFormatter.toJSON(astronomicalCalendar)instead.\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toJSON(): void {\r\n throw new UnsupportedError('This method is unsupported, due to the fact that it depends on a circular dependency. '\r\n + 'Use `ZmanimFormatter.toJSON(astronomicalCalendar)` instead.');\r\n }\r\n\r\n /**\r\n * @see java.lang.Object#equals(Object)\r\n */\r\n public equals(object: object): boolean {\r\n if (this === object) {\r\n return true;\r\n }\r\n if (!(object instanceof AstronomicalCalendar)) {\r\n return false;\r\n }\r\n const aCal: AstronomicalCalendar = object as AstronomicalCalendar;\r\n return this.getDate().equals(aCal.getDate()) && this.getGeoLocation().equals(aCal.getGeoLocation())\r\n && this.getAstronomicalCalculator() === aCal.getAstronomicalCalculator();\r\n }\r\n\r\n /**\r\n * A method that returns the currently set {@link GeoLocation} which contains location information used for the\r\n * astronomical calculations.\r\n *\r\n * @return Returns the geoLocation.\r\n */\r\n public getGeoLocation(): GeoLocation {\r\n return this.geoLocation;\r\n }\r\n\r\n /**\r\n * Sets the {@link GeoLocation}
Object
to be used for astronomical calculations.\r\n *\r\n * @param geoLocation\r\n * The geoLocation to set.\r\n */\r\n public setGeoLocation(geoLocation: GeoLocation): void {\r\n this.geoLocation = geoLocation;\r\n }\r\n\r\n /**\r\n * A method that returns the currently set AstronomicalCalculator.\r\n *\r\n * @return Returns the astronomicalCalculator.\r\n * @see #setAstronomicalCalculator(AstronomicalCalculator)\r\n */\r\n public getAstronomicalCalculator(): AstronomicalCalculator {\r\n return this.astronomicalCalculator;\r\n }\r\n\r\n /**\r\n * A method to set the {@link AstronomicalCalculator} used for astronomical calculations. The Zmanim package ships\r\n * with a number of different implementations of the abstract
{@link AstronomicalCalculator} based on\r\n * different algorithms, including the default {@link com.kosherjava.zmanim.util.NOAACalculator} based on NOAA's implementation of Jean Meeus's algorithms as well as {@link\r\n * com.kosherjava.zmanim.util.SunTimesCalculator} based on the US\r\n * Naval Observatory's algorithm,. This allows easy runtime switching and comparison of different algorithms.\r\n *\r\n * @param astronomicalCalculator\r\n * The astronomicalCalculator to set.\r\n */\r\n public setAstronomicalCalculator(astronomicalCalculator: AstronomicalCalculator): void {\r\n this.astronomicalCalculator = astronomicalCalculator;\r\n }\r\n\r\n /**\r\n * returns the Calendar object encapsulated in this class.\r\n *\r\n * @return Returns the calendar.\r\n */\r\n public getDate(): Temporal.PlainDate {\r\n return this.date;\r\n }\r\n\r\n /**\r\n * @param calendar\r\n * The calendar to set.\r\n */\r\n public setDate(date: Temporal.PlainDate | Date | string | number): void {\r\n if (date instanceof Temporal.PlainDate) {\r\n this.date = date;\r\n } else if (date instanceof Date) {\r\n this.date = Temporal.Instant.fromEpochMilliseconds(date.valueOf()).toZonedDateTimeISO(this.geoLocation.getTimeZone()).toPlainDate();\r\n } else if (typeof date === 'string') {\r\n this.date = Temporal.PlainDate.from(date);\r\n }\r\n }\r\n\r\n /**\r\n * A method that creates a deep copy of the object.\r\n * Note: If the {@link java.util.TimeZone} in the cloned {@link GeoLocation} will\r\n * be changed from the original, it is critical that\r\n * {@link AstronomicalCalendar#getCalendar()}.\r\n * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} be called in order for the\r\n * AstronomicalCalendar to output times in the expected offset after being cloned.\r\n *\r\n * @see java.lang.Object#clone()\r\n * @since 1.1\r\n */\r\n public clone(): AstronomicalCalendar {\r\n const clonedCalendar: AstronomicalCalendar = new AstronomicalCalendar(this.geoLocation);\r\n clonedCalendar.setDate(this.date);\r\n clonedCalendar.setAstronomicalCalculator(this.astronomicalCalculator);\r\n\r\n return clonedCalendar;\r\n }\r\n\r\n // eslint-disable-next-line class-methods-use-this\r\n public getClassName() {\r\n return 'com.kosherjava.zmanim.AstronomicalCalendar';\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar } from '../polyfills/Utils.ts';\r\nimport { IllegalArgumentException } from '../polyfills/errors.ts';\r\n\r\n/**\r\n * The JewishDate is the base calendar class, that supports maintenance of a {@link java.util.GregorianCalendar}\r\n * instance along with the corresponding Jewish date. This class can use the standard Java Date and Calendar\r\n * classes for setting and maintaining the dates, but it does not subclass these classes or use them internally\r\n * in any calculations. This class also does not have a concept of a time (which the Date class does). Please\r\n * note that the calendar does not currently support dates prior to 1/1/1 Gregorian. Also keep in mind that the\r\n * Gregorian calendar started on October 15, 1582, so any calculations prior to that are suspect (at least from\r\n * a Gregorian perspective). While 1/1/1 Gregorian and forward are technically supported, any calculations prior to Hillel II's (Hakatan's) calendar (4119 in the Jewish Calendar / 359\r\n * CE Julian as recorded by Rav Hai Gaon) would be just an\r\n * approximation.\r\n *\r\n * This open source Java code was written by Avrom Finkelstien from his C++\r\n * code. It was refactored to fit the KosherJava Zmanim API with simplification of the code, enhancements and some bug\r\n * fixing.\r\n *\r\n * Some of Avrom's original C++ code was translated from C/C++\r\n * code in Calendrical Calculations by Nachum Dershowitz and Edward M.\r\n * Reingold, Software-- Practice & Experience, vol. 20, no. 9 (September, 1990), pp. 899- 928. Any method with the mark\r\n * \"ND+ER\" indicates that the method was taken from this source with minor modifications.\r\n *\r\n * If you are looking for a class that implements a Jewish calendar version of the Calendar class, one is available from\r\n * the ICU (International Components for Unicode) project, formerly part of\r\n * IBM's DeveloperWorks.\r\n *\r\n * @see JewishCalendar\r\n * @see HebrewDateFormatter\r\n * @see java.util.Date\r\n * @see java.util.Calendar\r\n * @author © Avrom Finkelstien 2002\r\n * @author © Eliyahu Hershfeld 2011 - 2015\r\n */\r\nexport class JewishDate {\r\n /**\r\n * Value of the month field indicating Nissan, the first numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 7th (or 8th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly NISSAN: number = 1;\r\n\r\n /**\r\n * Value of the month field indicating Iyar, the second numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 8th (or 9th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly IYAR: number = 2;\r\n\r\n /**\r\n * Value of the month field indicating Sivan, the third numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 9th (or 10th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly SIVAN: number = 3;\r\n\r\n /**\r\n * Value of the month field indicating Tammuz, the fourth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 10th (or 11th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly TAMMUZ: number = 4;\r\n\r\n /**\r\n * Value of the month field indicating Av, the fifth numeric month of the year in the Jewish calendar. With the year\r\n * starting at {@link #TISHREI}, it would actually be the 11th (or 12th in a {@link #isJewishLeapYear() leap year})\r\n * month of the year.\r\n */\r\n public static readonly AV: number = 5;\r\n\r\n /**\r\n * Value of the month field indicating Elul, the sixth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 12th (or 13th in a {@link #isJewishLeapYear() leap\r\n * year}) month of the year.\r\n */\r\n public static readonly ELUL: number = 6;\r\n\r\n /**\r\n * Value of the month field indicating Tishrei, the seventh numeric month of the year in the Jewish calendar. With\r\n * the year starting at this month, it would actually be the 1st month of the year.\r\n */\r\n public static readonly TISHREI: number = 7;\r\n\r\n /**\r\n * Value of the month field indicating Cheshvan/marcheshvan, the eighth numeric month of the year in the Jewish\r\n * calendar. With the year starting at {@link #TISHREI}, it would actually be the 2nd month of the year.\r\n */\r\n public static readonly CHESHVAN: number = 8;\r\n\r\n /**\r\n * Value of the month field indicating Kislev, the ninth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 3rd month of the year.\r\n */\r\n public static readonly KISLEV: number = 9;\r\n\r\n /**\r\n * Value of the month field indicating Teves, the tenth numeric month of the year in the Jewish calendar. With the\r\n * year starting at {@link #TISHREI}, it would actually be the 4th month of the year.\r\n */\r\n public static readonly TEVES: number = 10;\r\n\r\n /**\r\n * Value of the month field indicating Shevat, the eleventh numeric month of the year in the Jewish calendar. With\r\n * the year starting at {@link #TISHREI}, it would actually be the 5th month of the year.\r\n */\r\n public static readonly SHEVAT: number = 11;\r\n\r\n /**\r\n * Value of the month field indicating Adar (or Adar I in a {@link #isJewishLeapYear() leap year}), the twelfth\r\n * numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually\r\n * be the 6th month of the year.\r\n */\r\n public static readonly ADAR: number = 12;\r\n\r\n /**\r\n * Value of the month field indicating Adar II, the leap (intercalary or embolismic) thirteenth (Undecimber) numeric\r\n * month of the year added in Jewish {@link #isJewishLeapYear() leap year}). The leap years are years 3, 6, 8, 11,\r\n * 14, 17 and 19 of a 19 year cycle. With the year starting at {@link #TISHREI}, it would actually be the 7th month\r\n * of the year.\r\n */\r\n public static readonly ADAR_II: number = 13;\r\n\r\n /**\r\n * the Jewish epoch using the RD (Rata Die/Fixed Date or Reingold Dershowitz) day used in Calendrical Calculations.\r\n * Day 1 is January 1, 0001 Gregorian\r\n */\r\n private static readonly JEWISH_EPOCH: number = -1373429;\r\n\r\n /** The number of chalakim (18) in a minute. */\r\n private static readonly CHALAKIM_PER_MINUTE: number = 18;\r\n\r\n /** The number of chalakim (1080) in an hour. */\r\n private static readonly CHALAKIM_PER_HOUR: number = 1080;\r\n\r\n /** The number of chalakim (25,920) in a 24 hour day. */\r\n private static readonly CHALAKIM_PER_DAY: number = 25920; // 24 * 1080\r\n\r\n /** The number of chalakim in an average Jewish month. A month has 29 days, 12 hours and 793\r\n * chalakim (44 minutes and 3.3 seconds) for a total of 765,433 chalakim */\r\n private static readonly CHALAKIM_PER_MONTH: number = 765433; // (29 * 24 + 12) * 1080 + 793\r\n\r\n /**\r\n * Days from the beginning of Sunday till molad BaHaRaD. Calculated as 1 day, 5 hours and 204 chalakim = (24 + 5) *\r\n * 1080 + 204 = 31524\r\n */\r\n private static readonly CHALAKIM_MOLAD_TOHU: number = 31524;\r\n\r\n /**\r\n * A short year where both {@link #CHESHVAN} and {@link #KISLEV} are 29 days.\r\n *\r\n * @see #getCheshvanKislevKviah()\r\n * @see HebrewDateFormatter#getFormattedKviah(int)\r\n */\r\n public static readonly CHASERIM: number = 0;\r\n\r\n /**\r\n * An ordered year where {@link #CHESHVAN} is 29 days and {@link #KISLEV} is 30 days.\r\n *\r\n * @see #getCheshvanKislevKviah()\r\n * @see HebrewDateFormatter#getFormattedKviah(int)\r\n */\r\n public static readonly KESIDRAN: number = 1;\r\n\r\n /**\r\n * A long year where both {@link #CHESHVAN} and {@link #KISLEV} are 30 days.\r\n *\r\n * @see #getCheshvanKislevKviah()\r\n * @see HebrewDateFormatter#getFormattedKviah(int)\r\n */\r\n public static readonly SHELAIMIM: number = 2;\r\n\r\n private date: Temporal.PlainDate;\r\n\r\n /** the internal count of molad hours. */\r\n private moladHours!: number;\r\n\r\n /** the internal count of molad minutes. */\r\n private moladMinutes!: number;\r\n\r\n /** the internal count of molad chalakim. */\r\n private moladChalakim!: number;\r\n\r\n /**\r\n * Returns the molad hours. Only a JewishDate object populated with {@link #getMolad()},\r\n * {@link #setJewishDate(int, int, int, int, int, int)} or {@link #setMoladHours(int)} will have this field\r\n * populated. A regular JewishDate object will have this field set to 0.\r\n *\r\n * @return the molad hours\r\n * @see #setMoladHours(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n */\r\n public getMoladHours(): number {\r\n return this.moladHours;\r\n }\r\n\r\n /**\r\n * Sets the molad hours.\r\n *\r\n * @param moladHours\r\n * the molad hours to set\r\n * @see #getMoladHours()\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n *\r\n */\r\n public setMoladHours(moladHours: number): void {\r\n this.moladHours = moladHours;\r\n }\r\n\r\n /**\r\n * Returns the molad minutes. Only an object populated with {@link #getMolad()},\r\n * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladMinutes(int)} will have these fields\r\n * populated. A regular JewishDate object will have this field set to 0.\r\n *\r\n * @return the molad minutes\r\n * @see #setMoladMinutes(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n */\r\n public getMoladMinutes(): number {\r\n return this.moladMinutes;\r\n }\r\n\r\n /**\r\n * Sets the molad minutes. The expectation is that the traditional minute-less chalakim will be broken out to\r\n * minutes and {@link #setMoladChalakim(int) chalakim/parts} , so 793 (TaShTZaG) parts would have the minutes set to\r\n * 44 and chalakim to 1.\r\n *\r\n * @param moladMinutes\r\n * the molad minutes to set\r\n * @see #getMoladMinutes()\r\n * @see #setMoladChalakim(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n *\r\n */\r\n public setMoladMinutes(moladMinutes: number): void {\r\n this.moladMinutes = moladMinutes;\r\n }\r\n\r\n /**\r\n * Sets the molad chalakim/parts. The expectation is that the traditional minute-less chalakim will be broken out to\r\n * {@link #setMoladMinutes(int) minutes} and chalakim, so 793 (TaShTZaG) parts would have the minutes set to 44 and\r\n * chalakim to 1.\r\n *\r\n * @param moladChalakim\r\n * the molad chalakim/parts to set\r\n * @see #getMoladChalakim()\r\n * @see #setMoladMinutes(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n *\r\n */\r\n public setMoladChalakim(moladChalakim: number): void {\r\n this.moladChalakim = moladChalakim;\r\n }\r\n\r\n /**\r\n * Returns the molad chalakim/parts. Only an object populated with {@link #getMolad()},\r\n * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladChalakim(int)} will have these fields\r\n * populated. A regular JewishDate object will have this field set to 0.\r\n *\r\n * @return the molad chalakim/parts\r\n * @see #setMoladChalakim(int)\r\n * @see #getMolad()\r\n * @see #setJewishDate(int, int, int, int, int, int)\r\n */\r\n public getMoladChalakim(): number {\r\n return this.moladChalakim;\r\n }\r\n\r\n /**\r\n * Returns the last day in a gregorian month\r\n *\r\n * @param month\r\n * the Gregorian month\r\n * @return the last day of the Gregorian month\r\n */\r\n public getLastDayOfGregorianMonth(month: number): number {\r\n return this.date.with({ month }).daysInMonth;\r\n }\r\n\r\n /**\r\n * Returns the number of days in a given month in a given month and year.\r\n *\r\n * @param month\r\n * the month. As with other cases in this class, this is 1-based, not zero-based.\r\n * @param year\r\n * the year (only impacts February)\r\n * @return the number of days in the month in the given year\r\n */\r\n private static getLastDayOfGregorianMonth(month: number, year: number): number {\r\n switch (month) {\r\n case 2:\r\n if ((year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0)) {\r\n return 29;\r\n }\r\n return 28;\r\n case 4:\r\n case 6:\r\n case 9:\r\n case 11:\r\n return 30;\r\n default:\r\n return 31;\r\n }\r\n }\r\n\r\n /**\r\n * Computes the Gregorian date from the absolute date. ND+ER\r\n * @param absDate - the absolute date\r\n */\r\n private absDateToDate(absDate: number): void {\r\n let year: number = Math.trunc(absDate / 366); // Search forward year by year from approximate year\r\n while (absDate >= JewishDate.gregorianDateToAbsDate(year + 1, 1, 1)) {\r\n year++;\r\n }\r\n\r\n let month: number = 1; // Search forward month by month from January\r\n while (absDate > JewishDate.gregorianDateToAbsDate(year, month, JewishDate.getLastDayOfGregorianMonth(month, year))) {\r\n month++;\r\n }\r\n\r\n const dayOfMonth: number = absDate - JewishDate.gregorianDateToAbsDate(year, month, 1) + 1;\r\n this.setInternalGregorianDate(year, month, dayOfMonth);\r\n }\r\n\r\n /**\r\n * Computes the absolute date from a Gregorian date. ND+ER\r\n *\r\n * @param year\r\n * the Gregorian year\r\n * @param month\r\n * the Gregorian month. Unlike the Java Calendar where January has the value of 0,This expects a 1 for\r\n * January\r\n * @param dayOfMonth\r\n * the day of the month (1st, 2nd, etc...)\r\n * @return the absolute Gregorian day\r\n */\r\n private static gregorianDateToAbsDate(year: number, month: number, dayOfMonth: number): number {\r\n let absDate: number = dayOfMonth;\r\n for (let m: number = month - 1; m > 0; m--) {\r\n absDate += JewishDate.getLastDayOfGregorianMonth(m, year); // days in prior months of the year\r\n }\r\n return (absDate // days this year\r\n + 365 * (year - 1) // days in previous years ignoring leap days\r\n + Math.trunc((year - 1) / 4) // Julian leap days before this year\r\n - Math.trunc((year - 1) / 100) // minus prior century years\r\n + Math.trunc((year - 1) / 400)); // plus prior years divisible by 400\r\n }\r\n\r\n /**\r\n * Returns if the year is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19 year cycle are leap years.\r\n *\r\n * @param year\r\n * the Jewish year.\r\n * @return true if it is a leap year\r\n * @see #isJewishLeapYear()\r\n */\r\n private static isJewishLeapYear(year: number): boolean {\r\n return ((7 * year) + 1) % 19 < 7;\r\n }\r\n\r\n /**\r\n * Returns if the year the calendar is set to is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19 year\r\n * cycle are leap years.\r\n *\r\n * @return true if it is a leap year\r\n * @see #isJewishLeapYear(int)\r\n */\r\n public isJewishLeapYear(): boolean {\r\n return JewishDate.isJewishLeapYear(this.getJewishYear());\r\n }\r\n\r\n /**\r\n * Returns the last month of a given Jewish year. This will be 12 on a non {@link #isJewishLeapYear(int) leap year}\r\n * or 13 on a leap year.\r\n *\r\n * @param year\r\n * the Jewish year.\r\n * @return 12 on a non leap year or 13 on a leap year\r\n * @see #isJewishLeapYear(int)\r\n */\r\n private static getLastMonthOfJewishYear(year: number): number {\r\n return JewishDate.isJewishLeapYear(year) ? JewishDate.ADAR_II : JewishDate.ADAR;\r\n }\r\n\r\n /**\r\n * Returns the number of days elapsed from the Sunday prior to the start of the Jewish calendar to the mean\r\n * conjunction of Tishri of the Jewish year.\r\n *\r\n * @param year\r\n * the Jewish year\r\n * @return the number of days elapsed from prior to the molad Tohu BaHaRaD (Be = Monday, Ha= 5 hours and Rad =204\r\n * chalakim/parts) prior to the start of the Jewish calendar, to the mean conjunction of Tishri of the\r\n * Jewish year. BeHaRaD is 23:11:20 on Sunday night(5 hours 204/1080 chalakim after sunset on Sunday\r\n * evening).\r\n */\r\n public static getJewishCalendarElapsedDays(year: number): number {\r\n const chalakimSince: number = JewishDate.getChalakimSinceMoladTohu(year, JewishDate.TISHREI);\r\n const moladDay: number = Math.trunc(chalakimSince / JewishDate.CHALAKIM_PER_DAY);\r\n const moladParts: number = Math.trunc(chalakimSince - moladDay * JewishDate.CHALAKIM_PER_DAY);\r\n // delay Rosh Hashana for the 4 dechiyos\r\n return JewishDate.addDechiyos(year, moladDay, moladParts);\r\n }\r\n\r\n // private static int getJewishCalendarElapsedDaysOLD(int year) {\r\n // // Jewish lunar month = 29 days, 12 hours and 793 chalakim\r\n // // Molad Tohu = BeHaRaD - Monday, 5 hours (11 PM) and 204 chalakim\r\n // final int chalakimTashTZag = 793; // chalakim in a lunar month\r\n // final int chalakimTohuRaD = 204; // chalakim from original molad Tohu BeHaRaD\r\n // final int hoursTohuHa = 5; // hours from original molad Tohu BeHaRaD\r\n // final int dayTohu = 1; // Monday (0 based)\r\n //\r\n // int monthsElapsed = (235 * ((year - 1) / 19)) // Months in complete 19 year lunar (Metonic) cycles so far\r\n // + (12 * ((year - 1) % 19)) // Regular months in this cycle\r\n // + ((7 * ((year - 1) % 19) + 1) / 19); // Leap months this cycle\r\n // // start with Molad Tohu BeHaRaD\r\n // // start with RaD of BeHaRaD and add TaShTzaG (793) chalakim plus elapsed chalakim\r\n // int partsElapsed = chalakimTohuRaD + chalakimTashTZag * (monthsElapsed % 1080);\r\n // // start with Ha hours of BeHaRaD, add 12 hour remainder of lunar month add hours elapsed\r\n // int hoursElapsed = hoursTohuHa + 12 * monthsElapsed + 793 * (monthsElapsed / 1080) + partsElapsed / 1080;\r\n // // start with Monday of BeHaRaD = 1 (0 based), add 29 days of the lunar months elapsed\r\n // int conjunctionDay = dayTohu + 29 * monthsElapsed + hoursElapsed / 24;\r\n // int conjunctionParts = 1080 * (hoursElapsed % 24) + partsElapsed % 1080;\r\n // return addDechiyos(year, conjunctionDay, conjunctionParts);\r\n // }\r\n\r\n /**\r\n * Adds the 4 dechiyos for molad Tishrei. These are:\r\n * Date
to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the date would fall prior to the January 1, 1 AD\r\n */\r\n /*\r\n public JewishDate(date: Date) {\r\n this.setDate(date);\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that initializes the date to the {@link java.util.Calendar Calendar} paremeter.\r\n *\r\n * @param calendar\r\n * the Calendar
to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC}\r\n */\r\n\r\n /*\r\n public JewishDate(calendar: GregorianCalendar) {\r\n this.setDate(calendar);\r\n }\r\n */\r\n\r\n /**\r\n * Sets the date based on a {@link java.util.Calendar Calendar} object. Modifies the Jewish date as well.\r\n *\r\n * @param date\r\n * the Calendar
to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC}\r\n */\r\n public setDate(date: Temporal.PlainDate): void {\r\n if (date.year < 1) {\r\n throw new IllegalArgumentException(`Dates with a BC era are not supported. The year ${date.year} is invalid.`);\r\n }\r\n\r\n this.date = date;\r\n }\r\n\r\n /**\r\n * Sets the date based on a {@link java.util.Date Date} object. Modifies the Jewish date as well.\r\n *\r\n * @param date\r\n * the Date
to set the calendar to\r\n * @throws IllegalArgumentException\r\n * if the date would fall prior to the year 1 AD\r\n */\r\n\r\n /*\r\n public setDate(date: Date): void {\r\n const cal: GregorianCalendar = new GregorianCalendar();\r\n cal.setTime(date);\r\n this.setDate(cal);\r\n }\r\n */\r\n\r\n /**\r\n * Sets the Gregorian Date, and updates the Jewish date accordingly. Like the Java Calendar A value of 0 is expected\r\n * for January.\r\n *\r\n * @param year\r\n * the Gregorian year\r\n * @param month\r\n * the Gregorian month. Like the Java Calendar, this class expects 0 for January\r\n * @param dayOfMonth\r\n * the Gregorian day of month. If this is > the number of days in the month/year, the last valid date of\r\n * the month will be set\r\n * @throws IllegalArgumentException\r\n * if a year of < 1, a month < 0 or > 11 or a day of month < 1 is passed in\r\n */\r\n public setGregorianDate(year: number, month: number, dayOfMonth: number): void {\r\n JewishDate.validateGregorianDate(year, month, dayOfMonth);\r\n this.setInternalGregorianDate(year, month + 1, dayOfMonth);\r\n }\r\n\r\n /**\r\n * Sets the hidden internal representation of the Gregorian date , and updates the Jewish date accordingly. While\r\n * public getters and setters have 0 based months matching the Java Calendar classes, This class internally\r\n * represents the Gregorian month starting at 1. When this is called it will not adjust the month to match the Java\r\n * Calendar classes.\r\n *\r\n * @param year - the year\r\n * @param month - the month\r\n * @param dayOfMonth - the day of month\r\n */\r\n private setInternalGregorianDate(year: number, month: number, dayOfMonth: number): void {\r\n // make sure date is a valid date for the given month, if not, set to last day of month\r\n if (dayOfMonth > JewishDate.getLastDayOfGregorianMonth(month, year)) {\r\n dayOfMonth = JewishDate.getLastDayOfGregorianMonth(month, year);\r\n }\r\n\r\n this.date = new Temporal.PlainDate(year, month, dayOfMonth);\r\n }\r\n\r\n /**\r\n * Sets the Jewish Date and updates the Gregorian date accordingly.\r\n *\r\n * @param year\r\n * the Jewish year. The year can't be negative\r\n * @param month\r\n * the Jewish month starting with Nisan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for\r\n * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar\r\n * II) to avoid any confusion.\r\n * @param dayOfMonth\r\n * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only\r\n * has 29 days, the day will be set as 29.\r\n * @throws IllegalArgumentException\r\n * if a A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a\r\n * leap year) or the day of month is < 1 or > 30 is passed in\r\n */\r\n\r\n /*\r\n public setJewishDate(year: number, month: number, dayOfMonth: number): void {\r\n this.setJewishDate(year, month, dayOfMonth, 0, 0, 0);\r\n }\r\n */\r\n\r\n /**\r\n * Sets the Jewish Date and updates the Gregorian date accordingly.\r\n *\r\n * @param year\r\n * the Jewish year. The year can't be negative\r\n * @param month\r\n * the Jewish month starting with Nisan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for\r\n * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar\r\n * II) to avoid any confusion.\r\n * @param dayOfMonth\r\n * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only\r\n * has 29 days, the day will be set as 29.\r\n *\r\n * @param hours\r\n * the hour of the day. Used for Molad calculations\r\n * @param minutes\r\n * the minutes. Used for Molad calculations\r\n * @param chalakim\r\n * the chalakim/parts. Used for Molad calculations. The chalakim should not exceed 17. Minutes should be\r\n * used for larger numbers.\r\n *\r\n * @throws IllegalArgumentException\r\n * if a A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a\r\n * leap year), the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 > 59 or chalakim < 0 >\r\n * 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the chalakim into minutes (18\r\n * chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG).\r\n */\r\n public setJewishDate(year: number, month: number, dayOfMonth: number, hours: number, minutes: number, chalakim: number): void;\r\n public setJewishDate(year: number, month: number, dayOfMonth: number): void;\r\n public setJewishDate(year: number, month: number, dayOfMonth: number, hours: number = 0, minutes: number = 0, chalakim: number = 0): void {\r\n JewishDate.validateJewishDate(year, month, dayOfMonth, hours, minutes, chalakim);\r\n\r\n // if 30 is passed for a month that only has 29 days (for example by rolling the month from a month that had 30\r\n // days to a month that only has 29) set the date to 29th\r\n if (dayOfMonth > JewishDate.getDaysInJewishMonth(month, year)) {\r\n dayOfMonth = JewishDate.getDaysInJewishMonth(month, year);\r\n }\r\n\r\n let fixedMonth = month - 6;\r\n if (fixedMonth < 1) {\r\n fixedMonth += Temporal.PlainDate.from({ year, month, day: dayOfMonth, calendar: \"hebrew\" }).monthsInYear;\r\n }\r\n\r\n this.date = Temporal.PlainDate.from({ year, month: fixedMonth, day: dayOfMonth, calendar: \"hebrew\" }).withCalendar(\"iso8601\")\r\n }\r\n\r\n /**\r\n * Returns this object's date as a {@link java.util.Calendar} object.\r\n *\r\n * @return The {@link java.util.Calendar}\r\n */\r\n public getDate(): Temporal.PlainDate {\r\n return this.date;\r\n }\r\n\r\n /**\r\n * Resets this date to the current system date.\r\n */\r\n public resetDate(): void {\r\n this.setDate(Temporal.Now.plainDateISO());\r\n }\r\n\r\n /**\r\n * Returns a string containing the Jewish date in the form, \"day Month, year\" e.g. \"21 Shevat, 5729\". For more\r\n * complex formatting, use the formatter classes.\r\n *\r\n * This functionality is duplicated from {@link HebrewDateFormatter} to avoid circular dependencies.\r\n *\r\n * @return the Jewish date in the form \"day Month, year\" e.g. \"21 Shevat, 5729\"\r\n * @see HebrewDateFormatter#format(JewishDate)\r\n */\r\n public toString(): string {\r\n const transliteratedMonths: string[] = ['Nissan', 'Iyar', 'Sivan', 'Tammuz', 'Av', 'Elul', 'Tishrei', 'Cheshvan',\r\n 'Kislev', 'Teves', 'Shevat', 'Adar', 'Adar II', 'Adar I'];\r\n\r\n let formattedMonth: string;\r\n if (this.isJewishLeapYear() && this.getJewishMonth() === JewishDate.ADAR) {\r\n formattedMonth = transliteratedMonths[13]; // return Adar I, not Adar in a leap year\r\n } else {\r\n formattedMonth = transliteratedMonths[this.getJewishMonth() - 1];\r\n }\r\n\r\n return `${this.getJewishDayOfMonth()} ${formattedMonth}, ${this.getJewishYear()}`;\r\n }\r\n\r\n /**\r\n * Rolls the date, month or year forward by the amount passed in. It modifies both the Gregorian and Jewish dates\r\n * accordingly. If manipulation beyond the fields supported here is required, use the {@link Calendar} class\r\n * {@link Calendar#add(int, int)} or {@link Calendar#roll(int, int)} methods in the following manner.\r\n *\r\n * \r\n * \r\n * Calendar cal = jewishDate.getTime(); // get a java.util.Calendar representation of the JewishDate\r\n * cal.add(Calendar.MONTH, 3); // add 3 Gregorian months\r\n * jewishDate.setDate(cal); // set the updated calendar back to this class\r\n *
\r\n *
\r\n *\r\n * @param field the calendar field to be forwarded. The must be {@link Calendar#DATE}, {@link Calendar#MONTH} or {@link Calendar#YEAR}\r\n * @param amount the positive amount to move forward\r\n * @throws IllegalArgumentException if the field is anything besides {@link Calendar#DATE}, {@link Calendar#MONTH}\r\n * or {@link Calendar#YEAR} or if the amount is less than 1\r\n *\r\n * @see #back()\r\n * @see Calendar#add(int, int)\r\n * @see Calendar#roll(int, int)\r\n */\r\n public forward(field: number, amount: number): void {\r\n if (![Calendar.DATE, Calendar.MONTH, Calendar.YEAR].includes(field)) {\r\n throw new IllegalArgumentException('Unsupported field was passed to Forward. Only Calendar.DATE, Calendar.MONTH or Calendar.YEAR are supported.');\r\n }\r\n if (amount < 1) {\r\n throw new IllegalArgumentException('JewishDate.forward() does not support amounts less than 1. See JewishDate.back()');\r\n }\r\n if (field === Calendar.DATE) {\r\n this.date = this.date.add({ days: amount })\r\n } else if (field === Calendar.MONTH) {\r\n this.date = this.date.add({ months: amount })\r\n } else if (field === Calendar.YEAR) {\r\n this.date = this.date.add({ years: amount })\r\n }\r\n }\r\n\r\n /**\r\n * Rolls the date back by 1 day. It modifies both the Gregorian and Jewish dates accordingly. The API does not\r\n * currently offer the ability to forward more than one day t a time, or to forward by month or year. If such\r\n * manipulation is required use the {@link Calendar} class {@link Calendar#add(int, int)} or\r\n * {@link Calendar#roll(int, int)} methods in the following manner.\r\n *\r\n * \r\n * \r\n * Calendar cal = jewishDate.getTime(); // get a java.util.Calendar representation of the JewishDate\r\n * cal.add(Calendar.MONTH, -3); // subtract 3 Gregorian months\r\n * jewishDate.setDate(cal); // set the updated calendar back to this class\r\n *
\r\n *
\r\n *\r\n * @see #back()\r\n * @see Calendar#add(int, int)\r\n * @see Calendar#roll(int, int)\r\n */\r\n public back(): void {\r\n this.date = this.date.subtract({ days: 1 })\r\n }\r\n\r\n /**\r\n * Indicates whether some other object is \"equal to\" this one.\r\n * @see Object#equals(Object)\r\n */\r\n public equals(object: JewishDate): boolean {\r\n return (object instanceof JewishDate && Temporal.PlainDate.compare(this.date, object.getDate()) == 0);\r\n }\r\n\r\n /**\r\n * Compares two dates as per the compareTo() method in the Comparable interface. Returns a value less than 0 if this\r\n * date is \"less than\" (before) the date, greater than 0 if this date is \"greater than\" (after) the date, or 0 if\r\n * they are equal.\r\n */\r\n public compareTo(jewishDate: JewishDate): number {\r\n return Temporal.PlainDate.compare(this.date, jewishDate.getDate());\r\n }\r\n\r\n /**\r\n * Returns the Gregorian month (between 0-11).\r\n *\r\n * @return the Gregorian month (between 0-11). Like the java.util.Calendar, months are 0 based.\r\n */\r\n public getGregorianMonth(): number {\r\n return this.date.withCalendar(\"iso8601\").month - 1;\r\n }\r\n\r\n /**\r\n * Returns the Gregorian day of the month.\r\n *\r\n * @return the Gregorian day of the mont\r\n */\r\n public getGregorianDayOfMonth(): number {\r\n return this.date.withCalendar(\"iso8601\").day;\r\n }\r\n\r\n /**\r\n * Returns the Gregotian year.\r\n *\r\n * @return the Gregorian year\r\n */\r\n public getGregorianYear(): number {\r\n return this.date.withCalendar(\"iso8601\").year;\r\n }\r\n\r\n /**\r\n * Returns the Jewish month 1-12 (or 13 years in a leap year). The month count starts with 1 for Nisan and goes to\r\n * 13 for Adar II\r\n *\r\n * @return the Jewish month from 1 to 12 (or 13 years in a leap year). The month count starts with 1 for Nisan and\r\n * goes to 13 for Adar II\r\n */\r\n public getJewishMonth(): number {\r\n let hebCal = this.date.withCalendar(\"hebrew\");\r\n\r\n let cutOffNum = 6;\r\n if (hebCal.monthsInYear == 13)\r\n ++cutOffNum;\r\n\r\n if (hebCal.month <= cutOffNum)\r\n return hebCal.month + 6;\r\n else\r\n return hebCal.month - cutOffNum;\r\n }\r\n\r\n /**\r\n * Returns the Jewish day of month.\r\n *\r\n * @return the Jewish day of the month\r\n */\r\n public getJewishDayOfMonth(): number {\r\n return this.date.withCalendar(\"hebrew\").day;\r\n }\r\n\r\n /**\r\n * Returns the Jewish year.\r\n *\r\n * @return the Jewish year\r\n */\r\n public getJewishYear(): number {\r\n return this.date.withCalendar(\"hebrew\").year;\r\n }\r\n\r\n /**\r\n * Returns the day of the week as a number between 1-7.\r\n *\r\n * @return the day of the week as a number between 1-7.\r\n */\r\n public getDayOfWeek(): number {\r\n let dayOfWeek = this.date.dayOfWeek + 1;\r\n if (dayOfWeek == 8)\r\n dayOfWeek = 1\r\n return dayOfWeek;\r\n }\r\n\r\n /**\r\n * Sets the Gregorian month.\r\n *\r\n * @param month\r\n * the Gregorian month\r\n *\r\n * @throws IllegalArgumentException\r\n * if a month < 0 or > 11 is passed in\r\n */\r\n public setGregorianMonth(month: number): void {\r\n JewishDate.validateGregorianMonth(month);\r\n this.date = this.date.withCalendar(\"iso8601\").with({ month: month + 1 })\r\n }\r\n\r\n /**\r\n * sets the Gregorian year.\r\n *\r\n * @param year\r\n * the Gregorian year.\r\n * @throws IllegalArgumentException\r\n * if a year of < 1 is passed in\r\n */\r\n public setGregorianYear(year: number): void {\r\n JewishDate.validateGregorianYear(year);\r\n this.date = this.date.withCalendar(\"iso8601\").with({ year })\r\n }\r\n\r\n /**\r\n * sets the Gregorian Day of month.\r\n *\r\n * @param dayOfMonth\r\n * the Gregorian Day of month.\r\n * @throws IllegalArgumentException\r\n * if the day of month of < 1 is passed in\r\n */\r\n public setGregorianDayOfMonth(dayOfMonth: number): void {\r\n JewishDate.validateGregorianDayOfMonth(dayOfMonth);\r\n this.date = this.date.withCalendar(\"iso8601\").with({ day: dayOfMonth })\r\n }\r\n\r\n /**\r\n * sets the Jewish month.\r\n *\r\n * @param month\r\n * the Jewish month from 1 to 12 (or 13 years in a leap year). The month count starts with 1 for Nisan\r\n * and goes to 13 for Adar II\r\n * @throws IllegalArgumentException\r\n * if a month < 1 or > 12 (or 13 on a leap year) is passed in\r\n */\r\n public setJewishMonth(month: number): void {\r\n const hebrewCalendar = this.date.withCalendar(\"hebrew\")\r\n this.setJewishDate(hebrewCalendar.year, month, hebrewCalendar.day);\r\n }\r\n\r\n /**\r\n * sets the Jewish year.\r\n *\r\n * @param year\r\n * the Jewish year\r\n * @throws IllegalArgumentException\r\n * if a year of < 3761 is passed in. The same will happen if the year is 3761 and the month and day\r\n * previously set are < 18 Teves (preior to Jan 1, 1 AD)\r\n */\r\n public setJewishYear(year: number): void {\r\n const hebrewCalendar = this.date.withCalendar(\"hebrew\")\r\n this.setJewishDate(year, this.getJewishMonth(), hebrewCalendar.day);\r\n\r\n this.date = this.date.withCalendar(\"hebrew\").with({ year }).withCalendar(\"iso8601\");\r\n }\r\n\r\n /**\r\n * sets the Jewish day of month.\r\n *\r\n * @param dayOfMonth\r\n * the Jewish day of month\r\n * @throws IllegalArgumentException\r\n * if the day of month is < 1 or > 30 is passed in\r\n */\r\n public setJewishDayOfMonth(dayOfMonth: number): void {\r\n this.date = this.date.withCalendar(\"hebrew\").with({ day: dayOfMonth }).withCalendar(\"iso8601\");\r\n }\r\n\r\n /**\r\n * A method that creates a deep copy of the object.\r\n *\r\n * @see Object#clone()\r\n */\r\n public clone(): JewishDate {\r\n const clone: JewishDate = new JewishDate(this.date);\r\n clone.setMoladHours(this.moladHours);\r\n clone.setMoladMinutes(this.moladMinutes);\r\n clone.setMoladChalakim(this.moladChalakim);\r\n\r\n return clone;\r\n }\r\n}\r\n\r\nexport function rangeDates(start: Temporal.PlainDate, middle:Temporal.PlainDate, end: Temporal.PlainDate, inclusive=true) {\r\n const acceptedValues = [1];\r\n if (inclusive)\r\n acceptedValues.push(0);\r\n\r\n return acceptedValues.includes(Temporal.PlainDate.compare(middle, start)) && acceptedValues.includes(Temporal.PlainDate.compare(end, middle))\r\n};", "/**\r\n * An Object representing a daf (page) in the Daf Yomi cycle.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport abstract class Daf {\r\n /**\r\n * {@link #getMasechtaNumber()} and {@link #setMasechtaNumber(int)}.\r\n */\r\n private masechtaNumber: number;\r\n\r\n /**\r\n * See {@link #getDaf()} and {@link #setDaf(int)}.\r\n */\r\n private daf: number;\r\n\r\n /**\r\n * Gets the masechta number of the currently set Daf.\r\n * @return the masechtaNumber\r\n * @see #setMasechtaNumber(int)\r\n */\r\n public getMasechtaNumber(): number {\r\n return this.masechtaNumber;\r\n }\r\n\r\n /**\r\n * Set the masechta number in the order of the Daf Yomi.\r\n *\r\n * @param masechtaNumber\r\n * the masechta number in the order of the Daf Yomi to set.\r\n */\r\n public setMasechtaNumber(masechtaNumber: number): void {\r\n this.masechtaNumber = masechtaNumber;\r\n }\r\n\r\n /**\r\n * Constructor that creates a Daf setting the {@link #setMasechtaNumber(int) masechta number} and\r\n\t * {@link #setDaf(int) daf number}.\r\n\t * \r\n\t * @param masechtaNumber the masechta number in the order of the Daf Yomi to set as the current masechta.\r\n\t * @param daf the daf (page) number to set.\r\n */\r\n constructor(masechtaNumber: number, daf: number) {\r\n this.masechtaNumber = masechtaNumber;\r\n this.daf = daf;\r\n }\r\n\r\n /**\r\n * Returns the daf (page) number of the Daf Yomi.\r\n\t * @return the daf (page) number of the Daf Yomi.\r\n */\r\n public getDaf(): number {\r\n return this.daf;\r\n }\r\n\r\n /**\r\n * Sets the daf (page) number of the Daf Yomi.\r\n\t * @param daf the daf (page) number.\r\n */\r\n public setDaf(daf: number): void {\r\n this.daf = daf;\r\n }\r\n\r\n /**\r\n * Returns the transliterated name of the masechta (tractate) of the Daf Yomi.\r\n\t * \r\n\t * @return the transliterated name of the masechta (tractate) of the Daf Yomi such as Berachos.\r\n * @see #setMasechtaTransliterated(String[])\r\n */\r\n public abstract getMasechtaTransliterated(): string;\r\n\r\n /**\r\n * Returns the masechta (tractate) of the Daf Yomi in Hebrew.\r\n *\r\n * @return the masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n */\r\n public abstract getMasechta(): string;\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar } from '../../polyfills/Utils.ts';\r\nimport { Daf } from './Daf.ts';\r\nimport { IllegalArgumentException } from '../../polyfills/errors.ts';\r\nimport { JewishDate } from '../JewishDate.ts';\r\n\r\n/**\r\n * This class calculates the Daf Yomi Bavli page (daf) for a given date. To calculate Daf Yomi Yerushalmi\r\n * use the {@link YerushalmiYomiCalculator}. The library may cover Mishna Yomi etc. at some point in the future.\r\n *\r\n * @author © Bob Newell (original C code)\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n * @version 0.0.1\r\n */\r\nexport class YomiCalculator {\r\n /**\r\n * The start date of the first Daf Yomi Bavli cycle of September 11, 1923 / Rosh Hashana 5684.\r\n */\r\n private static readonly dafYomiStartDate: Temporal.PlainDate = Temporal.PlainDate.from({\r\n year: 1923,\r\n month: Calendar.SEPTEMBER + 1,\r\n day: 11,\r\n });\r\n\r\n /** The start date of the first Daf Yomi Bavli cycle in the Julian calendar. Used internally for claculations. */\r\n private static readonly dafYomiJulianStartDay: number = YomiCalculator.getJulianDay(YomiCalculator.dafYomiStartDate);\r\n\r\n /**\r\n * The date that the pagination for the Daf Yomi Maseches Shekalim changed to use the commonly used Vilna\r\n * Shas pagination from the no longer commonly available Zhitomir / Slavuta Shas used by Rabbi Meir Shapiro.\r\n */\r\n private static readonly shekalimChangeDate: Temporal.PlainDate = Temporal.PlainDate.from({ year: 1975, month: Calendar.JUNE + 1, day: 24 });\r\n\r\n /** The Julian date that the cycle for Shekalim changed.\r\n * @see #getDafYomiBavli(JewishCalendar) for details.\r\n */\r\n private static readonly shekalimJulianChangeDay: number = YomiCalculator.getJulianDay(YomiCalculator.shekalimChangeDate);\r\n\r\n /**\r\n * Returns the Daf Yomi Bavli {@link DafBavliYomi} for a given date. The first Daf Yomi cycle\r\n * started on Rosh Hashana 5684 (September 11, 1923) and calculations prior to this date will result in an\r\n * IllegalArgumentException thrown. For historical calculations (supported by this method), it is important to note\r\n * that a change in length of the cycle was instituted starting in the eighth Daf Yomi cycle beginning on June 24,\r\n * 1975. The Daf Yomi Bavli cycle has a single masechta of the Talmud Yerushalmi - Shekalim as part of the cycle.\r\n * Unlike the Bavli where the number of daf per masechta was standardized since the original Bomberg Edition published from 1520 - 1523, there is no\r\n * uniform page length in the Yerushalmi. The early cycles had the Yerushalmi Shekalim length of 13 days following the\r\n * Slavuta/Zhytomyr\r\n * Shas used by Rabbi Meir Shapiro. With the start of the eighth Daf Yomi\r\n * cycle beginning on June 24, 1975 the length of the Yerushalmi Shekalim was changed from 13 to 22 daf to follow\r\n * the Vilna Shas that is in common use today.\r\n *\r\n * @param calendar\r\n * the calendar date for calculation\r\n * @return the {@link DafBavliYomi}.\r\n *\r\n * @throws IllegalArgumentException\r\n * if the date is prior to the September 11, 1923 start date of the first Daf Yomi cycle\r\n */\r\n public static getDafYomiBavli(calendar: JewishDate): DafBavliYomi {\r\n /*\r\n * The number of daf per masechta. Since the number of blatt in Shekalim changed on the 8th Daf Yomi cycle\r\n * beginning on June 24, 1975 from 13 to 22, the actual calculation for blattPerMasechta[4] will later be\r\n * adjusted based on the cycle.\r\n */\r\n const blattPerMasechta: number[] = [64, 157, 105, 121, 22, 88, 56, 40, 35, 31, 32, 29, 27, 122, 112, 91, 66, 49, 90, 82,\r\n 119, 119, 176, 113, 24, 49, 76, 14, 120, 110, 142, 61, 34, 34, 28, 22, 4, 9, 5, 73];\r\n\r\n const date: Temporal.PlainDate = calendar.getDate();\r\n\r\n let dafYomi: DafBavliYomi;\r\n const julianDay: number = this.getJulianDay(date);\r\n let cycleNo: number = 0;\r\n let dafNo: number = 0;\r\n if (Temporal.PlainDate.compare(date,YomiCalculator.dafYomiStartDate) == -1) {\r\n // TODO: should we return a null or throw an IllegalArgumentException?\r\n throw new IllegalArgumentException(`${calendar} is prior to organized Daf Yomi Bavli cycles that started on ${YomiCalculator.dafYomiStartDate}`);\r\n }\r\n if (Temporal.PlainDate.compare(date, YomiCalculator.shekalimChangeDate) == 1) {\r\n cycleNo = 8 + ((julianDay - YomiCalculator.shekalimJulianChangeDay) / 2711);\r\n dafNo = ((julianDay - YomiCalculator.shekalimJulianChangeDay) % 2711);\r\n } else {\r\n cycleNo = 1 + ((julianDay - YomiCalculator.dafYomiJulianStartDay) / 2702);\r\n dafNo = ((julianDay - YomiCalculator.dafYomiJulianStartDay) % 2702);\r\n }\r\n\r\n let total: number = 0;\r\n let masechta: number = -1;\r\n let blatt: number = 0;\r\n\r\n /* Fix Shekalim for old cycles. */\r\n if (cycleNo <= 7) {\r\n blattPerMasechta[4] = 13;\r\n } else {\r\n blattPerMasechta[4] = 22; // correct any change that may have been changed from a prior calculation\r\n }\r\n /* Finally find the daf. */\r\n // eslint-disable-next-line no-restricted-syntax\r\n for (const blattInMasechta of blattPerMasechta) {\r\n masechta++;\r\n total = total + blattInMasechta - 1;\r\n if (dafNo < total) {\r\n blatt = 1 + blattInMasechta - (total - dafNo);\r\n /* Fiddle with the weird ones near the end. */\r\n if (masechta === 36) {\r\n blatt += 21;\r\n } else if (masechta === 37) {\r\n blatt += 24;\r\n } else if (masechta === 38) {\r\n blatt += 32;\r\n }\r\n dafYomi = new DafBavliYomi(masechta, blatt);\r\n break;\r\n }\r\n }\r\n\r\n return dafYomi!;\r\n }\r\n\r\n /**\r\n * Return the Julian day from a Java Date.\r\n *\r\n * @param date\r\n * The Java Date\r\n * @return the Julian day number corresponding to the date\r\n */\r\n private static getJulianDay(date: Temporal.PlainDate): number {\r\n let { year, month } = date;\r\n const { day } = date;\r\n\r\n if (month <= 2) {\r\n year -= 1;\r\n month += 12;\r\n }\r\n\r\n const a: number = Math.trunc(year / 100);\r\n const b: number = 2 - a + Math.trunc(a / 4);\r\n return Math.trunc(Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + b - 1524.5);\r\n }\r\n}\r\n\r\n/**\r\n * An Object representing a daf (page) in the Daf Yomi cycle.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport class DafBavliYomi extends Daf {\r\n /**\r\n * See {@link #getMasechtaTransliterated()} and {@link #setMasechtaTransliterated(String[])}.\r\n */\r\n private static masechtosBavliTransliterated: string[] = ['Berachos', 'Shabbos', 'Eruvin', 'Pesachim', 'Shekalim',\r\n 'Yoma', 'Sukkah', 'Beitzah', 'Rosh Hashana', 'Taanis', 'Megillah', 'Moed Katan', 'Chagigah', 'Yevamos',\r\n 'Kesubos', 'Nedarim', 'Nazir', 'Sotah', 'Gitin', 'Kiddushin', 'Bava Kamma', 'Bava Metzia', 'Bava Basra',\r\n 'Sanhedrin', 'Makkos', 'Shevuos', 'Avodah Zarah', 'Horiyos', 'Zevachim', 'Menachos', 'Chullin', 'Bechoros',\r\n 'Arachin', 'Temurah', 'Kerisos', 'Meilah', 'Kinnim', 'Tamid', 'Midos', 'Niddah'];\r\n\r\n /**\r\n * See {@link #getMasechta()}.\r\n */\r\n private static readonly masechtosBavli: string[] = ['\\u05D1\\u05E8\\u05DB\\u05D5\\u05EA', '\\u05E9\\u05D1\\u05EA',\r\n '\\u05E2\\u05D9\\u05E8\\u05D5\\u05D1\\u05D9\\u05DF', '\\u05E4\\u05E1\\u05D7\\u05D9\\u05DD',\r\n '\\u05E9\\u05E7\\u05DC\\u05D9\\u05DD', '\\u05D9\\u05D5\\u05DE\\u05D0', '\\u05E1\\u05D5\\u05DB\\u05D4',\r\n '\\u05D1\\u05D9\\u05E6\\u05D4', '\\u05E8\\u05D0\\u05E9 \\u05D4\\u05E9\\u05E0\\u05D4',\r\n '\\u05EA\\u05E2\\u05E0\\u05D9\\u05EA', '\\u05DE\\u05D2\\u05D9\\u05DC\\u05D4',\r\n '\\u05DE\\u05D5\\u05E2\\u05D3 \\u05E7\\u05D8\\u05DF', '\\u05D7\\u05D2\\u05D9\\u05D2\\u05D4',\r\n '\\u05D9\\u05D1\\u05DE\\u05D5\\u05EA', '\\u05DB\\u05EA\\u05D5\\u05D1\\u05D5\\u05EA', '\\u05E0\\u05D3\\u05E8\\u05D9\\u05DD',\r\n '\\u05E0\\u05D6\\u05D9\\u05E8', '\\u05E1\\u05D5\\u05D8\\u05D4', '\\u05D2\\u05D9\\u05D8\\u05D9\\u05DF',\r\n '\\u05E7\\u05D9\\u05D3\\u05D5\\u05E9\\u05D9\\u05DF', '\\u05D1\\u05D1\\u05D0 \\u05E7\\u05DE\\u05D0',\r\n '\\u05D1\\u05D1\\u05D0 \\u05DE\\u05E6\\u05D9\\u05E2\\u05D0', '\\u05D1\\u05D1\\u05D0 \\u05D1\\u05EA\\u05E8\\u05D0',\r\n '\\u05E1\\u05E0\\u05D4\\u05D3\\u05E8\\u05D9\\u05DF', '\\u05DE\\u05DB\\u05D5\\u05EA',\r\n '\\u05E9\\u05D1\\u05D5\\u05E2\\u05D5\\u05EA', '\\u05E2\\u05D1\\u05D5\\u05D3\\u05D4 \\u05D6\\u05E8\\u05D4',\r\n '\\u05D4\\u05D5\\u05E8\\u05D9\\u05D5\\u05EA', '\\u05D6\\u05D1\\u05D7\\u05D9\\u05DD', '\\u05DE\\u05E0\\u05D7\\u05D5\\u05EA',\r\n '\\u05D7\\u05D5\\u05DC\\u05D9\\u05DF', '\\u05D1\\u05DB\\u05D5\\u05E8\\u05D5\\u05EA', '\\u05E2\\u05E8\\u05DB\\u05D9\\u05DF',\r\n '\\u05EA\\u05DE\\u05D5\\u05E8\\u05D4', '\\u05DB\\u05E8\\u05D9\\u05EA\\u05D5\\u05EA', '\\u05DE\\u05E2\\u05D9\\u05DC\\u05D4',\r\n '\\u05E7\\u05D9\\u05E0\\u05D9\\u05DD', '\\u05EA\\u05DE\\u05D9\\u05D3', '\\u05DE\\u05D9\\u05D3\\u05D5\\u05EA',\r\n '\\u05E0\\u05D3\\u05D4'];\r\n\r\n /**\r\n * Returns the transliterated name of the masechta (tractate) of the Daf Yomi. The list of mashechtos\r\n\t * is: Berachos, Shabbos, Eruvin, Pesachim, Shekalim, Yoma, Sukkah, Beitzah, Rosh Hashana, Taanis, Megillah, Moed Katan,\r\n\t * Chagigah, Yevamos, Kesubos, Nedarim, Nazir, Sotah, Gitin, Kiddushin, Bava Kamma, Bava Metzia, Bava Basra, Sanhedrin,\r\n\t * Makkos, Shevuos, Avodah Zarah, Horiyos, Zevachim, Menachos, Chullin, Bechoros, Arachin, Temurah, Kerisos, Meilah,\r\n\t * Kinnim, Tamid, Midos and Niddah.\r\n\t * \r\n\t * @return the transliterated name of the masechta (tractate) of the Daf Yomi such as Berachos.\r\n * @see #setMasechtaTransliterated(String[])\r\n */\r\n public getMasechtaTransliterated(): string {\r\n return DafBavliYomi.masechtosBavliTransliterated[this.getMasechtaNumber()];\r\n }\r\n\r\n /**\r\n * Setter method to allow overriding of the default list of masechtos transliterated into into Latin chars.\r\n\t * The default values use Ashkenazi American English transliteration.\r\n\t * \r\n\t * @param masechtosBavliTransliterated the list of transliterated Bavli masechtos to set.\r\n * @see #getMasechtaTransliterated()\r\n */\r\n public static setMasechtaTransliterated(masechtosBavliTransliterated: string[]): void {\r\n DafBavliYomi.masechtosBavliTransliterated = masechtosBavliTransliterated;\r\n }\r\n\r\n /**\r\n * Returns the masechta (tractate) of the Daf Yomi in Hebrew. The list is in the following format[\"ברכות\",\r\n * \"שבת\", \"עירובין\",\r\n * \"פסחים\", \"שקלים\", \"יומא\",\r\n * \"סוכה\", \"ביצה\", \"ראש השנה\",\r\n * \"תענית\", \"מגילה\", \"מועד\r\n * קטן\", \"חגיגה\", \"יבמות\",\r\n * \"כתובות\", \"נדרים\",\"נזיר\",\r\n * \"סוטה\", \"גיטין\", \"קידושין\",\r\n * \"בבא קמא\", \"בבא מציעא\",\r\n * \"בבא בתרא\", \"סנהדרין\",\r\n * \"מכות\", \"שבועות\", \"עבודה\r\n * זרה\", \"הוריות\", \"זבחים\",\r\n * \"מנחות\", \"חולין\", \"בכורות\",\r\n * \"ערכין\", \"תמורה\", \"כריתות\",\r\n * \"מעילה\", \"קינים\", \"תמיד\",\r\n * \"מידות\", \"נדה\"]
.\r\n *\r\n * @return the masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n */\r\n public getMasechta(): string {\r\n return DafBavliYomi.masechtosBavli[this.getMasechtaNumber()];\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar } from '../../polyfills/Utils.ts';\r\nimport { Daf } from './Daf.ts';\r\nimport { IllegalArgumentException } from '../../polyfills/errors.ts';\r\nimport { JewishDate, rangeDates } from '../JewishDate.ts';\r\n\r\n/**\r\n * This class calculates the Talmud Yerusalmi Daf Yomi page ({@link DafYomiYerushalmi}) for the a given date.\r\n *\r\n * @author © elihaidv\r\n * @author © Eliyahu Hershfeld 2017 - 2019\r\n */\r\nexport class YerushalmiYomiCalculator {\r\n /**\r\n * The start date of the first Daf Yomi Yerushalmi cycle of February 2, 1980 / 15 Shevat, 5740.\r\n */\r\n private static readonly DAF_YOMI_START_DAY: Temporal.PlainDate = Temporal.PlainDate.from({\r\n year: 1980,\r\n month: Calendar.FEBRUARY + 1,\r\n day: 2,\r\n });\r\n\r\n /** The number of pages in the Talmud Yerushalmi. */\r\n private static readonly WHOLE_SHAS_DAFS: number = 1554;\r\n\r\n /** The number of pages per masechta (tractate). */\r\n private static readonly BLATT_PER_MASECHTA: number[] = [68, 37, 34, 44, 31, 59, 26, 33, 28, 20, 13, 92, 65, 71, 22,\r\n 22, 42, 26, 26, 33, 34, 22, 19, 85, 72, 47, 40, 47, 54, 48, 44, 37, 34, 44, 9, 57, 37, 19, 13];\r\n\r\n /**\r\n * Returns the Daf Yomi\r\n * Yerusalmi page ({@link DafYomiYerushalmi}) for a given date.\r\n * The first Daf Yomi cycle started on 15 Shevat (Tu Bishvat) 5740 (February, 2, 1980) and calculations\r\n * prior to this date will result in an IllegalArgumentException thrown. A null will be returned on Tisha B'Av or\r\n * Yom Kippur.\r\n *\r\n * @param jewishCalendar\r\n * the calendar date for calculation\r\n * @return the {@link DafYomiYerushalmi} or null if the date is on Tisha B'Av or Yom Kippur.\r\n *\r\n * @throws IllegalArgumentException\r\n * if the date is prior to the February 2, 1980, the start date of the first Daf Yomi Yerushalmi cycle\r\n */\r\n public static getDafYomiYerushalmi(jewishCalendar: JewishDate) {\r\n let nextCycle: Temporal.PlainDate = YerushalmiYomiCalculator.DAF_YOMI_START_DAY;\r\n let prevCycle: Temporal.PlainDate = YerushalmiYomiCalculator.DAF_YOMI_START_DAY;\r\n const requested: Temporal.PlainDate = jewishCalendar.getDate();\r\n let masechta: number = 0;\r\n let dafYomi: DafYomiYerushalmi;\r\n\r\n const hebrewDate = jewishCalendar.getDate().withCalendar(\"hebrew\");\r\n if (hebrewDate.month == 1 && hebrewDate.day == 10) {\r\n return null;\r\n }\r\n\r\n if (jewishCalendar.getJewishMonth() == JewishDate.AV) {\r\n if ((hebrewDate.day == 9 && hebrewDate.dayOfWeek !== 6) || (hebrewDate.day == 10 && hebrewDate.dayOfWeek == 7))\r\n return null;\r\n }\r\n\r\n if (Temporal.PlainDate.compare(requested, YerushalmiYomiCalculator.DAF_YOMI_START_DAY) == -1) {\r\n throw new IllegalArgumentException(`${requested} is prior to organized Daf Yomi Yerushalmi cycles that started on ${YerushalmiYomiCalculator.DAF_YOMI_START_DAY}`);\r\n }\r\n\r\n // Start to calculate current cycle. Initialize the start day\r\n // nextCycle = YerushalmiYomiCalculator.DAF_YOMI_START_DAY;\r\n\r\n // Go cycle by cycle, until we get the next cycle\r\n while (Temporal.PlainDate.compare(nextCycle, requested) == -1) {\r\n prevCycle = nextCycle;\r\n\r\n // Adds the number of whole shas dafs, and then the number of days that not have daf.\r\n nextCycle = nextCycle.add({ days: YerushalmiYomiCalculator.WHOLE_SHAS_DAFS });\r\n // This needs to be a separate step\r\n nextCycle = nextCycle.add({ days: YerushalmiYomiCalculator.getNumOfSpecialDays(prevCycle, nextCycle) });\r\n }\r\n\r\n // Get the number of days from cycle start until request.\r\n const dafNo: number = requested.since(prevCycle).total({ unit: 'days' });\r\n\r\n // Get the number of special days to subtract\r\n const specialDays: number = YerushalmiYomiCalculator.getNumOfSpecialDays(prevCycle, requested);\r\n let total: number = dafNo - specialDays;\r\n\r\n // Finally find the daf.\r\n for (let i: number = 0; i < YerushalmiYomiCalculator.BLATT_PER_MASECHTA.length; i++) {\r\n if (total <= YerushalmiYomiCalculator.BLATT_PER_MASECHTA[i]) {\r\n dafYomi = new DafYomiYerushalmi(masechta, total + 1);\r\n break;\r\n }\r\n total -= YerushalmiYomiCalculator.BLATT_PER_MASECHTA[i];\r\n masechta++;\r\n }\r\n\r\n return dafYomi!;\r\n }\r\n\r\n /**\r\n * Return the number of special days (Yom Kippur and Tisha B'Av) on which there is no daf, between the two given dates\r\n *\r\n * @param start - start date to calculate\r\n * @param end - end date to calculate\r\n * @return the number of special days\r\n */\r\n private static getNumOfSpecialDays(start: Temporal.PlainDate, end: Temporal.PlainDate): number {\r\n // Find the start and end Jewish years\r\n const jewishStartYear: number = new JewishDate(start).getJewishYear();\r\n const jewishEndYear: number = new JewishDate(end).getJewishYear();\r\n\r\n // Value to return\r\n let specialDays: number = 0;\r\n\r\n // Instant of special dates\r\n const yomKippur: JewishDate = new JewishDate(jewishStartYear, 7, 10);\r\n const tishaBeav: JewishDate = new JewishDate(jewishStartYear, 5, 9);\r\n\r\n // Go over the years and find special dates\r\n for (let i: number = jewishStartYear; i <= jewishEndYear; i++) {\r\n yomKippur.setJewishYear(i);\r\n tishaBeav.setJewishYear(i);\r\n\r\n if (rangeDates(start, yomKippur.getDate(), end)) specialDays++;\r\n if (rangeDates(start, tishaBeav.getDate(), end)) specialDays++;\r\n }\r\n\r\n return specialDays;\r\n }\r\n}\r\n\r\n/**\r\n * An Object representing a daf (page) in the Daf Yomi cycle.\r\n *\r\n * @author © Eliyahu Hershfeld 2011 - 2019\r\n */\r\nexport class DafYomiYerushalmi extends Daf {\r\n /**\r\n * See {@link #getYerushalmiMasechtaTransliterated()}.\r\n */\r\n private static masechtosYerushalmiTransliterated: string[] = ['Berachos', \"Pe'ah\", 'Demai', 'Kilayim', \"Shevi'is\",\r\n 'Terumos', \"Ma'asros\", \"Ma'aser Sheni\", 'Chalah', 'Orlah', 'Bikurim', 'Shabbos', 'Eruvin', 'Pesachim',\r\n 'Beitzah', 'Rosh Hashanah', 'Yoma', 'Sukah', \"Ta'anis\", 'Shekalim', 'Megilah', 'Chagigah', 'Moed Katan',\r\n 'Yevamos', 'Kesuvos', 'Sotah', 'Nedarim', 'Nazir', 'Gitin', 'Kidushin', 'Bava Kama', 'Bava Metzia',\r\n 'Bava Basra', 'Sanhedrin', 'Makos', 'Shevuos', 'Avodah Zarah', 'Horayos', 'Nidah', 'No Daf Today' ];\r\n\r\n /**\r\n * See {@link #getYerushalmiMasechta()}.\r\n */\r\n private static readonly masechtosYerushalmi: string[] = ['\\u05d1\\u05e8\\u05db\\u05d5\\u05ea', '\\u05e4\\u05d9\\u05d0\\u05d4',\r\n '\\u05d3\\u05de\\u05d0\\u05d9', '\\u05db\\u05dc\\u05d0\\u05d9\\u05d9\\u05dd', '\\u05e9\\u05d1\\u05d9\\u05e2\\u05d9\\u05ea',\r\n '\\u05ea\\u05e8\\u05d5\\u05de\\u05d5\\u05ea', '\\u05de\\u05e2\\u05e9\\u05e8\\u05d5\\u05ea', '\\u05de\\u05e2\\u05e9\\u05e8 \\u05e9\\u05e0\\u05d9',\r\n '\\u05d7\\u05dc\\u05d4', '\\u05e2\\u05d5\\u05e8\\u05dc\\u05d4', '\\u05d1\\u05d9\\u05db\\u05d5\\u05e8\\u05d9\\u05dd',\r\n '\\u05e9\\u05d1\\u05ea', '\\u05e2\\u05d9\\u05e8\\u05d5\\u05d1\\u05d9\\u05df', '\\u05e4\\u05e1\\u05d7\\u05d9\\u05dd',\r\n '\\u05d1\\u05d9\\u05e6\\u05d4', '\\u05e8\\u05d0\\u05e9 \\u05d4\\u05e9\\u05e0\\u05d4', '\\u05d9\\u05d5\\u05de\\u05d0',\r\n '\\u05e1\\u05d5\\u05db\\u05d4', '\\u05ea\\u05e2\\u05e0\\u05d9\\u05ea', '\\u05e9\\u05e7\\u05dc\\u05d9\\u05dd', '\\u05de\\u05d2\\u05d9\\u05dc\\u05d4',\r\n '\\u05d7\\u05d2\\u05d9\\u05d2\\u05d4', '\\u05de\\u05d5\\u05e2\\u05d3 \\u05e7\\u05d8\\u05df', '\\u05d9\\u05d1\\u05de\\u05d5\\u05ea',\r\n '\\u05db\\u05ea\\u05d5\\u05d1\\u05d5\\u05ea', '\\u05e1\\u05d5\\u05d8\\u05d4', '\\u05e0\\u05d3\\u05e8\\u05d9\\u05dd', '\\u05e0\\u05d6\\u05d9\\u05e8',\r\n '\\u05d2\\u05d9\\u05d8\\u05d9\\u05df', '\\u05e7\\u05d9\\u05d3\\u05d5\\u05e9\\u05d9\\u05df', '\\u05d1\\u05d1\\u05d0 \\u05e7\\u05de\\u05d0',\r\n '\\u05d1\\u05d1\\u05d0 \\u05de\\u05e6\\u05d9\\u05e2\\u05d0', '\\u05d1\\u05d1\\u05d0 \\u05d1\\u05ea\\u05e8\\u05d0',\r\n '\\u05e9\\u05d1\\u05d5\\u05e2\\u05d5\\u05ea', '\\u05de\\u05db\\u05d5\\u05ea', '\\u05e1\\u05e0\\u05d4\\u05d3\\u05e8\\u05d9\\u05df',\r\n '\\u05e2\\u05d1\\u05d5\\u05d3\\u05d4 \\u05d6\\u05e8\\u05d4', '\\u05d4\\u05d5\\u05e8\\u05d9\\u05d5\\u05ea', '\\u05e0\\u05d9\\u05d3\\u05d4',\r\n '\\u05d0\\u05d9\\u05df \\u05d3\\u05e3 \\u05d4\\u05d9\\u05d5\\u05dd'];\r\n\r\n /**\r\n * Returns the transliterated name of the masechta (tractate) of the Daf Yomi in Yerushalmi. The list of\r\n\t * mashechtos is:\r\n\t * Berachos, Pe'ah, Demai, Kilayim, Shevi'is, Terumos, Ma'asros, Ma'aser Sheni, Chalah, Orlah, Bikurim, \r\n\t * Shabbos, Eruvin, Pesachim, Beitzah, Rosh Hashanah, Yoma, Sukah, Ta'anis, Shekalim, Megilah, Chagigah, \r\n\t * Moed Katan, Yevamos, Kesuvos, Sotah, Nedarim, Nazir, Gitin, Kidushin, Bava Kama, Bava Metzia,\r\n\t * Bava Basra, Shevuos, Makos, Sanhedrin, Avodah Zarah, Horayos, Nidah and No Daf Today.\r\n\t * \r\n\t * @return the transliterated name of the masechta (tractate) of the Daf Yomi such as Berachos.\r\n */\r\n public getMasechtaTransliterated(): string {\r\n return DafYomiYerushalmi.masechtosYerushalmiTransliterated[super.getMasechtaNumber()];\r\n }\r\n\r\n /**\r\n * Setter method to allow overriding of the default list of Yerushalmi masechtos transliterated into into Latin chars.\r\n\t * The default uses Ashkenazi American English transliteration.\r\n\t * \r\n\t * @param masechtosYerushalmiTransliterated the list of transliterated Yerushalmi masechtos to set.\r\n */\r\n public static setMasechtaTransliterated(masechtosYerushalmiTransliterated: string[]): void {\r\n DafYomiYerushalmi.masechtosYerushalmiTransliterated = masechtosYerushalmiTransliterated;\r\n }\r\n\r\n /**\r\n\t * Getter method to allow retrieving the list of Yerushalmi masechtos transliterated into into Latin chars.\r\n\t * The default uses Ashkenazi American English transliteration.\r\n\t * \r\n\t * @return the array of transliterated masechta (tractate) names of the Daf Yomi Yerushalmi.\r\n\t */\r\n public static getMasechtosTransliterated(): string[] {\r\n return this.masechtosYerushalmiTransliterated;\r\n }\r\n\r\n /**\r\n\t * Getter method to allow retrieving the list of Yerushalmi masechtos.\r\n\t * \r\n\t * @return the array of Hebrew masechta (tractate) names of the Daf Yomi Yerushalmi.\r\n\t */\r\n public static getMasechtos():string[] {\r\n return this.masechtosYerushalmi;\r\n }\r\n\r\n /**\r\n * Returns the Yerushalmi masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n\t * \r\n\t * @return the Yerushalmi masechta (tractate) of the Daf Yomi in Hebrew. As an example, it will return\r\n\t * ברכות for Berachos.\r\n */\r\n public getMasechta(): string {\r\n return DafYomiYerushalmi.masechtosYerushalmi[this.getMasechtaNumber()];\r\n }\r\n}", "[\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D1\u05E8\u05D5\u05DA \u05D3\u05F3-\u05E9\u05DB\u05D9\u05E0\u05EA\u05D5 \u05D1\u05EA\u05D5\u05DB\u05E0\u05D5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05DB\u05D0\u05E9\u05E8 \u05E0\u05D7\u05E4\u05E9\u05D4-\u05DE\u05D2\u05D3\u05DC \u05D4\u05E2\u05D5\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05E0\u05E8\u05D0\u05D4 \u05E4\u05E9\u05D5\u05D8-\u05DC\u05D0\u05D9\u05DF \u05E9\u05E2\u05D5\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05E9\u05D1\u05D4-\u05D1\u05E4\u05E0\u05D9\u05DD \u05D4\u05E1\u05E4\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05E2\u05DC \u05DB\u05DF-\u05E6\u05D3 \u05D4\u05D3\u05D9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05DC\u05D4 \u05DC\u05D4\u05E7\u05D5\u05E8\u05D0-\u05D1\u05DE\u05D4\u05E8\u05D4 \u05D1\u05D9\u05DE\u05D9\u05E0\u05D5 \u05D0\u05DE\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05DC \u05D9\u05E4\u05DC\u05D0-\u05DC\u05E2\u05D5\u05DF \u05DB\u05DC\u05DC\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"1-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"5-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"7-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"10-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"12-13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"14-15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"16-17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"7-8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"9-10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"11-12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"13-14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E8\u05D5\u05E8\u05D9\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.1-1.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.3-1.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.5-1.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.7-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.5-2.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.7-2.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.9-2.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.12-2.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.1-3.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.3-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.5-3.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.7-3.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.1-4.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.3-4.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.5-4.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.7-4.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.9-4.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.12-5.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.2-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.5-5.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.7-5.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.5-6.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.7-6.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.9-6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.11-6.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.1-7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.5-7.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.7-7.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.10-7.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.13-7.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.1-8.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.3-8.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.5-8.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.8-8.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.10-8.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.13-8.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.1-10.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.3-10.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.5-10.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.7-10.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.9-10.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.11-10.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.13-10.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.15-10.16\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.1-1.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.4-1.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.6-1.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.8-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.10-1.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.2-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"4.1-4.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.1-5.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.3-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.6-5.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.5-6.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.8-6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.1-8.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.4-8.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.7-9.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.11-9.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.14-9.15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"1-3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"4-5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"6-7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"8-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"10-11\"\r\n }\r\n]", "[\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D1\u05E8\u05D5\u05DA \u05D3\u05F3-\u05E9\u05DB\u05D9\u05E0\u05EA\u05D5 \u05D1\u05EA\u05D5\u05DB\u05E0\u05D5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05DB\u05D0\u05E9\u05E8 \u05E0\u05D7\u05E4\u05E9\u05D4-\u05DE\u05D2\u05D3\u05DC \u05D4\u05E2\u05D5\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05E0\u05E8\u05D0\u05D4 \u05E4\u05E9\u05D5\u05D8-\u05DC\u05D0\u05D9\u05DF \u05E9\u05E2\u05D5\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05E9\u05D1\u05D4-\u05D1\u05E4\u05E0\u05D9\u05DD \u05D4\u05E1\u05E4\u05E8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05E2\u05DC \u05DB\u05DF-\u05E6\u05D3 \u05D4\u05D3\u05D9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05D7\u05DC\u05D4 \u05DC\u05D4\u05E7\u05D5\u05E8\u05D0-\u05D1\u05DE\u05D4\u05E8\u05D4 \u05D1\u05D9\u05DE\u05D9\u05E0\u05D5 \u05D0\u05DE\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05E7\u05D3\u05DE\u05D4\",\r\n \"section\": \"\u05D5\u05D0\u05DC \u05D9\u05E4\u05DC\u05D0-\u05DC\u05E2\u05D5\u05DF \u05DB\u05DC\u05DC\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"1-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05E4\u05EA\u05D9\u05D7\u05D4\",\r\n \"section\": \"5-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M08\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"7-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"10-11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"12-13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"14-15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05DC\u05D5\u05D5\u05D9\u05DF\",\r\n \"section\": \"16-17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"3-4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"5-6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"7-8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"9-10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"11-12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E9\u05D9\u05DF\",\r\n \"section\": \"13-14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05E2\u05E8\u05D5\u05E8\u05D9\u05DF\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.1-1.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.3-1.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.5-1.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"1.7-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M01\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.5-2.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.7-2.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.9-2.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"2.12-2.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.1-3.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.3-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.5-3.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"3.7-3.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M09\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.1-4.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.3-4.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.5-4.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.7-4.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.9-4.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"4.12-4.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.1-5.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.2-5.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.3-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M05L\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.5-5.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"5.7-5.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.5-6.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.7-6.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.9-6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"6.11-6.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.1-7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M02\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.5-7.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.7-7.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.11-7.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"7.13-7.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.1-8.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.3-8.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.5-8.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M10\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.6-8.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.8-8.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.10-8.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"8.13-8.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.1-10.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.3-10.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M06\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.4-10.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.5-10.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.7-10.8\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.9-10.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.11-10.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.13-10.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.14-10.14\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.15-10.16\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05DC\\\"\u05D4\",\r\n \"section\": \"10.17\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.1-1.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M03\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.3-1.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.4-1.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.6-1.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.8-1.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"1.10-1.11\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.1-2.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"2.3-2.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"3.2-3.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"4.1-4.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M11\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.1-5.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.3-5.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"5.6-5.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.1-6.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.3-6.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.5-6.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.7-6.7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.8-6.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"6.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 30,\r\n \"monthCode\": \"M07\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.1\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.3-7.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"7.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.1-8.3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"8.4-8.5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.1-9.2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.3-9.4\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.5-9.6\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M04\"\r\n },\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.7-9.9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 1,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 20,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.10\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 2,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 11,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 21,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.11-9.12\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 3,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 12,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 22,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.13\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 4,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 13,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 23,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05D4\u05DC\u05DB\u05D5\u05EA \u05E8\u05DB\u05D9\u05DC\u05D5\u05EA\",\r\n \"section\": \"9.14-9.15\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 5,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 14,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 24,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"1-2\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 6,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 15,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 25,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"3-3\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 7,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 16,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 26,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"4-5\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 8,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 17,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 27,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"6-7\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 9,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 18,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 28,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"8-9\"\r\n },\r\n {\r\n \"days\": [\r\n {\r\n \"day\": 10,\r\n \"monthCode\": \"M05\"\r\n },\r\n {\r\n \"day\": 19,\r\n \"monthCode\": \"M08\"\r\n },\r\n {\r\n \"day\": 29,\r\n \"monthCode\": \"M12\"\r\n }\r\n ],\r\n \"title\": \"\u05E6\u05D9\u05D9\u05D5\u05E8\u05D9\u05DD\",\r\n \"section\": \"10-11\"\r\n }\r\n]", "import { JewishDate } from \"../JewishDate.ts\";\r\nimport ccyNl from \"./dataSets/ccy-nonleap.json\"\r\nimport ccyL from \"./dataSets/ccy-leap.json\"\r\nimport { Temporal } from \"temporal-polyfill\";\r\n\r\nexport class ChafetzChayimYomiCalculator {\r\n public static getChafetzChayimYomi(jewishCalendar: JewishDate) {\r\n const hebrewDateToday = jewishCalendar.getDate().withCalendar(\"hebrew\")\r\n\r\n const ccCal = (jewishCalendar.isJewishLeapYear() ? ccyL : ccyNl);\r\n const limudToday = ccCal\r\n .find(limud => limud.days\r\n .find(dateObj => hebrewDateToday.equals(Temporal.Now.plainDateISO().withCalendar(\"hebrew\").with(dateObj)))\r\n )\r\n\r\n return limudToday;\r\n }\r\n}", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { GeoLocation } from '../util/GeoLocation.ts';\r\nimport { JewishDate } from './JewishDate.ts';\r\nimport { Calendar } from '../polyfills/Utils.ts';\r\nimport { DafBavliYomi, YomiCalculator } from './limud/YomiCalculator.ts';\r\nimport { DafYomiYerushalmi, YerushalmiYomiCalculator } from './limud/YerushalmiYomiCalculator.ts';\r\nimport { ChafetzChayimYomiCalculator } from './limud/ChafetzChayimYomiCalculator.ts';\r\n\r\nconst { FRIDAY, SATURDAY } = Calendar;\r\n\r\n/**\r\n * List of parshiyos or special Shabasos. {@link #NONE} indicates a week without a parsha, while the enum for\r\n * the parsha of {@link #VZOS_HABERACHA} exists for consistency, but is not currently used. The special Shabasos of\r\n * Shekalim, Zachor, Para, Hachodesh, as well as Shabbos Shuva, Shira, Hagadol, Chazon and Nachamu are also represented in this collection\r\n * of parshiyos.\r\n * @see #getSpecialShabbos()\r\n * @see #getParshah()\r\n */\r\nexport enum Parsha {\r\n /** NONE - A week without any parsha such as Shabbos Chol Hamoed */\r\n NONE,\r\n BERESHIS, NOACH, LECH_LECHA, VAYERA, CHAYEI_SARA, TOLDOS, VAYETZEI,\r\n VAYISHLACH, VAYESHEV, MIKETZ, VAYIGASH, VAYECHI, SHEMOS, VAERA, BO,\r\n BESHALACH, YISRO, MISHPATIM, TERUMAH, TETZAVEH, KI_SISA, VAYAKHEL,\r\n PEKUDEI, VAYIKRA, TZAV, SHMINI, TAZRIA, METZORA, ACHREI_MOS, KEDOSHIM,\r\n EMOR, BEHAR, BECHUKOSAI, BAMIDBAR, NASSO, BEHAALOSCHA, SHLACH, KORACH,\r\n CHUKAS, BALAK, PINCHAS, MATOS, MASEI, DEVARIM, VAESCHANAN, EIKEV,\r\n REEH, SHOFTIM, KI_SEITZEI, KI_SAVO, NITZAVIM, VAYEILECH, HAAZINU,\r\n VZOS_HABERACHA,\r\n /** The double parsha of Vayakhel & Peudei */\r\n VAYAKHEL_PEKUDEI,\r\n /** The double parsha of Tazria & Metzora */\r\n TAZRIA_METZORA,\r\n /** The double parsha of Achrei Mos & Kedoshim */\r\n ACHREI_MOS_KEDOSHIM,\r\n /** The double parsha of Behar & Bechukosai */\r\n BEHAR_BECHUKOSAI,\r\n /** The double parsha of Chukas & Balak */\r\n CHUKAS_BALAK,\r\n /** The double parsha of Matos & Masei */\r\n MATOS_MASEI,\r\n /** The double parsha of Nitzavim & Vayelech */\r\n NITZAVIM_VAYEILECH,\r\n /** The special parsha of Shekalim */\r\n SHKALIM,\r\n /** The special parsha of Zachor */\r\n ZACHOR,\r\n /** The special parsha of Para */\r\n PARA,\r\n /** The special parsha of Hachodesh */\r\n HACHODESH,\r\n SHUVA,\r\n SHIRA,\r\n HAGADOL,\r\n CHAZON,\r\n NACHAMU,\r\n}\r\n\r\n/**\r\n * The JewishCalendar extends the JewishDate class and adds calendar methods.\r\n *\r\n * This open source Java code was originally ported by Avrom Finkelstien\r\n * from his C++ code. It was refactored to fit the KosherJava Zmanim API with simplification of the code, enhancements\r\n * and some bug fixing. The class allows setting whether the holiday and parsha scheme follows the Israel scheme or outside Israel\r\n * scheme. The default is the outside Israel scheme.\r\n * The parsha code was ported by Y. Paritcher from his libzmanim code.\r\n *\r\n * TODO: Some do not belong in this class, but here is a partial list of what should still be implemented in some form:\r\n * Date
to set the calendar to\r\n */\r\n /*\r\n public JewishCalendar(date: Date) {\r\n super(date);\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that initializes the date to the {@link java.util.Calendar Calendar} parameter.\r\n *\r\n * @param calendar\r\n * the Calendar
to set the calendar to\r\n */\r\n /*\r\n public JewishCalendar(calendar: GregorianCalendar) {\r\n super(calendar);\r\n }\r\n */\r\n\r\n /**\r\n * Creates a Jewish date based on a Jewish year, month and day of month.\r\n *\r\n * @param jewishYear\r\n * the Jewish year\r\n * @param jewishMonth\r\n * the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the\r\n * constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar II) to avoid any\r\n * confusion.\r\n * @param jewishDayOfMonth\r\n * the Jewish day of month. If 30 is passed in for a month with only 29 days (for example {@link #IYAR},\r\n * or {@link #KISLEV} in a year that {@link #isKislevShort()}), the 29th (last valid date of the month)\r\n * will be set\r\n * @throws IllegalArgumentException\r\n * if the day of month is < 1 or > 30, or a year of < 0 is passed in.\r\n */\r\n\r\n /*\r\n public JewishCalendar(jewishYear: number, jewishMonth: number, jewishDayOfMonth: number) {\r\n super(jewishYear, jewishMonth, jewishDayOfMonth);\r\n }\r\n */\r\n\r\n /**\r\n * Creates a Jewish date based on a Jewish date and whether in Israel\r\n *\r\n * @param jewishYear\r\n * the Jewish year\r\n * @param jewishMonth\r\n * the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the\r\n * constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar II) to avoid any\r\n * confusion.\r\n * @param jewishDayOfMonth\r\n * the Jewish day of month. If 30 is passed in for a month with only 29 days (for example {@link #IYAR},\r\n * or {@link #KISLEV} in a year that {@link #isKislevShort()}), the 29th (last valid date of the month)\r\n * will be set\r\n * @param inIsrael\r\n * whether in Israel. This affects Yom Tov calculations\r\n */\r\n constructor(jewishYear: number, jewishMonth: number, jewishDayOfMonth: number, inIsrael?: boolean);\r\n constructor(date: Date);\r\n constructor(date: Temporal.PlainDate);\r\n constructor();\r\n constructor(jewishYearOrDateTimeOrDate?: number | Date | Temporal.PlainDate, jewishMonth?: number, jewishDayOfMonth?: number, inIsrael?: boolean) {\r\n // @ts-ignore\r\n super(jewishYearOrDateTimeOrDate, jewishMonth, jewishDayOfMonth);\r\n if (inIsrael) this.setInIsrael(inIsrael);\r\n }\r\n\r\n /**\r\n * Sets whether to use Israel holiday scheme or not. Default is false.\r\n *\r\n * @param inIsrael\r\n * set to true for calculations for Israel\r\n * \r\n\t * @see #getInIsrael()\r\n */\r\n public setInIsrael(inIsrael: boolean): void {\r\n this.inIsrael = inIsrael;\r\n }\r\n\r\n /**\r\n * Gets whether Israel holiday scheme is used or not. The default (if not set) is false.\r\n *\r\n * @return if the calendar is set to Israel\r\n\t * \r\n\t * @see #setInIsrael(boolean)\r\n */\r\n public getInIsrael(): boolean {\r\n return this.inIsrael;\r\n }\r\n\r\n /**\r\n\t * Returns if the city is set as a city surrounded by a wall from the time of Yehoshua, and Shushan Purim\r\n\t * should be celebrated as opposed to regular Purim.\r\n\t * @return if the city is set as a city surrounded by a wall from the time of Yehoshua, and Shushan Purim\r\n\t * should be celebrated as opposed to regular Purim.\r\n\t * @see #setIsMukafChoma(boolean)\r\n\t */\r\n public getIsMukafChoma():boolean {\r\n return this.isMukafChoma;\r\n }\r\n\r\n /**\r\n\t * Sets if the location is surrounded by a wall from the time of Yehoshua, and Shushan Purim should be\r\n\t * celebrated as opposed to regular Purim. This should be set for Yerushalayim, Shushan and other cities.\r\n\t * @param isMukafChoma is the city surrounded by a wall from the time of Yehoshua.\r\n\t * \r\n\t * @see #getIsMukafChoma()\r\n\t */\r\n public setIsMukafChoma(isMukafChoma:boolean):void {\r\n this.isMukafChoma = isMukafChoma;\r\n }\r\n\r\n /**\r\n * Birkas Hachamah is recited every 28 years based on\r\n * Tekufas Shmuel (Julian years) that a year is 365.25 days. The Rambam in Hilchos Kiddush Hachodesh 9:3\r\n\t * states that tekufas Nissan of year 1 was 7 days + 9 hours before molad Nissan. This is calculated as every\r\n\t * 10,227 days (28 * 365.25). \r\n\t * @return true for a day that Birkas Hachamah is recited.\r\n */\r\n public isBirkasHachamah(): boolean {\r\n // elapsed days since molad ToHu\r\n let elapsedDays: number = JewishCalendar.getJewishCalendarElapsedDays(this.getJewishYear());\r\n // elapsed days to the current calendar date\r\n elapsedDays += Math.trunc(this.getDaysSinceStartOfJewishYear());\r\n\r\n /* Molad Nissan year 1 was 177 days after molad tohu of Tishrei. We multiply 29.5 days * 6 months from Tishrei\r\n\t\t * to Nissan = 177. Subtract 7 days since tekufas Nissan was 7 days and 9 hours before the molad as stated in the Rambam\r\n\t\t * and we are now at 170 days. Because getJewishCalendarElapsedDays and getDaysSinceStartOfJewishYear use the value for\r\n\t\t * Rosh Hashana as 1, we have to add 1 day for a total of 171. To this add a day since the tekufah is on a Tuesday\r\n\t\t * night and we push off the bracha to Wednesday AM resulting in the 172 used in the calculation.\r\n\t\t */\r\n // 28 years of 365.25 days + the offset from molad tohu mentioned above\r\n return elapsedDays % (28 * 365.25) === 172;\r\n }\r\n\r\n /**\r\n * Return the type of year for parsha calculations. The algorithm follows the\r\n\t * Luach Arba'ah Shearim in the Tur Ohr Hachaim.\r\n\t * @return the type of year for parsha calculations.\r\n * @todo Use constants in this class.\r\n */\r\n private getParshaYearType(): number {\r\n const roshHashanah = this.getDate().withCalendar(\"hebrew\").with({ day: 1, month: 1 });\r\n if (roshHashanah.monthsInYear == 13) {\r\n switch (roshHashanah.dayOfWeek) {\r\n case 1: // MONDAY\r\n // BaCh\r\n if (this.isKislevShort()) {\r\n if (this.getInIsrael()) {\r\n return 14;\r\n }\r\n return 6;\r\n }\r\n\r\n // BaSh\r\n if (this.isCheshvanLong()) {\r\n if (this.getInIsrael()) {\r\n return 15;\r\n }\r\n return 7;\r\n }\r\n break;\r\n // GaK\r\n case 2: // Tuesday\r\n if (this.getInIsrael()) {\r\n return 15;\r\n }\r\n return 7;\r\n case 4: // Thursday\r\n // HaCh\r\n if (this.isKislevShort()) {\r\n return 8;\r\n }\r\n\r\n // HaSh\r\n if (this.isCheshvanLong()) {\r\n return 9;\r\n }\r\n\r\n break;\r\n case 6: // Saturday\r\n // ZaCh\r\n if (this.isKislevShort()) {\r\n return 10;\r\n }\r\n\r\n // ZaSh\r\n if (this.isCheshvanLong()) {\r\n if (this.getInIsrael()) {\r\n return 16;\r\n }\r\n return 11;\r\n }\r\n\r\n break;\r\n }\r\n } else {\r\n // not a leap year\r\n switch (roshHashanah.dayOfWeek) {\r\n case 1: // MONDAY\r\n // BaCh\r\n if (this.isKislevShort()) {\r\n return 0;\r\n }\r\n\r\n // BaSh\r\n if (this.isCheshvanLong()) {\r\n if (this.getInIsrael()) {\r\n return 12;\r\n }\r\n return 1;\r\n }\r\n\r\n break;\r\n case 2: // TUESDAY\r\n // GaK\r\n if (this.getInIsrael()) {\r\n return 12;\r\n }\r\n return 1;\r\n case 4: // THURSDAY\r\n // HaSh\r\n if (this.isCheshvanLong()) {\r\n return 3;\r\n }\r\n\r\n // HaK\r\n if (!this.isKislevShort()) {\r\n if (this.getInIsrael()) {\r\n return 13;\r\n }\r\n return 2;\r\n }\r\n\r\n break;\r\n case 6: // SATURDAY\r\n // ZaCh\r\n if (this.isKislevShort()) {\r\n return 4;\r\n }\r\n\r\n // ZaSh\r\n if (this.isCheshvanLong()) {\r\n return 5;\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n return -1;\r\n }\r\n\r\n /**\r\n * Returns this week's {@link Parsha} if it is Shabbos.\r\n * returns Parsha.NONE if a weekday or if there is no parsha that week (for example Yomtov is on Shabbos)\r\n * @return the current parsha\r\n */\r\n public getParshah(): Parsha {\r\n if (this.getDayOfWeek() !== SATURDAY) {\r\n return Parsha.NONE;\r\n }\r\n\r\n const yearType: number = this.getParshaYearType();\r\n const roshHashanaDayOfWeek: number = JewishCalendar.getJewishCalendarElapsedDays(this.getJewishYear()) % 7;\r\n const day: number = roshHashanaDayOfWeek + Math.trunc(this.getDaysSinceStartOfJewishYear());\r\n\r\n // negative year should be impossible, but lets cover all bases\r\n if (yearType >= 0) {\r\n return JewishCalendar.parshalist[yearType][day / 7];\r\n }\r\n\r\n // keep the compiler happy\r\n return Parsha.NONE;\r\n }\r\n\r\n /**\r\n * Returns a parsha enum if the Shabbos is one of the four parshiyos of Parsha.SHKALIM, Parsha.ZACHOR, Parsha.PARA,\r\n * Parsha.HACHODESH or Parsha.NONE for a regular Shabbos (or any weekday).\r\n * @return one of the four parshiyos of Parsha.SHKALIM, Parsha.ZACHOR, Parsha.PARA, Parsha.HACHODESH or Parsha.NONE.\r\n */\r\n public getSpecialShabbos(): Parsha {\r\n if (this.getDayOfWeek() !== SATURDAY)\r\n return Parsha.NONE;\r\n\r\n if (((this.getJewishMonth() === JewishCalendar.SHEVAT && !this.isJewishLeapYear())\r\n || (this.getJewishMonth() === JewishCalendar.ADAR && this.isJewishLeapYear()))\r\n && [25, 27, 29].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.SHKALIM;\r\n }\r\n\r\n if ((this.getJewishMonth() === JewishCalendar.ADAR && !this.isJewishLeapYear())\r\n || this.getJewishMonth() === JewishCalendar.ADAR_II) {\r\n if (this.getJewishDayOfMonth() === 1) {\r\n return Parsha.SHKALIM;\r\n }\r\n\r\n if ([8, 9, 11, 13].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.ZACHOR;\r\n }\r\n\r\n if ([18, 20, 22, 23].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.PARA;\r\n }\r\n\r\n if ([25, 27, 29].includes(this.getJewishDayOfMonth())) {\r\n return Parsha.HACHODESH;\r\n }\r\n }\r\n\r\n if (this.getJewishMonth() === JewishCalendar.NISSAN) {\r\n if (this.getJewishDayOfMonth() == 1)\r\n return Parsha.HACHODESH;\r\n\r\n if (this.getJewishDayOfMonth() >= 8 && this.getJewishDayOfMonth() <= 14)\r\n return Parsha.HAGADOL;\r\n }\r\n\r\n if (this.getJewishMonth() == JewishCalendar.AV) {\r\n if (this.getJewishDayOfMonth() >= 4 && this.getJewishDayOfMonth() <= 9) {\r\n return Parsha.CHAZON;\r\n }\r\n if (this.getJewishDayOfMonth() >= 10 && this.getJewishDayOfMonth() <= 16) {\r\n return Parsha.NACHAMU;\r\n }\r\n }\r\n\r\n if (this.getJewishMonth() == JewishCalendar.TISHREI && this.getJewishDayOfMonth() >= 3 && this.getJewishDayOfMonth() <= 8)\r\n return Parsha.SHUVA;\r\n\r\n if (this.getParshah() == Parsha.BESHALACH)\r\n return Parsha.SHIRA;\r\n\r\n return Parsha.NONE;\r\n }\r\n\r\n /**\r\n * Returns an index of the Jewish holiday or fast day for the current day, or a -1 if there is no holiday for this\r\n * day. There are constants in this class representing each Yom Tov. Formatting of the Yomim tovim is done in the\r\n * ZmanimFormatter#\r\n *\r\n * @todo consider using enums instead of the constant ints.\r\n *\r\n * @return the index of the holiday such as the constant {@link #LAG_BAOMER} or {@link #YOM_KIPPUR} or a -1 if it is not a holiday.\r\n * @see HebrewDateFormatter\r\n */\r\n public getYomTovIndex(): number {\r\n const day: number = this.getJewishDayOfMonth();\r\n const dayOfWeek: number = this.getDayOfWeek();\r\n\r\n // check by month (starting from Nissan)\r\n switch (this.getJewishMonth()) {\r\n case JewishCalendar.NISSAN:\r\n if (day === 14) {\r\n return JewishCalendar.EREV_PESACH;\r\n } else if (day === 15 || day === 21 || (!this.inIsrael && (day === 16 || day === 22))) {\r\n return JewishCalendar.PESACH;\r\n } else if ((day >= 17 && day <= 20) || (day === 16 && this.inIsrael)) {\r\n return JewishCalendar.CHOL_HAMOED_PESACH;\r\n }\r\n\r\n if (this.isUseModernHolidays()\r\n && ((day === 26 && dayOfWeek === 5) || (day === 28 && dayOfWeek === 2)\r\n || (day === 27 && dayOfWeek !== 1 && dayOfWeek !== 6))) {\r\n return JewishCalendar.YOM_HASHOAH;\r\n }\r\n break;\r\n case JewishCalendar.IYAR:\r\n if (this.isUseModernHolidays()\r\n && ((day === 4 && dayOfWeek === 3) || ((day === 3 || day === 2) && dayOfWeek === 4)\r\n || (day === 5 && dayOfWeek === 2))) {\r\n return JewishCalendar.YOM_HAZIKARON;\r\n }\r\n\r\n // if 5 Iyar falls on Wed Yom Haatzmaut is that day. If it fal1s on Friday or Shabbos it is moved back to\r\n // Thursday. If it falls on Monday it is moved to Tuesday\r\n if (this.isUseModernHolidays() && ((day === 5 && dayOfWeek === 4)\r\n || ((day === 4 || day === 3) && dayOfWeek === 5) || (day === 6 && dayOfWeek === 3))) {\r\n return JewishCalendar.YOM_HAATZMAUT;\r\n }\r\n\r\n if (day === 14) {\r\n return JewishCalendar.PESACH_SHENI;\r\n }\r\n\r\n if (day === 18) {\r\n return JewishCalendar.LAG_BAOMER;\r\n }\r\n\r\n if (this.isUseModernHolidays() && day === 28) {\r\n return JewishCalendar.YOM_YERUSHALAYIM;\r\n }\r\n break;\r\n case JewishCalendar.SIVAN:\r\n if (day === 5) {\r\n return JewishCalendar.EREV_SHAVUOS;\r\n } else if (day === 6 || (day === 7 && !this.inIsrael)) {\r\n return JewishCalendar.SHAVUOS;\r\n }\r\n break;\r\n case JewishCalendar.TAMMUZ:\r\n // push off the fast day if it falls on Shabbos\r\n if ((day === 17 && dayOfWeek !== 7) || (day === 18 && dayOfWeek === 1)) {\r\n return JewishCalendar.SEVENTEEN_OF_TAMMUZ;\r\n }\r\n break;\r\n case JewishCalendar.AV:\r\n // if Tisha B'av falls on Shabbos, push off until Sunday\r\n if ((dayOfWeek === 1 && day === 10) || (dayOfWeek !== 7 && day === 9)) {\r\n return JewishCalendar.TISHA_BEAV;\r\n } else if (day === 15) {\r\n return JewishCalendar.TU_BEAV;\r\n }\r\n break;\r\n case JewishCalendar.ELUL:\r\n if (day === 29) {\r\n return JewishCalendar.EREV_ROSH_HASHANA;\r\n }\r\n break;\r\n case JewishCalendar.TISHREI:\r\n if (day === 1 || day === 2) {\r\n return JewishCalendar.ROSH_HASHANA;\r\n } else if ((day === 3 && dayOfWeek !== 7) || (day === 4 && dayOfWeek === 1)) {\r\n // push off Tzom Gedalia if it falls on Shabbos\r\n return JewishCalendar.FAST_OF_GEDALYAH;\r\n } else if (day === 9) {\r\n return JewishCalendar.EREV_YOM_KIPPUR;\r\n } else if (day === 10) {\r\n return JewishCalendar.YOM_KIPPUR;\r\n } else if (day === 14) {\r\n return JewishCalendar.EREV_SUCCOS;\r\n }\r\n\r\n if (day === 15 || (day === 16 && !this.inIsrael)) {\r\n return JewishCalendar.SUCCOS;\r\n }\r\n\r\n if ((day >= 17 && day <= 20) || (day === 16 && this.inIsrael)) {\r\n return JewishCalendar.CHOL_HAMOED_SUCCOS;\r\n }\r\n\r\n if (day === 21) {\r\n return JewishCalendar.HOSHANA_RABBA;\r\n }\r\n\r\n if (day === 22) {\r\n return JewishCalendar.SHEMINI_ATZERES;\r\n }\r\n\r\n if (day === 23 && !this.inIsrael) {\r\n return JewishCalendar.SIMCHAS_TORAH;\r\n }\r\n break;\r\n case JewishCalendar.KISLEV: // no yomtov in CHESHVAN\r\n // if (day == 24) {\r\n // return EREV_CHANUKAH;\r\n // } else\r\n if (day >= 25) {\r\n return JewishCalendar.CHANUKAH;\r\n }\r\n break;\r\n case JewishCalendar.TEVES:\r\n if (day === 1 || day === 2 || (day === 3 && this.isKislevShort())) {\r\n return JewishCalendar.CHANUKAH;\r\n } else if (day === 10) {\r\n return JewishCalendar.TENTH_OF_TEVES;\r\n }\r\n break;\r\n case JewishCalendar.SHEVAT:\r\n if (day === 15) {\r\n return JewishCalendar.TU_BESHVAT;\r\n }\r\n break;\r\n case JewishCalendar.ADAR:\r\n if (!this.isJewishLeapYear()) {\r\n // if 13th Adar falls on Friday or Shabbos, push back to Thursday\r\n if (((day === 11 || day === 12) && dayOfWeek === 5) || (day === 13 && !(dayOfWeek === 6 || dayOfWeek === 7))) {\r\n return JewishCalendar.FAST_OF_ESTHER;\r\n }\r\n\r\n if (day === 14) {\r\n return JewishCalendar.PURIM;\r\n } else if (day === 15) {\r\n return JewishCalendar.SHUSHAN_PURIM;\r\n }\r\n } else {\r\n // else if a leap year\r\n if (day === 14) {\r\n return JewishCalendar.PURIM_KATAN;\r\n }\r\n\r\n if (day === 15) {\r\n return JewishCalendar.SHUSHAN_PURIM_KATAN;\r\n }\r\n }\r\n break;\r\n case JewishCalendar.ADAR_II:\r\n // if 13th Adar falls on Friday or Shabbos, push back to Thursday\r\n if (((day === 11 || day === 12) && dayOfWeek === 5) || (day === 13 && !(dayOfWeek === 6 || dayOfWeek === 7))) {\r\n return JewishCalendar.FAST_OF_ESTHER;\r\n }\r\n\r\n if (day === 14) {\r\n return JewishCalendar.PURIM;\r\n } else if (day === 15) {\r\n return JewishCalendar.SHUSHAN_PURIM;\r\n }\r\n break;\r\n }\r\n // if we get to this stage, then there are no holidays for the given date return -1\r\n return -1;\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Yom Tov. The method returns true even for holidays such as {@link #CHANUKAH} and minor\r\n * ones such as {@link #TU_BEAV} and {@link #PESACH_SHENI}. Erev Yom Tov (with the exception of {@link #HOSHANA_RABBA},\r\n * Erev the second days of Pesach) returns false, as do {@link #isTaanis() fast days} besides {@link #YOM_KIPPUR}. Use\r\n * {@link #isAssurBemelacha()} to find the days that have a prohibition of work.\r\n *\r\n * @return true if the current day is a Yom Tov\r\n *\r\n * @see #getYomTovIndex()\r\n * @see #isErevYomTov()\r\n * @see #isErevYomTovSheni()\r\n * @see #isTaanis()\r\n * @see #isAssurBemelacha()\r\n * @see #isCholHamoed()\r\n */\r\n public isYomTov(): boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n\r\n if ((this.isErevYomTov() && (holidayIndex !== JewishCalendar.HOSHANA_RABBA\r\n && (holidayIndex === JewishCalendar.CHOL_HAMOED_PESACH && this.getJewishDayOfMonth() !== 20)))\r\n || (this.isTaanis() && holidayIndex !== JewishCalendar.YOM_KIPPUR)) {\r\n return false;\r\n }\r\n\r\n return this.getYomTovIndex() !== -1;\r\n }\r\n\r\n /**\r\n * Returns true if the Yom Tov day has a melacha (work) prohibition. This method will return false for a\r\n * non-Yom Tov day, even if it is Shabbos.\r\n *\r\n * @return if the Yom Tov day has a melacha (work) prohibition.\r\n */\r\n public isYomTovAssurBemelacha(): boolean {\r\n const yamimTovimAssurBemelacha = [\r\n JewishCalendar.PESACH,\r\n JewishCalendar.SHAVUOS,\r\n JewishCalendar.SUCCOS,\r\n JewishCalendar.SHEMINI_ATZERES,\r\n JewishCalendar.SIMCHAS_TORAH,\r\n JewishCalendar.ROSH_HASHANA,\r\n JewishCalendar.YOM_KIPPUR,\r\n ];\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return yamimTovimAssurBemelacha.includes(holidayIndex);\r\n }\r\n\r\n /**\r\n * Returns true if it is Shabbos or if it is a Yom Tov day that has a melacha (work) prohibition.\r\n * This method will return false for a.\r\n * @return if the day is a Yom Tov that is assur bemlacha or Shabbos\r\n */\r\n public isAssurBemelacha(): boolean {\r\n return this.getDayOfWeek() === SATURDAY || this.isYomTovAssurBemelacha();\r\n }\r\n\r\n /**\r\n * Returns true if the day has candle lighting. This will return true on erev Shabbos, erev Yom Tov, the\r\n * first day of Rosh Hashana and the first days of Yom Tov out of Israel. It is identical\r\n * to calling {@link #isTomorrowShabbosOrYomTov()}.\r\n *\r\n * @return if the day has candle lighting\r\n */\r\n public hasCandleLighting(): boolean {\r\n return this.isTomorrowShabbosOrYomTov();\r\n }\r\n\r\n /**\r\n * Returns true if tomorrow is Shabbos or Yom Tov. This will return true on erev Shabbos, erev\r\n * Yom Tov, the first day of Rosh Hashana and erev the first days of Yom Tov out of\r\n * Israel. It is identical to calling {@link #hasCandleLighting()}.\r\n * @return will return if the next day is Shabbos or Yom Tov\r\n */\r\n public isTomorrowShabbosOrYomTov(): boolean {\r\n return this.getDayOfWeek() === FRIDAY || this.isErevYomTov() || this.isErevYomTovSheni();\r\n }\r\n\r\n /**\r\n * Returns true if the day is the second day of Yom Tov. This impacts the second day of Rosh Hashana\r\n * everywhere, and the second days of Yom Tov in chutz laaretz (out of Israel).\r\n *\r\n * @return if the day is the second day of Yom Tov.\r\n */\r\n public isErevYomTovSheni(): boolean {\r\n return (this.getJewishMonth() === JewishCalendar.TISHREI && (this.getJewishDayOfMonth() === 1))\r\n || (!this.getInIsrael()\r\n && ((this.getJewishMonth() === JewishCalendar.NISSAN && [15, 21].includes(this.getJewishDayOfMonth()))\r\n || (this.getJewishMonth() === JewishCalendar.TISHREI && [15, 22].includes(this.getJewishDayOfMonth()))\r\n || (this.getJewishMonth() === JewishCalendar.SIVAN && this.getJewishDayOfMonth() === 6)));\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Aseret Yemei Teshuva.\r\n *\r\n * @return if the current day is Aseret Yemei Teshuvah\r\n */\r\n public isAseresYemeiTeshuva(): boolean {\r\n return this.getJewishMonth() === JewishCalendar.TISHREI && this.getJewishDayOfMonth() <= 10;\r\n }\r\n\r\n /**\r\n\t * Returns true if the current day is Pesach (either the Yom Tov of Pesach orChol Hamoed Pesach).\r\n\t * \r\n\t * @return true if the current day is Pesach (either the Yom Tov of Pesach orChol Hamoed Pesach).\r\n\t * @see #isYomTov()\r\n\t * @see #isCholHamoedPesach()\r\n\t * @see #PESACH\r\n\t * @see #CHOL_HAMOED_PESACH\r\n\t */\r\n public isPesach():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.PESACH || holidayIndex == JewishCalendar.CHOL_HAMOED_PESACH;\r\n }\r\n\t\r\n /**\r\n * Returns true if the current day is Chol Hamoed of Pesach.\r\n *\r\n * @return true if the current day is Chol Hamoed of Pesach\r\n * @see #isYomTov()\r\n * @see #isPessach()\r\n * @see #CHOL_HAMOED_PESACH\r\n */\r\n public isCholHamoedPesach(): boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return holidayIndex === JewishCalendar.CHOL_HAMOED_PESACH;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Shavuos.\r\n\t *\r\n\t * @return true if the current day is Shavuos.\r\n\t * @see #isYomTov()\r\n\t * @see #SHAVUOS\r\n\t */\r\n public isShavuos():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.SHAVUOS;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Rosh Hashana.\r\n\t *\r\n\t * @return true if the current day is Rosh Hashana.\r\n\t * @see #isYomTov()\r\n\t * @see #ROSH_HASHANA\r\n\t */\r\n public isRoshHashana():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.ROSH_HASHANA;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Yom Kippur.\r\n\t *\r\n\t * @return true if the current day is Yom Kippur.\r\n\t * @see #isYomTov()\r\n\t * @see #YOM_KIPPUR\r\n\t */\r\n public isYomKippur():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.YOM_KIPPUR;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Succos (either the Yom Tov of Succos orChol Hamoed Succos).\r\n\t * It will return false for {@link #isShminiAtzeres() Shmini Atzeres} and {@link #isSimchasTorah() Simchas Torah}.\r\n\t * \r\n\t * @return true if the current day is Succos (either the Yom Tov of Succos orChol Hamoed Succos.\r\n\t * @see #isYomTov()\r\n\t * @see #isCholHamoedSuccos()\r\n\t * @see #isHoshanaRabba()\r\n\t * @see #SUCCOS\r\n\t * @see #CHOL_HAMOED_SUCCOS\r\n\t * @see #HOSHANA_RABBA\r\n\t */\r\n public isSuccos():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.SUCCOS || holidayIndex == JewishCalendar.CHOL_HAMOED_SUCCOS || holidayIndex == JewishCalendar.HOSHANA_RABBA;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Hoshana Rabba.\r\n\t *\r\n\t * @return true true if the current day is Hoshana Rabba.\r\n\t * @see #isYomTov()\r\n\t * @see #HOSHANA_RABBA\r\n\t */\r\n public isHoshanaRabba():boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.HOSHANA_RABBA;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Shmini Atzeres.\r\n\t *\r\n\t * @return true if the current day is Shmini Atzeres.\r\n\t * @see #isYomTov()\r\n\t * @see #SHEMINI_ATZERES\r\n\t */\r\n public isShminiAtzeres():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.SHEMINI_ATZERES;\r\n }\r\n\t\r\n /**\r\n\t * Returns true if the current day is Simchas Torah. This will always return false if {@link #getInIsrael() in Israel}\r\n\t *\r\n\t * @return true if the current day is Shmini Atzeres.\r\n\t * @see #isYomTov()\r\n\t * @see #SIMCHAS_TORAH\r\n\t */\r\n public isSimchasTorah():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n //if in Israel, Holiday index of SIMCHAS_TORAH will not be returned by getYomTovIndex()\r\n return holidayIndex == JewishCalendar.SIMCHAS_TORAH;\r\n }\r\n\r\n\r\n /**\r\n * Returns true if the current day is Chol Hamoed of Succos.\r\n *\r\n * @return true if the current day is Chol Hamoed of Succos\r\n * @see #isYomTov()\r\n * @see #CHOL_HAMOED_SUCCOS\r\n */\r\n public isCholHamoedSuccos(): boolean {\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return holidayIndex === JewishCalendar.CHOL_HAMOED_SUCCOS;\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Chol Hamoed of Pesach or Succos.\r\n *\r\n * @return true if the current day is Chol Hamoed of Pesach or Succos\r\n * @see #isYomTov()\r\n * @see #CHOL_HAMOED_PESACH\r\n * @see #CHOL_HAMOED_SUCCOS\r\n */\r\n public isCholHamoed(): boolean {\r\n return this.isCholHamoedPesach() || this.isCholHamoedSuccos();\r\n }\r\n\r\n /**\r\n * Returns true if the current day is erev Yom Tov. The method returns true for Erev - Pesach (first and last days),\r\n * Shavuos, Rosh Hashana, Yom Kippur and Succos and Hoshana Rabba.\r\n *\r\n * @return true if the current day is Erev - Pesach, Shavuos, Rosh Hashana, Yom Kippur and Succos\r\n * @see #isYomTov()\r\n * @see #isErevYomTovSheni()\r\n */\r\n public isErevYomTov(): boolean {\r\n const erevYomTov = [\r\n JewishCalendar.EREV_PESACH,\r\n JewishCalendar.EREV_SHAVUOS,\r\n JewishCalendar.EREV_ROSH_HASHANA,\r\n JewishCalendar.EREV_YOM_KIPPUR,\r\n JewishCalendar.EREV_SUCCOS,\r\n JewishCalendar.HOSHANA_RABBA,\r\n ];\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return erevYomTov.includes(holidayIndex)\r\n || (holidayIndex === JewishCalendar.CHOL_HAMOED_PESACH && this.getJewishDayOfMonth() === 20);\r\n }\r\n\r\n /**\r\n * Returns true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana\r\n *\r\n * @return true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana\r\n * @see #isRoshChodesh()\r\n */\r\n public isErevRoshChodesh(): boolean {\r\n // Erev Rosh Hashana is not Erev Rosh Chodesh.\r\n return (this.getJewishDayOfMonth() === 29 && this.getJewishMonth() !== JewishCalendar.ELUL);\r\n }\r\n\r\n /**\r\n * Return true if the day is a Taanis (fast day). Return true for 17 of Tammuz, Tisha B'Av, Yom Kippur, Fast of\r\n * Gedalyah, 10 of Teves and the Fast of Esther\r\n *\r\n * @return true if today is a fast day\r\n */\r\n public isTaanis(): boolean {\r\n const taaniyos = [\r\n JewishCalendar.SEVENTEEN_OF_TAMMUZ,\r\n JewishCalendar.TISHA_BEAV,\r\n JewishCalendar.YOM_KIPPUR,\r\n JewishCalendar.FAST_OF_GEDALYAH,\r\n JewishCalendar.TENTH_OF_TEVES,\r\n JewishCalendar.FAST_OF_ESTHER,\r\n ];\r\n const holidayIndex: number = this.getYomTovIndex();\r\n return taaniyos.includes(holidayIndex);\r\n }\r\n\r\n /**\r\n * Return true if the day is Taanis Bechoros (on erev Pesach). It will return true for the 14th of Nissan if it is not\r\n * on Shabbos, or if the 12th of Nissan occurs on a Thursday\r\n *\r\n * @return true if today is the fast of Bechoros\r\n */\r\n public isTaanisBechoros(): boolean {\r\n const day: number = this.getJewishDayOfMonth();\r\n const dayOfWeek: number = this.getDayOfWeek();\r\n // on 14 Nisan unless that is Shabbos where the fast is moved back to Thursday\r\n return this.getJewishMonth() === JewishCalendar.NISSAN && ((day === 14 && dayOfWeek !== Calendar.SATURDAY)\r\n || (day === 12 && dayOfWeek === Calendar.THURSDAY));\r\n }\r\n\r\n /**\r\n * Returns the day of Chanukah or -1 if it is not Chanukah.\r\n *\r\n * @return the day of Chanukah or -1 if it is not Chanukah.\r\n * @see #isChanukah()\r\n */\r\n public getDayOfChanukah(): number {\r\n const day: number = this.getJewishDayOfMonth();\r\n\r\n if (this.isChanukah()) {\r\n if (this.getJewishMonth() === JewishCalendar.KISLEV) {\r\n return day - 24;\r\n }\r\n // teves\r\n return this.isKislevShort() ? day + 5 : day + 6;\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Returns true if the current day is one of the 8 days of Chanukah.\r\n * @return if the current day is one of the 8 days of Chanukah.\r\n * @see #getDayOfChanukah()\r\n */\r\n public isChanukah(): boolean {\r\n return this.getYomTovIndex() === JewishCalendar.CHANUKAH;\r\n }\r\n\r\n \t/**\r\n\t * Returns if the day is Purim (Shushan Purim\r\n\t * in a mukaf choma and regular Purim in a non-mukaf choma). \r\n\t * @return if the day is Purim (Shushan Purim in a mukaf choma and regular Purin in a non-mukaf choma)\r\n\t * \r\n\t * @see #getIsMukafChoma()\r\n\t * @see #setIsMukafChoma(boolean)\r\n\t */\r\n public isPurim():boolean {\r\n if (this.isMukafChoma) {\r\n return this.getYomTovIndex() == JewishCalendar.SHUSHAN_PURIM;\r\n }\r\n\r\n return this.getYomTovIndex() == JewishCalendar.PURIM;\r\n }\r\n\r\n /**\r\n * Returns if the day is Rosh Chodesh. Rosh Hashana will return false\r\n *\r\n * @return true if it is Rosh Chodesh. Rosh Hashana will return false\r\n */\r\n public isRoshChodesh(): boolean {\r\n // Rosh Hashana is not rosh chodesh. Elul never has 30 days\r\n return (this.getJewishDayOfMonth() === 1 && this.getJewishMonth() !== JewishCalendar.TISHREI) || this.getJewishDayOfMonth() === 30;\r\n }\r\n\r\n /**\r\n * Returns if the day is Shabbos and sunday is Rosh Chodesh.\r\n *\r\n * @return true if it is Shabbos and sunday is Rosh Chodesh.\r\n */\r\n public isMacharChodesh(): boolean {\r\n return (this.getDayOfWeek() === SATURDAY && (this.getJewishDayOfMonth() === 30 || this.getJewishDayOfMonth() === 29));\r\n }\r\n\r\n /**\r\n * Returns if the day is Shabbos Mevorchim.\r\n *\r\n * @return true if it is Shabbos Mevorchim.\r\n */\r\n public isShabbosMevorchim(): boolean {\r\n return this.getDayOfWeek() === SATURDAY\r\n && this.getJewishDayOfMonth() >= 23\r\n && this.getJewishDayOfMonth() <= 29\r\n && this.getJewishMonth() !== JewishCalendar.ELUL;\r\n }\r\n\r\n /**\r\n * Returns the int value of the Omer day or -1 if the day is not in the omer\r\n *\r\n * @return The Omer count as an int or -1 if it is not a day of the Omer.\r\n */\r\n public getDayOfOmer(): number {\r\n let omer: number = -1; // not a day of the Omer\r\n const month: number = this.getJewishMonth();\r\n const day: number = this.getJewishDayOfMonth();\r\n\r\n // if Nissan and second day of Pesach and on\r\n if (month === JewishCalendar.NISSAN && day >= 16) {\r\n omer = day - 15;\r\n // if Iyar\r\n } else if (month === JewishCalendar.IYAR) {\r\n omer = day + 15;\r\n // if Sivan and before Shavuos\r\n } else if (month === JewishCalendar.SIVAN && day < 6) {\r\n omer = day + 44;\r\n }\r\n return omer;\r\n }\r\n\r\n /**\r\n * Returns the molad in Standard Time in Yerushalayim as a Date. The traditional calculation uses local time. This\r\n * method subtracts 20.94 minutes (20 minutes and 56.496 seconds) from the local time (Har Habayis with a longitude\r\n * of 35.2354° is 5.2354° away from the %15 timezone longitude) to get to standard time. This method\r\n * intentionally uses standard time and not dailight savings time. Java will implicitly format the time to the\r\n * default (or set) Timezone.\r\n *\r\n * @return the Date representing the moment of the molad in Yerushalayim standard time (GMT + 2)\r\n */\r\n public getMoladAsDate(): Temporal.ZonedDateTime {\r\n const molad: JewishDate = this.getMolad();\r\n const locationName: string = 'Jerusalem, Israel';\r\n\r\n const latitude: number = 31.778; // Har Habayis latitude\r\n const longitude: number = 35.2354; // Har Habayis longitude\r\n\r\n // The raw molad Date (point in time) must be generated using standard time. Using \"Asia/Jerusalem\" timezone will result in the time\r\n // being incorrectly off by an hour in the summer due to DST. Proper adjustment for the actual time in DST will be done by the date\r\n // formatter class used to display the Date.\r\n const yerushalayimStandardTZ: string = '+02:00';\r\n const geo: GeoLocation = new GeoLocation(locationName, latitude, longitude, yerushalayimStandardTZ);\r\n\r\n const moladSeconds: number = (molad.getMoladChalakim() * 10) / 3;\r\n // subtract local time difference of 20.94 minutes (20 minutes and 56.496 seconds) to get to Standard time\r\n const milliseconds: number = Math.trunc(1000 * (moladSeconds - Math.trunc(moladSeconds)));\r\n\r\n return Temporal.ZonedDateTime.from({\r\n timeZone: geo.getTimeZone(),\r\n year: molad.getGregorianYear(),\r\n month: molad.getGregorianMonth() + 1,\r\n day: molad.getGregorianDayOfMonth(),\r\n hour: molad.getMoladHours(),\r\n minute: molad.getMoladMinutes(),\r\n second: Math.trunc(moladSeconds),\r\n millisecond: milliseconds,\r\n })\r\n .subtract({ nanoseconds: Math.trunc(geo.getLocalMeanTimeOffset()) });\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana calculated as 3 days after the molad. This method returns the time\r\n * even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider\r\n * displaying the next tzais if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment 3 days after the molad.\r\n *\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana3Days()\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana3Days(Date, Date)\r\n */\r\n public getTchilasZmanKidushLevana3Days(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({ hours: 72 });\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana calculated as 7 days after the molad as mentioned by the Mechaber. See the Bach's opinion on this time. This method returns the time\r\n * even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider\r\n * displaying the next tzais if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment 7 days after the molad.\r\n *\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana7Days()\r\n * @see ComplexZmanimCalendar#getTchilasZmanKidushLevana7Days(Date, Date)\r\n */\r\n public getTchilasZmanKidushLevana7Days(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({ hours: 168 });\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kiddush Levana according to the Maharil's opinion that it is calculated as\r\n * halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between molad and\r\n * molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad. This method returns the time\r\n * even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider\r\n * displaying alos before this time if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment halfway between molad and molad.\r\n * @see #getSofZmanKidushLevana15Days()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevanaBetweenMoldos()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevanaBetweenMoldos(Date, Date)\r\n */\r\n public getSofZmanKidushLevanaBetweenMoldos(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({\r\n days: 14,\r\n hours: 18,\r\n minutes: 22,\r\n seconds: 1,\r\n milliseconds: 666,\r\n });\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the opinion brought down\r\n * in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the\r\n * Rema who brings down the opinion of the Maharil's of calculating\r\n * {@link #getSofZmanKidushLevanaBetweenMoldos() half way between molad and mold} is of the opinion that Mechaber\r\n * agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, See Rabbi Dovid\r\n * Heber's very detailed writeup in Siman Daled (chapter 4) of Shaarei Zmanim. This method returns the time even if it is during\r\n * the day when Kiddush Levana can't be said. Callers of this method should consider displaying alos\r\n * before this time if the zman is between alos and tzais.\r\n *\r\n * @return the Date representing the moment 15 days after the molad.\r\n * @see #getSofZmanKidushLevanaBetweenMoldos()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevana15Days()\r\n * @see ComplexZmanimCalendar#getSofZmanKidushLevana15Days(Date, Date)\r\n */\r\n public getSofZmanKidushLevana15Days(): Temporal.ZonedDateTime {\r\n const molad: Temporal.ZonedDateTime = this.getMoladAsDate();\r\n\r\n return molad.add({ days: 15 });\r\n }\r\n\r\n /**\r\n * Returns the Daf Yomi (Bavli) for the date that the calendar is set to. See the\r\n * {@link HebrewDateFormatter#formatDafYomiBavli(Daf)} for the ability to format the daf in Hebrew or transliterated\r\n * masechta names.\r\n *\r\n * @return the daf as a {@link DafBavliYomi}\r\n */\r\n public getDafYomiBavli(): DafBavliYomi {\r\n return YomiCalculator.getDafYomiBavli(this);\r\n }\r\n\r\n /**\r\n * Returns the Daf Yomi (Yerushalmi) for the date that the calendar is set to. See the\r\n * {@link HebrewDateFormatter#formatDafYomiYerushalmi(Daf)} for the ability to format the daf in Hebrew or transliterated\r\n * masechta names.\r\n *\r\n * @return the daf as a {@link DafYomiYerushalmi}\r\n */\r\n public getDafYomiYerushalmi(): DafYomiYerushalmi | null {\r\n return YerushalmiYomiCalculator.getDafYomiYerushalmi(this);\r\n }\r\n\r\n /**\r\n * Returns the equivalent Chafetz Chayim Yomi page for the date that this is set to\r\n */\r\n public getChafetzChayimYomi() {\r\n return ChafetzChayimYomiCalculator.getChafetzChayimYomi(this);\r\n }\r\n\r\n /**\r\n\t * Returns the elapsed days since Tekufas Tishrei. This uses Tekufas Shmuel (identical to the Julian Year with a solar year length of 365.25 days).\r\n\t * The notation used below is D = days, H = hours and C = chalakim. Molad BaHaRad was 2D,5H,204C or 5H,204C from the start of Rosh Hashana year 1. For molad\r\n\t * Nissan add 177D, 4H and 438C (6 * 29D, 12H and 793C), or 177D,9H,642C after Rosh Hashana year 1.\r\n\t * Tekufas Nissan was 7D, 9H and 642C before molad Nissan according to the Rambam, or 170D, 0H and\r\n\t * 0C after Rosh Hashana year 1. Tekufas Tishrei was 182D and 3H (365.25 / 2) before tekufas\r\n\t * Nissan, or 12D and 15H before Rosh Hashana of year 1. Outside of Israel we start reciting Tal\r\n\t * Umatar in Birkas Hashanim from 60 days after tekufas Tishrei. The 60 days include the day of\r\n\t * the tekufah and the day we start reciting Tal Umatar. 60 days from the tekufah == 47D and 9H\r\n\t * from Rosh Hashana year 1.\r\n\t * \r\n\t * @return the number of elapsed days since tekufas Tishrei.\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartDate()\r\n\t * @see #isVeseinTalUmatarStartingTonight()\r\n\t * @see #isVeseinTalUmatarRecited()\r\n\t */\r\n public getTekufasTishreiElapsedDays():number {\r\n // Days since Rosh Hashana year 1. Add 1/2 day as the first tekufas tishrei was 9 hours into the day. This allows all\r\n // 4 years of the secular leap year cycle to share 47 days. Truncate 47D and 9H to 47D for simplicity.\r\n const days:number = JewishCalendar.getJewishCalendarElapsedDays(this.getJewishYear()) + (this.getDaysSinceStartOfJewishYear() - 1) + 0.5;\r\n // days of completed solar years\r\n const solar:number = (this.getJewishYear() - 1) * 365.25;\r\n return Math.floor(days - solar);\r\n }\r\n\r\n /**\r\n\t * Returns true if the current day is Isru Chag. The method returns true for the day following Pesach\r\n\t * Shavuos and Succos. It utilizes {@see #getInIsrael()} to return the proper date.\r\n\t * \r\n\t * @return true if the current day is Isru Chag. The method returns true for the day following Pesach\r\n\t * Shavuos and Succos. It utilizes {@see #getInIsrael()} to return the proper date.\r\n\t */\r\n public isIsruChag():boolean {\r\n const holidayIndex:number = this.getYomTovIndex();\r\n return holidayIndex == JewishCalendar.ISRU_CHAG;\r\n }\r\n\r\n /**\r\n * Indicates whether some other object is \"equal to\" this one.\r\n * @see Object#equals(Object)\r\n */\r\n public equals(jewishCalendar: JewishCalendar): boolean {\r\n return Temporal.PlainDate.compare(this.getDate(), jewishCalendar.getDate()) === 0 && this.getInIsrael() === jewishCalendar.getInIsrael();\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { AstronomicalCalendar } from './AstronomicalCalendar.ts';\r\nimport { JewishCalendar } from './hebrewcalendar/JewishCalendar.ts';\r\nimport { NullPointerException } from './polyfills/errors.ts';\r\nimport { Long_MIN_VALUE } from './polyfills/Utils.ts';\r\n\r\n/**\r\n * The ZmanimCalendar is a specialized calendar that can calculate sunrise, sunset and Jewish zmanim\r\n * (religious times) for prayers and other Jewish religious duties. This class contains the main functionality of the\r\n * Zmanim library. For a much more extensive list of zmanim, use the {@link ComplexZmanimCalendar} that\r\n * extends this class. See documentation for the {@link ComplexZmanimCalendar} and {@link AstronomicalCalendar} for\r\n * simple examples on using the API. \r\n * Elevation based zmanim (even sunrise and sunset) should not be used lekula without the guidance\r\n * of a posek. According to Rabbi Dovid Yehudah Bursztyn in his\r\n * Zmanim Kehilchasam, 7th edition chapter 2, section 7 (pages 181-182)\r\n * and section 9 (pages 186-187), no zmanim besides sunrise and sunset should use elevation. However, Rabbi Yechiel\r\n * Avrahom Zilber in the Birur Halacha Vol. 6 Ch. 58 Pages\r\n * 34 and\r\n * 42 is of the opinion that elevation should be\r\n * accounted for in zmanim calculations. Related to this, Rabbi Yaakov Karp in Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons should\r\n * be factored into zmanim calculations. The setting defaults to false (elevation will not be used for\r\n * zmanim calculations besides sunrise and sunset), unless the setting is changed to true in {@link\r\n * #setUseElevation(boolean)}. This will impact sunrise and sunset-based zmanim such as {@link #getSunrise()},\r\n * {@link #getSunset()}, {@link #getSofZmanShmaGRA()}, alos-based zmanim such as {@link #getSofZmanShmaMGA()}\r\n * that are based on a fixed offset of sunrise or sunset and zmanim based on a percentage of the day such as\r\n * {@link ComplexZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. Even when set to\r\n * true it will not impact zmanim that are a degree-based offset of sunrise and sunset, such as {@link\r\n * ComplexZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link ComplexZmanimCalendar#getSofZmanShmaBaalHatanya()} since\r\n * these zmanim are not linked to sunrise or sunset times (the calculations are based on the astronomical definition of\r\n * sunrise and sunset calculated in a vacuum with the solar radius above the horizon), and are therefore not impacted by the use\r\n * of elevation.\r\n * For additional information on the halachic impact of elevation on zmanim see:\r\n * Note: It is important to read the technical notes on top of the {@link AstronomicalCalculator} documentation\r\n * before using this code.\r\n *
I would like to thank Rabbi Yaakov Shakow, the\r\n * author of Luach Ikvei Hayom who spent a considerable amount of time reviewing, correcting and making suggestions on the\r\n * documentation in this library.\r\n *
true
will\r\n\t * keep the standard astronomical chatzos calculation, while setting it to false
will use half of\r\n\t * a solar day calculation for chatzos.\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t * @see #getChatzos()\r\n\t * @see #getSunTransit()\r\n\t * @see #getChatzosAsHalfDay()\r\n\t * @see #useAstronomicalChatzosForOtherZmanim\r\n\t */\r\n\tprivate useAstronomicalChatzos:boolean = true;\r\n\r\n\t/**\r\n\t * Is {@link #getSunTransit() astronomical chatzos} used for {@link #getChatzos()} for enhanced accuracy. For\r\n\t * example as the day is lengthens, the second half of the day is longer than the first and astronomical chatzos\r\n\t * would be a drop earlier than half of the time between sunrise and sunset.\r\n\t * \r\n\t * @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA()\r\n\t * Sof zman Shma GRA} would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos\r\n\t * zmaniyos would be calculated a a 6th of the time between sunrise and chatzos, as opposed to a 12th of the\r\n\t * time between sunrise and sunset. {@link #getMinchaGedola() mincha gedola} will be calculated as half a\r\n\t * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical\r\n\t * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag\r\n\t * hamincha} would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75\r\n\t * shaaos zmaniyos after sunrise. Etc.\r\n\t * \r\n\t * @return if the use of astronomical chatzos is active.\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t * @see #getChatzos()\r\n\t * @see #getSunTransit()\r\n\t * @see #getChatzosAsHalfDay()\r\n\t * @see #isUseAstronomicalChatzosForOtherZmanim()\r\n\t */\r\n\tpublic isUseAstronomicalChatzos(): boolean {\r\n\t\treturn this.useAstronomicalChatzos;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets if astronomical chatzos should be used in calculations of other zmanim for enhanced accuracy.\r\n\t * @param useAstronomicalChatzos set to true to use astronomical in chatzos in zmanim calculations.\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t * @see #getChatzos()\r\n\t * @see #getSunTransit()\r\n\t * @see #getChatzosAsHalfDay()\r\n\t * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)\r\n\t */\r\n\tpublic setUseAstronomicalChatzos(useAstronomicalChatzos: boolean) {\r\n\t\tthis.useAstronomicalChatzos = useAstronomicalChatzos;\r\n\t}\r\n\r\n\t/**\r\n\t * Is astronomical chatzos used for zmanim calculations besides chatzos itself for enhanced\r\n\t * accuracy. The default value of false
will keep the standard start to end of day calculations, while setting\r\n\t * it to true
will use half of a solar day calculation for zmanim.\r\n\t * @see #isUseAstronomicalChatzosForOtherZmanim()\r\n\t * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t * @see #getChatzos()\r\n\t */\r\n\tprivate useAstronomicalChatzosForOtherZmanim:boolean = false;\r\n\r\n\t/**\r\n\t * Is astronomical chatzos used for zmanim calculations besides chatzos itself for enhanced\r\n\t * accuracy. For example as the day is lengthening (as we approach spring season), the second half of the day is longer than\r\n\t * the first and astronomical chatzos would be a drop earlier than half of the time between sunrise and sunset.\r\n\t * Conversely, the second half of the day would be shorter in the fall season as the days start getting shorter.\r\n\t * \r\n\t * @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA()\r\n\t * Sof zman Shma GRA} would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos\r\n\t * zmaniyos would be calculated a a 6th of the time between sunrise and chatzos, as opposed to a 12th of the\r\n\t * time between sunrise and sunset. {@link #getMinchaGedola() mincha gedola} will be calculated as half a\r\n\t * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical\r\n\t * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag\r\n\t * hamincha} would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75\r\n\t * shaaos zmaniyos after sunrise. Etc.\r\n\t * \r\n\t * @return if the use of astronomical chatzos is active.\r\n\t * @see #useAstronomicalChatzosForOtherZmanim\r\n\t * @see #setUseAstronomicalChatzosForOtherZmanim(boolean)\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #setUseAstronomicalChatzos(boolean)\r\n\t */\r\n\tpublic isUseAstronomicalChatzosForOtherZmanim():boolean {\r\n\t\treturn this.useAstronomicalChatzosForOtherZmanim;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets if astronomical chatzos should be used in calculations of other zmanim for enhanced accuracy.\r\n\t * @param useAstronomicalChatzosForOtherZmanim set to true to use astronomical in chatzos in zmanim calculations.\r\n\t * @see #useAstronomicalChatzos\r\n\t * @see #isUseAstronomicalChatzos()\r\n\t */\r\n\tpublic setUseAstronomicalChatzosForOtherZmanim(useAstronomicalChatzosForOtherZmanim: boolean) {\r\n\t\tthis.useAstronomicalChatzosForOtherZmanim = useAstronomicalChatzosForOtherZmanim;\r\n\t}\r\n\r\n /**\r\n\t * The zenith of 16.1° below geometric zenith (90°). This calculation is used for determining alos\r\n\t * (dawn) and tzais (nightfall) in some opinions. It is based on the calculation that the time between dawn\r\n\t * and sunrise (and sunset to nightfall) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes\r\n\t * a mil (Rambam and others). The sun's position at\r\n\t * 72 minutes before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux is\r\n\t * 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n\t * \r\n\t * @see #getAlosHashachar()\r\n\t * @see ComplexZmanimCalendar#getAlos16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getTzais16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getSofZmanTfilaMGA16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getMinchaGedola16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getMinchaKetana16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getPlagHamincha16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getPlagAlos16Point1ToTzaisGeonim7Point083Degrees()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaAlos16Point1ToSunset()\r\n\t */\r\n protected static readonly ZENITH_16_POINT_1: number = ZmanimCalendar.GEOMETRIC_ZENITH + 16.1;\r\n\r\n /**\r\n\t * The zenith of 8.5° below geometric zenith (90°). This calculation is used for calculating alos\r\n\t * (dawn) and tzais (nightfall) in some opinions. This calculation is based on the position of the sun 36\r\n\t * minutes after {@link #getSunset sunset} in Jerusalem around the equinox / equilux, which\r\n\t * is 8.5° below {@link #GEOMETRIC_ZENITH geometric zenith}. The Ohr Meir considers this the time that 3 small stars are visible,\r\n\t * which is later than the required 3 medium stars.\r\n\t * \r\n\t * @see #getTzais()\r\n\t * @see ComplexZmanimCalendar#getTzaisGeonim8Point5Degrees()\r\n\t */\r\n protected static readonly ZENITH_8_POINT_5: number = ZmanimCalendar.GEOMETRIC_ZENITH + 8.5;\r\n\r\n /**\r\n\t * The default Shabbos candle lighting offset is 18 minutes. This can be changed via the\r\n\t * {@link #setCandleLightingOffset(double)} and retrieved by the {@link #getCandleLightingOffset()}.\r\n\t */\r\n private candleLightingOffset: number = 18;\r\n\r\n /**\r\n\t * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the\r\n\t * default), or elevation adjusted {@link AstronomicalCalendar#getSunrise()} if it is true. This allows relevant zmanim\r\n\t * in this and extending classes (such as the {@link ComplexZmanimCalendar}) to automatically adjust to the elevation setting.\r\n\t * \r\n\t * @return {@link #getSeaLevelSunrise()} if {@link #isUseElevation()} is false (the default), or elevation adjusted\r\n\t * {@link AstronomicalCalendar#getSunrise()} if it is true.\r\n\t * @see AstronomicalCalendar#getSunrise()\r\n\t */\r\n protected getElevationAdjustedSunrise(): Temporal.ZonedDateTime | null {\r\n if (this.isUseElevation()) {\r\n return super.getSunrise();\r\n }\r\n return this.getSeaLevelSunrise();\r\n }\r\n\r\n /**\r\n\t * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the default),\r\n\t * or elevation adjusted {@link AstronomicalCalendar#getSunrise()} if it is true. This allows relevant zmanim\r\n\t * in this and extending classes (such as the {@link ComplexZmanimCalendar}) to automatically adjust to the elevation setting.\r\n\t * \r\n\t * @return {@link #getSeaLevelSunset()} if {@link #isUseElevation()} is false (the default), or elevation adjusted\r\n\t * {@link AstronomicalCalendar#getSunset()} if it is true.\r\n\t * @see AstronomicalCalendar#getSunset()\r\n\t */\r\n protected getElevationAdjustedSunset(): Temporal.ZonedDateTime | null {\r\n if (this.isUseElevation()) {\r\n return super.getSunset();\r\n }\r\n return this.getSeaLevelSunset();\r\n }\r\n\r\n /**\r\n\t * A method that returns tzais (nightfall) when the sun is {@link #ZENITH_8_POINT_5 8.5°} below the\r\n\t * {@link #GEOMETRIC_ZENITH geometric horizon} (90°) after {@link #getSunset sunset}, a time that Rabbi Meir\r\n\t * Posen in his the Ohr Meir calculated that 3 small\r\n\t * stars are visible, which is later than the required 3 medium stars. See the {@link #ZENITH_8_POINT_5} constant.\r\n\t * \r\n\t * @see #ZENITH_8_POINT_5\r\n\t * \r\n\t * @return The Date
of nightfall. If the calculation can't be computed such as northern and southern\r\n\t * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n\t * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n\t * top of the {@link AstronomicalCalendar} documentation.\r\n\t * @see #ZENITH_8_POINT_5\r\n\t * ComplexZmanimCalendar#getTzaisGeonim8Point5Degrees() that returns an identical time to this generic tzais\r\n\t */\r\n public getTzais(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ZmanimCalendar.ZENITH_8_POINT_5);\r\n }\r\n\r\n /**\r\n\t * Returns alos (dawn) based on the time when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the\r\n\t * eastern {@link #GEOMETRIC_ZENITH geometric horizon} before {@link #getSunrise sunrise}. This is based on the\r\n\t * calculation that the time between dawn and sunrise (and sunset to nightfall) is 72 minutes, the time that is\r\n\t * takes to walk 4 mil at 18 minutes a mil (Rambam and others). The sun's position at 72 minutes before {@link #getSunrise sunrise} in Jerusalem\r\n\t * on the around the equinox /\r\n\t * equilux is 16.1° below {@link #GEOMETRIC_ZENITH}.\r\n\t * \r\n\t * @see #ZENITH_16_POINT_1\r\n\t * @see ComplexZmanimCalendar#getAlos16Point1Degrees()\r\n\t * \r\n\t * @return The Date
of dawn. If the calculation can't be computed such as northern and southern\r\n\t * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n\t * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n\t * top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getAlosHashachar(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ZmanimCalendar.ZENITH_16_POINT_1);\r\n }\r\n\r\n /**\r\n\t * Method to return alos (dawn) calculated using 72 minutes before {@link #getSunrise() sunrise} or\r\n\t * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This time\r\n\t * is based on the time to walk the distance of 4 Mil at 18 minutes a Mil. The 72 minute time (but\r\n\t * not the concept of fixed minutes) is based on the opinion that the time of the Neshef (twilight between\r\n\t * dawn and sunrise) does not vary by the time of year or location but depends on the time it takes to walk the\r\n\t * distance of 4 Mil.\r\n\t * \r\n\t * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n\t * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n\t * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n\t * documentation.\r\n\t */\r\n public getAlos72() {\r\n return this.getElevationAdjustedSunrise()\r\n\t\t?.subtract({ minutes: 72 });\r\n }\r\n\r\n /**\r\n\t * This method returns chatzos (midday) following most opinions that chatzos is the midpoint\r\n\t * between {@link #getSeaLevelSunrise sea level sunrise} and {@link #getSeaLevelSunset sea level sunset}. A day\r\n\t * starting at alos and ending at tzais using the same time or degree offset will also return\r\n\t * the same time. The returned value is identical to {@link #getSunTransit()}. In reality due to lengthening or\r\n\t * shortening of day, this is not necessarily the exact midpoint of the day, but it is very close.\r\n\t * \r\n\t * @see AstronomicalCalendar#getSunTransit()\r\n\t * @return the Date
of chatzos. If the calculation can't be computed such as in the Arctic Circle\r\n\t * where there is at least one day where the sun does not rise, and one where it does not set, a null will\r\n\t * be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getSunTransit();\r\n }\r\n\r\n /**\r\n\t * A generic method for calculating the latest zman krias shema (time to recite shema in the morning)\r\n\t * that is 3 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and\r\n\t * end of the day passed to this method.\r\n\t * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours),\r\n\t * and the latest zman krias shema is calculated as 3 of those shaos zmaniyos after the beginning of\r\n\t * the day. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise()\r\n\t * sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()}\r\n\t * elevation setting) to this method will return sof zman krias shema according to the opinion of the\r\n\t * GRA.\r\n\t * \r\n\t * @param startOfDay\r\n\t * the start of day for calculating zman krias shema. This can be sunrise or any alos passed\r\n\t * to this method.\r\n\t * @param endOfDay\r\n\t * the end of day for calculating zman krias shema. This can be sunset or any tzais passed to\r\n\t * this method.\r\n\t * @return the Date
of the latest zman shema based on the start and end of day times passed to this\r\n\t * method. If the calculation can't be computed such as in the Arctic Circle where there is at least one day\r\n\t * a year where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n\t * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getSofZmanShma(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 3);\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *\r\n\t * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunrise() sunrise} or\r\n\t * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according\r\n\t * to the GRA. \r\n\t * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n\t * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}\r\n\t * setting).\r\n\t * \r\n\t * @see #getSofZmanShma(Date, Date)\r\n\t * @see #getShaahZmanisGra()\r\n\t * @see #isUseElevation()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaBaalHatanya()\r\n\t * @return the Date
of the latest zman shema according to the GRA. If the calculation can't be\r\n\t * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n\t * and one where it does not set, a null will be returned. See the detailed explanation on top of the {@link\r\n\t * AstronomicalCalendar} documentation.\r\n\t */\r\n public getSofZmanShmaGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 *\r\n\t * {@link #getShaahZmanisMGA() shaos zmaniyos} (solar hours) after {@link #getAlos72()}, according to the\r\n\t * Magen Avraham (MGA). The day is calculated\r\n\t * from 72 minutes before {@link #getSeaLevelSunrise() sea level sunrise} to 72 minutes after {@link\r\n\t * #getSeaLevelSunrise sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset()\r\n\t * sunset} (depending on the {@link #isUseElevation()} setting).\r\n\t * \r\n\t * @return the Date
of the latest zman shema. If the calculation can't be computed such as in\r\n\t * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n\t * does not set, a null will be returned. See detailed explanation on top of the\r\n\t * {@link AstronomicalCalendar} documentation.\r\n\t * @see #getSofZmanShma(Date, Date)\r\n\t * @see ComplexZmanimCalendar#getShaahZmanis72Minutes()\r\n\t * @see ComplexZmanimCalendar#getAlos72()\r\n\t * @see ComplexZmanimCalendar#getSofZmanShmaMGA72Minutes() that \r\n\t */\r\n public getSofZmanShmaMGA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos72()!, this.getTzais72()!);\r\n }\r\n\r\n /**\r\n\t * This method returns the tzais (nightfall) based on the opinion of Rabbeinu Tam that\r\n\t * tzais hakochavim is calculated as 72 minutes, the time it takes to walk 4 Mil at 18 minutes\r\n\t * a Mil. According to the Machtzis Hashekel in\r\n\t * Orach Chaim 235:3, the Pri Megadim in Orach\r\n\t * Chaim 261:2 (see the Biur Halacha) and others (see Hazmanim Bahalacha 17:3 and 17:5) the 72 minutes are standard\r\n\t * clock minutes any time of the year in any location. Depending on the {@link #isUseElevation()} setting) a 72\r\n\t * minute offset from either {@link #getSunset() sunset} or {@link #getSeaLevelSunset() sea level sunset} is used.\r\n\t * \r\n\t * @see ComplexZmanimCalendar#getTzais16Point1Degrees()\r\n\t * @return the Date
representing 72 minutes after sunset. If the calculation can't be\r\n\t * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n\t * and one where it does not set, a null will be returned See detailed explanation on top of the\r\n\t * {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getTzais72() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 72 })\r\n }\r\n\r\n /**\r\n\t * A method to return candle lighting time, calculated as {@link #getCandleLightingOffset()} minutes before\r\n\t * {@link #getSeaLevelSunset() sea level sunset}. This will return the time for any day of the week, since it can be\r\n\t * used to calculate candle lighting time for Yom Tov (mid-week holidays) as well. Elevation adjustments\r\n\t * are intentionally not performed by this method, but you can calculate it by passing the elevation adjusted sunset\r\n\t * to {@link #getTimeOffset(Date, long)}.\r\n\t * \r\n\t * @return candle lighting time. If the calculation can't be computed such as in the Arctic Circle where there is at\r\n\t * least one day a year where the sun does not rise, and one where it does not set, a null will be returned.\r\n\t * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t * \r\n\t * @see #getSeaLevelSunset()\r\n\t * @see #getCandleLightingOffset()\r\n\t * @see #setCandleLightingOffset(double)\r\n\t */\r\n public getCandleLighting() {\r\n return this.getSeaLevelSunset()?.subtract({ minutes: this.getCandleLightingOffset() });\r\n }\r\n\r\n /**\r\n\t * A generic method for calculating the latest zman tfilah (time to recite the morning prayers)\r\n\t * that is 4 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and\r\n\t * end of the day passed to this method.\r\n\t * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours),\r\n\t * and sof zman tfila is calculated as 4 of those shaos zmaniyos after the beginning of the day.\r\n\t * As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise()\r\n\t * sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()}\r\n\t * elevation setting) to this method will return zman tfilah according to the opinion of the GRA.\r\n\t * \r\n\t * @param startOfDay\r\n\t * the start of day for calculating zman tfilah. This can be sunrise or any alos passed\r\n\t * to this method.\r\n\t * @param endOfDay\r\n\t * the end of day for calculating zman tfilah. This can be sunset or any tzais passed\r\n\t * to this method.\r\n\t * @return the Date
of the latest zman tfilah based on the start and end of day times passed\r\n\t * to this method. If the calculation can't be computed such as in the Arctic Circle where there is at least\r\n\t * one day a year where the sun does not rise, and one where it does not set, a null will be returned. See\r\n\t * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t */\r\n public getSofZmanTfila(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 4);\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *\r\n\t * {@link #getShaahZmanisGra() shaos zmaniyos }(solar hours) after {@link #getSunrise() sunrise} or\r\n\t * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according\r\n\t * to the GRA. \r\n\t * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n\t * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}\r\n\t * setting).\r\n\t * \r\n\t * @see #getSofZmanTfila(Date, Date)\r\n\t * @see #getShaahZmanisGra()\r\n\t * @see ComplexZmanimCalendar#getSofZmanTfilaBaalHatanya()\r\n\t * @return the Date
of the latest zman tfilah. If the calculation can't be computed such as in\r\n\t * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n\t * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n\t * documentation.\r\n\t */\r\n public getSofZmanTfilaGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n\t * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 *\r\n\t * {@link #getShaahZmanisMGA() shaos zmaniyos} (solar hours) after {@link #getAlos72()}, according to the\r\n\t * Magen Avraham (MGA). The day is calculated\r\n\t * from 72 minutes before {@link #getSeaLevelSunrise() sea level sunrise} to 72 minutes after {@link\r\n\t * #getSeaLevelSunrise sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset()\r\n\t * sunset} (depending on the {@link #isUseElevation()} setting).\r\n\t * \r\n\t * @return the Date
of the latest zman tfila. If the calculation can't be computed such as in\r\n\t * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n\t * does not set), a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n\t * documentation.\r\n\t * @see #getSofZmanTfila(Date, Date)\r\n\t * @see #getShaahZmanisMGA()\r\n\t * @see #getAlos72()\r\n\t */\r\n public getSofZmanTfilaMGA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos72()!, this.getTzais72()!);\r\n }\r\n\r\n /**\r\n\t * A generic method for calculating the latest mincha gedola (the earliest time to recite the mincha prayers)\r\n\t * that is 6.5 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end\r\n\t * of the day passed to this method.\r\n\t * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n\t * mincha gedola is calculated as 6.5 of those shaos zmaniyos after the beginning of the day. As an\r\n\t * example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n * setting) to this method will return mincha gedola according to the opinion of the\r\n * GRA.\r\n * \r\n * @param startOfDay\r\n * the start of day for calculating Mincha gedola. This can be sunrise or any alos passed\r\n * to this method.\r\n * @param endOfDay\r\n * the end of day for calculating Mincha gedola. This can be sunset or any tzais passed\r\n * to this method.\r\n * @return the Date
of the time of Mincha gedola based on the start and end of day times\r\n * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedola(startOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunrise(), endOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunset()): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 6.5);\r\n }\r\n\r\n /**\r\n\t * A generic method for calculating samuch lemincha ketana, / near mincha ketana time that is half\r\n\t * an hour before {@link #getMinchaKetana(Date, Date)} or 9 * shaos zmaniyos (temporal hours) after the\r\n\t * start of the day, calculated using the start and end of the day passed to this method.\r\n\t * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n\t * samuch lemincha ketana is calculated as 9 of those shaos zmaniyos after the beginning of the day.\r\n\t * For example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea\r\n\t * level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n\t * setting) to this method will return samuch lemincha ketana according to the opinion of the\r\n\t * GRA.\r\n\t * \r\n\t * @param startOfDay\r\n\t * the start of day for calculating samuch lemincha ketana. This can be sunrise or any alos\r\n\t * passed to to this method.\r\n\t * @param endOfDay\r\n\t * the end of day for calculating samuch lemincha ketana. This can be sunset or any tzais\r\n\t * passed to this method.\r\n\t * @return the Date
of the time of Mincha ketana based on the start and end of day times\r\n\t * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n\t * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n\t * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n\t *\r\n\t * @see ComplexZmanimCalendar#getSamuchLeMinchaKetanaGRA()\r\n\t * @see ComplexZmanimCalendar#getSamuchLeMinchaKetana16Point1Degrees()\r\n\t * @see ComplexZmanimCalendar#getSamuchLeMinchaKetana72Minutes()\r\n\t */\r\n public getSamuchLeMinchaKetana(startOfDay: Temporal.ZonedDateTime, endOfDay: Temporal.ZonedDateTime): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 9);\r\n }\r\n\r\n /**\r\n * A generic method for calculating mincha ketana, (the preferred time to recite the mincha prayers in\r\n * the opinion of the Rambam and others) that is\r\n * 9.5 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end\r\n * of the day passed to this method.\r\n * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n * mincha ketana is calculated as 9.5 of those shaos zmaniyos after the beginning of the day. As an\r\n * example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n * setting) to this method will return mincha ketana according to the opinion of the\r\n * GRA.\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating Mincha ketana. This can be sunrise or any alos passed to\r\n * this method.\r\n * @param endOfDay\r\n * the end of day for calculating Mincha ketana. This can be sunrise or any alos passed to\r\n * this method.\r\n * @return the Date
of the time of Mincha ketana based on the start and end of day times\r\n * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaKetana(startOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunrise(), endOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunset()): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 9.5);\r\n }\r\n\r\n /**\r\n * A generic method for calculating plag hamincha (the earliest time that Shabbos can be started) that is\r\n * 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\r\n * the day passed to the method.\r\n * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and\r\n * plag hamincha is calculated as 10.75 of those shaos zmaniyos after the beginning of the day. As an\r\n * example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation\r\n * setting) to this method will return plag mincha according to the opinion of the\r\n * GRA.\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating plag. This can be sunrise or any alos passed to this method.\r\n * @param endOfDay\r\n * the end of day for calculating plag. This can be sunrise or any alos passed to this method.\r\n * @return the Date
of the time of plag hamincha based on the start and end of day times\r\n * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha(startOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunrise(), endOfDay: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunset()): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(startOfDay, endOfDay, 10.75);\r\n }\r\n\r\n /**\r\n * This method returns plag hamincha, that is 10.75 * {@link #getShaahZmanisGra() shaos zmaniyos}\r\n * (solar hours) after {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on\r\n * the {@link #isUseElevation()} setting), according to the GRA. Plag hamincha is the earliest time that Shabbos can be started.\r\n * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}\r\n *\r\n * @see #getPlagHamincha(Date, Date)\r\n * @see ComplexZmanimCalendar#getPlagHaminchaBaalHatanya()\r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n\r\n /*\r\n public getPlagHamincha(): Date {\r\n return this.getPlagHamincha(this.getSeaLevelSunrise(), this.getSeaLevelSunset());\r\n }\r\n */\r\n\r\n /**\r\n * A method that returns a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}) according to\r\n * the opinion of the GRA. This calculation divides\r\n * the day based on the opinion of the GRA that the day runs from from {@link #getSeaLevelSunrise() sea\r\n * level sunrise} to {@link #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to\r\n * {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} setting). The day is split into 12 equal\r\n * parts with each one being a shaah zmanis. This method is similar to {@link #getTemporalHour}, but can\r\n * account for elevation.\r\n *\r\n * @return the long
millisecond length of a shaah zmanis calculated from sunrise to sunset.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, {@link Long#MIN_VALUE} will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTemporalHour(Date, Date)\r\n * @see #getSeaLevelSunrise()\r\n * @see #getSeaLevelSunset()\r\n * @see ComplexZmanimCalendar#getShaahZmanisBaalHatanya()\r\n */\r\n public getShaahZmanisGra() {\r\n return this.getTemporalHour(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n * A method that returns a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on a 72 minutes alos\r\n * and tzais. This calculation divides the day that runs from dawn to dusk (for sof zman krias shema and tfila).\r\n * Dawn for this calculation is 72 minutes before {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level\r\n * sunrise} (depending on the {@link #isUseElevation()} elevation setting) and dusk is 72 minutes after {@link #getSunset\r\n * sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation setting).\r\n * This day is split into 12 equal parts with each part being a shaah zmanis. Alternate methods of calculating a\r\n * shaah zmanis according to the Magen Avraham (MGA) are available in the subclass {@link ComplexZmanimCalendar}.\r\n *\r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanisMGA() {\r\n return this.getTemporalHour(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default\r\n * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date.\r\n *\r\n * @see AstronomicalCalendar#AstronomicalCalendar()\r\n */\r\n\r\n /*\r\n public ZmanimCalendar() {\r\n super();\r\n }\r\n */\r\n\r\n /**\r\n * A constructor that takes a {@link GeoLocation} as a parameter.\r\n *\r\n * @param location\r\n * the location\r\n */\r\n\r\n /*\r\n constructor(location?: GeoLocation) {\r\n super(location);\r\n }\r\n */\r\n\r\n /**\r\n * A method to get the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea level sunset} which\r\n * is used in calculating candle lighting time. The default time used is 18 minutes before sea level sunset. Some\r\n * calendars use 15 minutes, while the custom in Jerusalem is to use a 40 minute offset. Please check the local custom\r\n * for candle lighting time.\r\n *\r\n * @return Returns the currently set candle lighting offset in minutes.\r\n * @see #getCandleLighting()\r\n * @see #setCandleLightingOffset(double)\r\n */\r\n public getCandleLightingOffset(): number {\r\n return this.candleLightingOffset;\r\n }\r\n\r\n /**\r\n * A method to set the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea level sunset} that is\r\n * used in calculating candle lighting time. The default time used is 18 minutes before sunset. Some calendars use 15\r\n * minutes, while the custom in Jerusalem is to use a 40 minute offset.\r\n *\r\n * @param candleLightingOffset\r\n * The candle lighting offset to set in minutes.\r\n * @see #getCandleLighting()\r\n * @see #getCandleLightingOffset()\r\n */\r\n public setCandleLightingOffset(candleLightingOffset: number): void {\r\n this.candleLightingOffset = candleLightingOffset;\r\n }\r\n\r\n // eslint-disable-next-line class-methods-use-this\r\n public getClassName() {\r\n return 'com.kosherjava.zmanim.ZmanimCalendar';\r\n }\r\n\r\n /**\r\n * This is a utility method to determine if the current Date (date-time) passed in has a melacha (work) prohibition.\r\n * Since there are many opinions on the time of tzais, the tzais for the current day has to be passed to this\r\n * class. Sunset is the classes current day's {@link #getElevationAdjustedSunset() elevation adjusted sunset} that observes the\r\n * {@link #isUseElevation()} settings. The {@link JewishCalendar#getInIsrael()} will be set by the inIsrael parameter.\r\n *\r\n * @param currentTime the current time\r\n * @param tzais the time of tzais\r\n * @param inIsrael whether to use Israel holiday scheme or not\r\n *\r\n * @return true if melacha is prohibited or false if it is not.\r\n *\r\n * @see JewishCalendar#isAssurBemelacha()\r\n * @see JewishCalendar#hasCandleLighting()\r\n * @see JewishCalendar#setInIsrael(boolean)\r\n */\r\n public isAssurBemlacha(currentTime: Temporal.ZonedDateTime, tzais: Temporal.ZonedDateTime, inIsrael: boolean): boolean {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar();\r\n const date = this.getDate();\r\n jewishCalendar.setGregorianDate(date.year, date.month - 1, date.day);\r\n jewishCalendar.setInIsrael(inIsrael);\r\n\r\n // erev shabbos, YT or YT sheni and after shkiah\r\n const sunset = this.getElevationAdjustedSunset();\r\n if (!sunset) throw new NullPointerException();\r\n if (jewishCalendar.hasCandleLighting() && currentTime >= sunset) {\r\n return true;\r\n }\r\n\r\n // is shabbos or YT and it is before tzais\r\n return jewishCalendar.isAssurBemelacha() && currentTime <= tzais;\r\n }\r\n\r\n /**\r\n * A generic utility method for calculating any shaah zmanis (temporal hour) based zman with the\r\n * day defined as the start and end of day (or night) and the number of shaahos zmaniyos passed to the\r\n * method. This simplifies the code in other methods such as {@link #getPlagHamincha(Date, Date)} and cuts down on\r\n * code replication. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link\r\n * #getSeaLevelSunrise() sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the\r\n * {@link #isUseElevation()} elevation setting) and 10.75 hours to this method will return plag mincha\r\n * according to the opinion of the GRA.\r\n *\r\n * @param startOfDay\r\n * the start of day for calculating the zman. This can be sunrise or any alos passed\r\n * to this method.\r\n * @param endOfDay\r\n * the end of day for calculating the zman. This can be sunrise or any alos passed to\r\n * this method.\r\n * @param hours\r\n * the number of shaahos zmaniyos (temporal hours) to offset from the start of day\r\n * @return the Date
of the time of zman with the shaahos zmaniyos (temporal hours)\r\n * in the day offset from the start of day passed to this method. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the {@link\r\n * AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanisBasedZman(startOfDay: Temporal.ZonedDateTime | null, endOfDay: Temporal.ZonedDateTime | null, hours: number): Temporal.ZonedDateTime | null {\r\n const shaahZmanis = this.getTemporalHour(startOfDay, endOfDay)!;\r\n\r\n\tlet builtTime = startOfDay!;\r\n\tfor (let index = 0; index < hours; index++) {\r\n\t\tbuiltTime = builtTime.add(shaahZmanis)\r\n\t}\r\n return builtTime\r\n }\r\n\r\n /**\r\n\t * A utility method that returns the percentage of a shaah zmanis after sunset (or before sunrise) for a given degree\r\n\t * offset. For the equilux where there\r\n\t * is a 720-minute day, passing 16.1° for the location of Jerusalem will return about 1.2. This will work for any location\r\n\t * or date, but will typically only be of interest at the equinox/equilux to calculate the percentage of a shaah zmanis\r\n\t * for those who want to use the Minchas Cohen in Ma'amar 2:4\r\n\t * and the Pri Chadash who calculate tzais as a percentage\r\n\t * of the day after sunset. While the Minchas Cohen only applies this to 72 minutes or a 1/10 of the day around the world (based\r\n\t * on the equinox / equilux in Israel), this method allows calculations for any degrees level for any location.\r\n\t * \r\n\t * @param degrees\r\n\t * the number of degrees below the horizon after sunset.\r\n\t * @param sunset\r\n\t * if true
the calculation should be degrees after sunset, or if false
, degrees before sunrise.\r\n\t * @return the double
percentage of a sha'ah zmanis for a given set of degrees below the astronomical horizon\r\n\t * for the current calendar. If the calculation can't be computed a {@link Double#MIN_VALUE} will be returned. See detailed\r\n\t * explanation on top of the page.\r\n\t */\r\n\tpublic getPercentOfShaahZmanisFromDegrees(degrees:number, sunset: boolean):number|null {\r\n\t\tconst seaLevelSunrise: Temporal.ZonedDateTime | null = this.getSeaLevelSunrise();\r\n\t\tconst seaLevelSunset: Temporal.ZonedDateTime | null = this.getSeaLevelSunset();\r\n\t\tlet twilight: Temporal.ZonedDateTime | null = null;\r\n\t\tif (sunset) {\r\n\t\t\ttwilight = this.getSunsetOffsetByDegrees(ZmanimCalendar.GEOMETRIC_ZENITH + degrees);\r\n\t\t} else {\r\n\t\t\ttwilight = this.getSunriseOffsetByDegrees(ZmanimCalendar.GEOMETRIC_ZENITH + degrees);\r\n\t\t}\r\n\t\tif (seaLevelSunrise == null || seaLevelSunset == null || twilight == null) {\r\n\t\t\treturn Long_MIN_VALUE;\r\n\t\t}\r\n\t\tconst shaahZmanis = seaLevelSunrise.until(seaLevelSunset).total('nanoseconds') / 12;\r\n\t\tlet riseSetToTwilight;\r\n\t\tif (sunset) {\r\n\t\t\triseSetToTwilight = seaLevelSunset.until(twilight).total('nanoseconds');\r\n\t\t} else {\r\n\t\t\triseSetToTwilight = twilight.until(seaLevelSunrise).total('nanoseconds');\r\n\t\t}\r\n\t\treturn riseSetToTwilight / shaahZmanis;\r\n\t}\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { Calendar, TimeZone } from './polyfills/Utils.ts';\r\nimport { GeoLocation } from './util/GeoLocation.ts';\r\nimport { ZmanimCalendar } from './ZmanimCalendar.ts';\r\nimport { JewishCalendar } from './hebrewcalendar/JewishCalendar.ts';\r\n\r\nconst rZTDsort: typeof Temporal.ZonedDateTime.compare = (a,b) => {\r\n\tconst pSort = Temporal.ZonedDateTime.compare(a, b);\r\n\treturn pSort * -1 as Temporal.ComparisonResult;\r\n}\r\n\r\n/**\r\n * This class extends ZmanimCalendar and provides many more zmanim than available in the ZmanimCalendar. The basis\r\n * for most zmanim in this class are from the sefer Yisroel\r\n * Vehazmanim by Rabbi Yisrael Dovid Harfenes.\r\n * As an example of the number of different zmanim made available by this class, there are methods to return 18\r\n * different calculations for alos (dawn), 18 for plag hamincha and 29 for tzais available in this\r\n * API. The real power of this API is the ease in calculating zmanim that are not part of the library. The methods for\r\n * zmanim calculations not present in this class or it's superclass {@link ZmanimCalendar} are contained in the\r\n * {@link AstronomicalCalendar}, the base class of the calendars in our API since they are generic methods for calculating\r\n * time based on degrees or time before or after {@link #getSunrise sunrise} and {@link #getSunset sunset} and are of interest\r\n * for calculation beyond zmanim calculations. Here are some examples.\r\n *
First create the Calendar for the location you would like to calculate:\r\n * \r\n *
\r\n * String locationName = "Lakewood, NJ";\r\n * double latitude = 40.0828; // Lakewood, NJ\r\n * double longitude = -74.2094; // Lakewood, NJ\r\n * double elevation = 20; // optional elevation correction in Meters\r\n * // the String parameter in getTimeZone() has to be a valid timezone listed in\r\n * // {@link java.util.TimeZone#getAvailableIDs()}\r\n * TimeZone timeZone = TimeZone.getTimeZone("America/New_York");\r\n * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);\r\n * ComplexZmanimCalendar czc = new ComplexZmanimCalendar(location);\r\n * // Optionally set the date or it will default to today's date\r\n * czc.getCalendar().set(Calendar.MONTH, Calendar.FEBRUARY);\r\n * czc.getCalendar().set(Calendar.DAY_OF_MONTH, 8);\r\n *
\r\n * Note: For locations such as Israel where the beginning and end of daylight savings time can fluctuate from\r\n * year to year, if your version of Java does not have an up to date timezone database, create a\r\n * {@link java.util.SimpleTimeZone} with the known start and end of DST.\r\n * To get alos calculated as 14° below the horizon (as calculated in the calendars published in Montreal),\r\n * add {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90) to the 14° offset to get the desired time:\r\n *
\r\n *
\r\n * Date alos14 = czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 14);\r\n *
\r\n * To get mincha gedola calculated based on the Magen Avraham (MGA) using a shaah zmanis based on the day starting\r\n * 16.1° below the horizon (and ending 16.1° after sunset) the following calculation can be used:\r\n * \r\n *
\r\n * Date minchaGedola = czc.getTimeOffset(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees() * 6.5);\r\n *
\r\n * or even simpler using the included convenience methods\r\n *
\r\n * Date minchaGedola = czc.getMinchaGedola(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees());\r\n *
\r\n * A little more complex example would be calculating zmanim that rely on a shaah zmanis that is\r\n * not present in this library. While a drop more complex, it is still rather easy. An example would be to calculate\r\n * the Trumas Hadeshen's alos to\r\n * tzais based plag hamincha as calculated in the Machzikei Hadass calendar in Manchester, England.\r\n * A number of this calendar's zmanim are calculated based on a day starting at alos of 12° before\r\n * sunrise and ending at tzais of 7.083° after sunset. Be aware that since the alos and tzais\r\n * do not use identical degree-based offsets, this leads to chatzos being at a time other than the\r\n * {@link #getSunTransit() solar transit} (solar midday). To calculate this zman, use the following steps. Note\r\n * that plag hamincha is 10.75 hours after the start of the day, and the following steps are all that it takes.\r\n *
\r\n *
\r\n * Date plag = czc.getPlagHamincha(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),\r\n * \t\t\t\tczc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));\r\n *
\r\n * Something a drop more challenging, but still simple, would be calculating a zman using the same \"complex\"\r\n * offset day used in the above mentioned Manchester calendar, but for a shaos zmaniyos based zman not\r\n * supported by this library, such as calculating the point that one should be makpid\r\n * not to eat on erev Shabbos or erev Yom Tov. This is 9 shaos zmaniyos into the day.\r\n *
\r\n * long shaahZmanis = czc.getTemporalHour(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),\r\n * \t\t\t\t\t\tczc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));\r\n * Date sofZmanAchila = getTimeOffset(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),\r\n * \t\t\t\t\tshaahZmanis * 9);\r\n *
\r\n * Calculating this sof zman achila according to the GRA\r\n * is simplicity itself.\r\n *
\r\n * Date sofZamnAchila = czc.getTimeOffset(czc.getSunrise(), czc.getShaahZmanisGra() * 9);\r\n * \r\n *
long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis19Point8Degrees() {\r\n return this.getTemporalHour(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a 18° dip. This calculation divides\r\n * the day based on the opinion of the Magen Avraham\r\n * (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is 18° below the\r\n * eastern geometric horizon before sunrise. Dusk for this is when the sun is 18° below the western geometric\r\n * horizon after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis18Degrees() {\r\n return this.getTemporalHour(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 26°. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is\r\n * {@link #getAlos26Degrees() 26°} below the eastern geometric horizon before sunrise. Dusk for this is when\r\n * the sun is {@link #getTzais26Degrees() 26°} below the western geometric horizon after sunset. This day is\r\n * split into 12 equal parts with each part being a shaah zmanis. Since zmanim that use this\r\n * method are extremely late or early and at a point when the sky is a long time past the 18° point where the\r\n * darkest point is reached, zmanim that use this should only be used lechumra, such as\r\n * delaying the start of nighttime mitzvos.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis120Minutes()\r\n */\r\n public getShaahZmanis26Degrees() {\r\n return this.getTemporalHour(this.getAlos26Degrees(), this.getTzais26Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 16.1°. This calculation\r\n * divides the day based on the opinion that the day runs from dawn to dusk. Dawn for this calculation is when the\r\n * sun is 16.1° below the eastern geometric horizon before sunrise and dusk is when the sun is 16.1° below\r\n * the western geometric horizon after sunset. This day is split into 12 equal parts with each part being a\r\n * shaah zmanis.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzais16Point1Degrees()\r\n * @see #getSofZmanShmaMGA16Point1Degrees()\r\n * @see #getSofZmanTfilaMGA16Point1Degrees()\r\n * @see #getMinchaGedola16Point1Degrees()\r\n * @see #getMinchaKetana16Point1Degrees()\r\n * @see #getPlagHamincha16Point1Degrees()\r\n */\r\n\r\n public getShaahZmanis16Point1Degrees() {\r\n return this.getTemporalHour(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (solar hour) according to the opinion of the Magen Avraham (MGA). This calculation\r\n * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is\r\n * 60 minutes before sunrise and dusk is 60 minutes after sunset. This day is split into 12 equal parts with each\r\n * part being a shaah zmanis. Alternate methods of calculating a shaah zmanis are available in the\r\n * subclass {@link ComplexZmanimCalendar}.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos60()\r\n * @see #getTzais60()\r\n * @see #getPlagHamincha60Minutes()\r\n */\r\n public getShaahZmanis60Minutes() {\r\n return this.getTemporalHour(this.getAlos60(), this.getTzais60());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (solar hour) according to the opinion of the Magen Avraham (MGA). This calculation divides the day\r\n * based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 72 minutes\r\n * before sunrise and dusk is 72 minutes after sunset. This day is split into 12 equal parts with each part\r\n * being a shaah zmanis. Alternate methods of calculating a shaah zmanis are available in the\r\n * subclass {@link ComplexZmanimCalendar}.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis72Minutes() {\r\n return this.getShaahZmanisMGA();\r\n }\r\n\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being\r\n * {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation\r\n * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation\r\n * is 72 minutes zmaniyos before sunrise and dusk is 72 minutes zmaniyos after sunset. This day\r\n * is split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/10th of the day\r\n * from {@link #getSunrise() sunrise} to {@link #getSunset() sunset}.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzais72Zmanis()\r\n */\r\n public getShaahZmanis72MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 90 minutes. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes before sunrise\r\n * and dusk is 90 minutes after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis90Minutes() {\r\n return this.getTemporalHour(this.getAlos90(), this.getTzais90());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being\r\n * {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides\r\n * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes\r\n * zmaniyos before sunrise and dusk is 90 minutes zmaniyos after sunset. This day is split into 12 equal\r\n * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link #getSunrise() sunrise} to\r\n * {@link #getSunset() sunset}.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos90Zmanis()\r\n * @see #getTzais90Zmanis()\r\n */\r\n public getShaahZmanis90MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link\r\n * #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides the\r\n * day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes\r\n * zmaniyos before sunrise and dusk is 96 minutes zmaniyos after sunset. This day is split into 12\r\n * equal parts with each part being a shaah zmanis. This is identical to 1/7.5th of the day from\r\n * {@link #getSunrise() sunrise} to {@link #getSunset() sunset}.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos96Zmanis()\r\n * @see #getTzais96Zmanis()\r\n */\r\n public getShaahZmanis96MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the\r\n * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculated with alos being 1/10th\r\n * of sunrise to sunset day, or {@link #getAlos72Zmanis() 72} minutes zmaniyos of such a day before\r\n * {@link #getSunrise() sunrise}, and tzais is usually calculated as {@link #getTzaisAteretTorah() 40\r\n * minutes} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}) after {@link #getSunset()\r\n * sunset}. This day is split into 12 equal parts with each part being a shaah zmanis. Note that with this\r\n * system, chatzos (mid-day) will not be the point that the sun is {@link #getSunTransit() halfway across\r\n * the sky}.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getShaahZmanisAteretTorah() {\r\n return this.getTemporalHour(this.getAlos72Zmanis(), this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of\r\n * Rabbi Yaakov Moshe Hillel as published in the\r\n * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before\r\n * sunrise in degrees {@link #getAlos16Point1Degrees() alos 16.1°} and ending 14 minutes after sunset in\r\n * degrees {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°}. This day is split into 12 equal parts with\r\n * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point\r\n * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha\r\n * Ketana and Plag Hamincha. The 14 minutes are based on 3/4 of an 18 minute mil, with half a minute\r\n * added for Rav Yosi.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getMinchaKetanaAhavatShalom()\r\n * @see #getPlagAhavatShalom()\r\n */\r\n public getShaahZmanisAlos16Point1ToTzais3Point8() {\r\n return this.getTemporalHour(this.getAlos16Point1Degrees(), this.getTzaisGeonim3Point8Degrees());\r\n }\r\n \r\n /**\r\n * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of\r\n * Rabbi Yaakov Moshe Hillel as published in the\r\n * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before\r\n * sunrise in degrees {@link #getAlos16Point1Degrees() alos 16.1°} and ending 13.5 minutes after sunset in\r\n * degrees {@link #getTzaisGeonim3Point7Degrees() tzais 3.7°}. This day is split into 12 equal parts with\r\n * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point\r\n * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha\r\n * Gedola calculation.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getMinchaGedolaAhavatShalom()\r\n */\r\n public getShaahZmanisAlos16Point1ToTzais3Point7() {\r\n return this.getTemporalHour(this.getAlos16Point1Degrees(), this.getTzaisGeonim3Point7Degrees());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 96 minutes. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes before sunrise\r\n * and dusk is 96 minutes after sunset. This day is split into 12 equal parts with each part being a shaah\r\n * zmanis.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getShaahZmanis96Minutes() {\r\n return this.getTemporalHour(this.getAlos96(), this.getTzais96());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) calculated using a dip of 120 minutes. This calculation\r\n * divides the day based on the opinion of the Magen\r\n * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is 120 minutes before sunrise and\r\n * dusk is 120 minutes after sunset. This day is split into 12 equal parts with each part being a shaah zmanis.\r\n * Since zmanim that use this method are extremely late or early and at a point when the sky is a long time\r\n * past the 18° point where the darkest point is reached, zmanim that use this should only be used\r\n * lechumra only, such as delaying the start of nighttime mitzvos.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis26Degrees()\r\n */\r\n public getShaahZmanis120Minutes() {\r\n return this.getTemporalHour(this.getAlos120(), this.getTzais120());\r\n }\r\n\r\n /**\r\n * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link\r\n * #getAlos120Zmanis() 120} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides\r\n * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is\r\n * 120 minutes zmaniyos before sunrise and dusk is 120 minutes zmaniyos after sunset. This day is\r\n * split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/6th of the day from\r\n * {@link #getSunrise() sunrise} to {@link #getSunset() sunset}. Since zmanim that use this method are\r\n * extremely late or early and at a point when the sky is a long time past the 18° point where the darkest point\r\n * is reached, zmanim that use this should only be used lechumra such as delaying the start of\r\n * nighttime mitzvos.\r\n * \r\n * @return the long
millisecond length of a shaah zmanis. If the calculation can't be computed\r\n * such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos120Zmanis()\r\n * @see #getTzais120Zmanis()\r\n */\r\n public getShaahZmanis120MinutesZmanis() {\r\n return this.getTemporalHour(this.getAlos120Zmanis(), this.getTzais120Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on sunrise\r\n * being 120 minutes zmaniyos or 1/6th of the day before sunrise. This is calculated as 10.75 hours after\r\n * {@link #getAlos120Zmanis() dawn}. The formula used is 10.75 * {@link #getShaahZmanis120MinutesZmanis()} after\r\n * {@link #getAlos120Zmanis() dawn}. Since the zman based on an extremely early alos and a very\r\n * late tzais, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis120MinutesZmanis()\r\n * @see #getAlos120()\r\n * @see #getTzais120()\r\n * @see #getPlagHamincha26Degrees()\r\n * @see #getPlagHamincha120Minutes()\r\n */\r\n public getPlagHamincha120MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos120Zmanis(), this.getTzais120Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the\r\n * Magen Avraham with the day starting 120 minutes before sunrise and ending 120 minutes after sunset. This is\r\n * calculated as 10.75 hours after {@link #getAlos120() dawn 120 minutes}. The formula used is 10.75 {@link\r\n * #getShaahZmanis120Minutes()} after {@link #getAlos120()}. Since the zman based on an extremely early\r\n * alos and a very late tzais, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis120Minutes()\r\n * @see #getPlagHamincha26Degrees()\r\n */\r\n public getPlagHamincha120Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos120(), this.getTzais120());\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated as 60 minutes before sunrise. This is the time to walk the \r\n * distance of 4 Mil at 15 minutes a Mil. This seems to be the opinion of the Chavas Yair in the Mekor Chaim, Orach Chaim Ch.\r\n * 90, though the Mekor Chaim in Ch. 58 and in the Chut Hashani Cha 97 states that\r\n * a a person walks 3 and a 1/3 mil in an hour, or an 18-minute mil. Also see the Divrei Malkiel Vol. 4, Ch. 20, page 34) who\r\n * mentions the 15 minute mil lechumra by baking matzos. Also see the Maharik Ch. 173 where the questioner quoting the\r\n * Ra'avan is of the opinion that the time to walk a\r\n * mil is 15 minutes (5 mil in a little over an hour). There are many who believe that there is a\r\n * ta'us sofer (scribe's error) in the Ra'avan, and it should 4 mil in a little over an hour, or an\r\n * 18-minute mil. Time based offset calculations are based on the opinion of the\r\n * Rishonim who stated that the time of the neshef\r\n * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it takes to\r\n * walk the distance of 4* mil. {@link #getTzaisGeonim9Point75Degrees()} is a related zman that is a\r\n * degree-based calculation based on 60 minutes.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}.\r\n * documentation.\r\n *\r\n * @see #getTzais60()\r\n * @see #getPlagHamincha60Minutes()\r\n * @see #getShaahZmanis60Minutes()\r\n */\r\n public getAlos60() {\r\n return this.getSunrise()?.subtract({ minutes: 60 })\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 72 minutes zmaniyos or 1/10th of the day before\r\n * sunrise. This is based on an 18-minute Mil so the time for 4 Mil is 72 minutes which is 1/10th\r\n * of a day (12 * 60 = 720) based on the a day being from {@link #getSeaLevelSunrise() sea level sunrise} to\r\n * {@link #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset}\r\n * (depending on the {@link #isUseElevation()} setting).\r\n * The actual calculation is {@link #getSeaLevelSunrise()} - ({@link #getShaahZmanisGra()} * 1.2). This calculation\r\n * is used in the calendars published by the Hisachdus Harabanim D'Artzos Habris Ve'Canada.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getShaahZmanisGra()\r\n */\r\n public getAlos72Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-1.2);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 96 minutes before before {@link #getSunrise() sunrise} or\r\n * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting) that is based\r\n * on the time to walk the distance of 4 Mil at 24 minutes a Mil. Time based offset\r\n * calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef (time between dawn and sunrise) does not vary\r\n * by the time of year or location but purely depends on the time it takes to walk the distance of 4 Mil.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getAlos96() {\r\n return this.getElevationAdjustedSunrise()?.subtract({ minutes: 96 });\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 90 minutes zmaniyos or 1/8th of the day before\r\n * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link\r\n * #isUseElevation()} setting). This is based on a 22.5-minute Mil so the time for 4 Mil is 90\r\n * minutes which is 1/8th of a day (12 * 60) / 8 = 90\r\n * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}.\r\n * The actual calculation used is {@link #getSunrise()} - ({@link #getShaahZmanisGra()} * 1.5).\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getShaahZmanisGra()\r\n */\r\n public getAlos90Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-1.5);\r\n }\r\n\r\n /**\r\n * This method returns alos (dawn) calculated using 96 minutes zmaniyos or 1/7.5th of the day before\r\n * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link\r\n * #isUseElevation()} setting). This is based on a 24-minute Mil so the time for 4 Mil is 96\r\n * minutes which is 1/7.5th of a day (12 * 60 / 7.5 = 96).\r\n * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level\r\n * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}.\r\n * The actual calculation used is {@link #getSunrise()} - ({@link #getShaahZmanisGra()} * 1.6).\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getShaahZmanisGra()\r\n */\r\n public getAlos96Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-1.6);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated using 90 minutes before {@link #getSeaLevelSunrise() sea level\r\n * sunrise} based on the time to walk the distance of 4 Mil at 22.5 minutes a Mil. Time based\r\n * offset calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef\r\n * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it\r\n * takes to walk the distance of 4 Mil.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getAlos90() {\r\n return this.getElevationAdjustedSunrise()?.subtract({ minutes: 90 });\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns alos (dawn) calculated using 120 minutes\r\n * before {@link #getSeaLevelSunrise() sea level sunrise} (no adjustment for elevation is made) based on the time\r\n * to walk the distance of 5 Mil(Ula) at 24 minutes a Mil. Time based offset calculations\r\n * for alos are based on the* opinion of the Rishonim\r\n * who stated that the time of the neshef (time between dawn and sunrise) does not vary by the time of\r\n * year or location but purely depends on the time it takes to walk the distance of 5 Mil(Ula). Since\r\n * this time is extremely early, it should only be used lechumra, such as not eating after this time on a fast\r\n * day, and not as the start time for mitzvos that can only be performed during the day.\r\n * \r\n * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),\r\n * since it returns a very early time, and if used lekula can result in doing mitzvos hayom\r\n * too early according to most opinions. There is no current plan to remove this method from the API, and this\r\n * deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getTzais120()\r\n * @see #getAlos26Degrees()\r\n */\r\n public getAlos120() {\r\n return this.getElevationAdjustedSunrise()?.subtract({ minutes: 120 });\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and method returns alos (dawn) calculated using\r\n * 120 minutes zmaniyos or 1/6th of the day before {@link #getSunrise() sunrise} or {@link\r\n * #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This is based\r\n * on a 24-minute Mil so the time for 5 Mil is 120 minutes which is 1/6th of a day (12 * 60 /\r\n * 6 = 120). The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link\r\n * #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending\r\n * on the {@link #isUseElevation()}. The actual calculation used is {@link #getSunrise()} - ({@link\r\n * #getShaahZmanisGra()} * 2). Since this time is extremely early, it should only be used lechumra, such\r\n * as not eating after this time on a fast day, and not as the start time for mitzvos that can only be\r\n * performed during the day.\r\n * \r\n * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),\r\n * since it returns a very early time, and if used lekula can result in doing mitzvos hayom\r\n * too early according to most opinions. There is no current plan to remove this method from the API, and this\r\n * deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos120()\r\n * @see #getAlos26Degrees()\r\n */\r\n public getAlos120Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(-2);\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns alos (dawn) calculated when the sun is {@link\r\n * #ZENITH_26_DEGREES 26°} below the eastern geometric horizon before sunrise. This calculation is based on the same\r\n * calculation of {@link #getAlos120() 120 minutes} but uses a degree-based calculation instead of 120 exact minutes. This\r\n * calculation is based on the position of the sun 120 minutes before sunrise in Jerusalem around the equinox / equilux, which\r\n * calculates to 26° below {@link #GEOMETRIC_ZENITH geometric zenith}. Since this time is extremely early, it should\r\n * only be used lechumra only, such as not eating after this time on a fast day, and not as the start time for\r\n * mitzvos that can only be performed during the day.\r\n * \r\n * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day),\r\n * since it returns a very early time, and if used lekula can result in doing mitzvos hayom\r\n * too early according to most opinions. There is no current plan to remove this method from the API, and this\r\n * deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_26_DEGREES\r\n * @see #getAlos120()\r\n * @see #getTzais120()\r\n * @see #getTzais26Degrees()\r\n */\r\n public getAlos26Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_26_DEGREES);\r\n }\r\n\r\n /**\r\n * A method to return alos (dawn) calculated when the sun is {@link #ASTRONOMICAL_ZENITH 18°} below the\r\n * eastern geometric horizon before sunrise.\r\n * \r\n * @return the Date
representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getAlos18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * A method to return alos (dawn) calculated when the sun is {@link #ZENITH_19_DEGREES 19°} below the\r\n * eastern geometric horizon before sunrise. This is the Rambam's alos according to Rabbi Moshe Kosower's Maaglei Tzedek, page 88, Ayeles Hashachar Vol. I, page 12, Yom Valayla Shel Torah, Ch. 34, p. 222 and \r\n * Rabbi Yaakov Shakow's Luach Ikvei Hayom.\r\n * \r\n * @return the Date
representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ASTRONOMICAL_ZENITH\r\n */\r\n public getAlos19Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_19_DEGREES);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated when the sun is {@link #ZENITH_19_POINT_8 19.8°} below the\r\n * eastern geometric horizon before sunrise. This calculation is based on the same calculation of\r\n * {@link #getAlos90() 90 minutes} but uses a degree-based calculation instead of 90 exact minutes. This calculation\r\n * is based on the position of the sun 90 minutes before sunrise in Jerusalem around the equinox / equilux, which\r\n * calculates to 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return the Date
representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_19_POINT_8\r\n * @see #getAlos90()\r\n */\r\n public getAlos19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_19_POINT_8);\r\n }\r\n\r\n /**\r\n * Method to return alos (dawn) calculated when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the\r\n * eastern geometric horizon before sunrise. This calculation is based on the same calculation of\r\n * {@link #getAlos72() 72 minutes} but uses a degree-based calculation instead of 72 exact minutes. This calculation\r\n * is based on the position of the sun 72 minutes before sunrise in Jerusalem around the equinox / equilux, which\r\n * calculates to 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return the Date
representing alos. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun\r\n * may not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_16_POINT_1\r\n * @see #getAlos72()\r\n */\r\n public getAlos16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_16_POINT_1);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES\r\n * 11.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating\r\n * misheyakir according to some opinions. This calculation is based on the position of the sun 52 minutes\r\n * before {@link #getSunrise sunrise} in Jerusalem around the equinox / equilux,\r\n * which calculates to 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * @todo recalculate.\r\n * \r\n * @return the Date
of misheyakir. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_11_POINT_5\r\n */\r\n public getMisheyakir11Point5Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_11_POINT_5);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES\r\n * 11°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating\r\n * misheyakir according to some opinions. This calculation is based on the position of the sun 48 minutes\r\n * before {@link #getSunrise sunrise} in Jerusalem daround the equinox / equilux,\r\n * which calculates to 11° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return If the calculation can't be computed such as northern and southern locations even south of the Arctic\r\n * Circle and north of the Antarctic Circle where the sun may not reach low enough below the horizon for\r\n * this calculation, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_11_DEGREES\r\n */\r\n public getMisheyakir11Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_11_DEGREES);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_10_POINT_2\r\n * 10.2°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating\r\n * misheyakir according to some opinions. This calculation is based on the position of the sun 45 minutes\r\n * before {@link #getSunrise sunrise} in Jerusalem around the equinox which calculates\r\n * to 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * \r\n * @return the Date
of misheyakir. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_10_POINT_2\r\n */\r\n public getMisheyakir10Point2Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_10_POINT_2);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_7_POINT_65\r\n * 7.65°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). The degrees are based on a 35/36 minute\r\n * zman around the\r\n * equinox / equilux, when the neshef (twilight) is the shortest. This time is based on Rabbi Moshe Feinstein who writes in Ohr Hachaim Vol. 4, Ch. 6)\r\n * that misheyakir in New York is 35-40 minutes before sunset, something that is a drop less than 8°.\r\n * Rabbi Yisroel Taplin in Zmanei Yisrael (page 117) notes that Rabbi Yaakov Kamenetsky stated that it is not less than 36\r\n * minutes before sunrise (maybe it is 40 minutes). Sefer Yisrael Vehazmanim (p. 7) quotes the Tamar Yifrach\r\n * in the name of the Satmar Rov that one should be stringent\r\n * not consider misheyakir before 36 minutes. This is also the accepted minhag in Lakewood that is used in the Yeshiva. This follows the opinion of Rabbi Shmuel Kamenetsky who provided the time of 35/36 minutes,\r\n * but did not provide a degree-based time. Since this zman depends on the level of light, Rabbi Yaakov Shakow\r\n * presented this degree-based calculations to Rabbi Kamenetsky who agreed to them.\r\n * \r\n * @return the Date
of misheyakir. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_7_POINT_65\r\n * @see #getMisheyakir9Point5Degrees()\r\n */\r\n public getMisheyakir7Point65Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_65);\r\n }\r\n\r\n /**\r\n * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_9_POINT_5\r\n * 9.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is based on Rabbi Dovid Kronglass's\r\n * Calculation of 45 minutes in Baltimore as mentioned in Divrei Chachamim No. 24 brought down by the Birur Halacha, Tinyana, Ch. 18. This calculates to\r\n * 9.5°. Also see Rabbi Yaakov Yitzchok Neiman in Kovetz\r\n * Eitz Chaim Vol. 9, p. 202 that the Vya'an Yosef did not want to rely on times earlier than 45 minutes in New York. This\r\n * zman is also used in the calendars published by Rabbi Hershel Edelstein. As mentioned in Yisroel Vehazmanim,\r\n * Rabbi Edelstein who was given the 45 minute zman by Rabbi Bick. The calendars published by the Edot Hamizrach communities also use this zman. This also\r\n * follows the opinion of Rabbi Shmuel Kamenetsky who provided\r\n * the time of 36 and 45 minutes, but did not provide a degree-based time. Since this zman depends on the level of\r\n * light, Rabbi Yaakov Shakow presented these degree-based times to Rabbi Shmuel Kamenetsky who agreed to them.\r\n * \r\n * @return the Date
of misheyakir. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_9_POINT_5\r\n * @see #getMisheyakir7Point65Degrees()\r\n */\r\n public getMisheyakir9Point5Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_9_POINT_5);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise() sunrise}. This\r\n * time is 3 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link\r\n * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall\r\n * with both being 19.8° below sunrise or sunset. This returns the time of 3 *\r\n * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis19Point8Degrees()\r\n * @see #getAlos19Point8Degrees()\r\n */\r\n public getSofZmanShmaMGA19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time\r\n * is 3 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after\r\n * {@link #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from\r\n * dawn to nightfall with both being 16.1° below sunrise or sunset. This returns the time of\r\n * 3 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n */\r\n public getSofZmanShmaMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos18Degrees() 18°} before {@link #getSunrise() sunrise}. This time is 3\r\n * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn}\r\n * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°\r\n * below sunrise or sunset. This returns the time of 3 * {@link #getShaahZmanis18Degrees()} after\r\n * {@link #getAlos18Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis18Degrees()\r\n * @see #getAlos18Degrees()\r\n */\r\n public getSofZmanShmaMGA18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 3 {@link\r\n * #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on the opinion\r\n * of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to\r\n * {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link\r\n * #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to {@link\r\n * #getSofZmanShmaMGA()} and is repeated here for clarity.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72Minutes()\r\n * @see #getAlos72()\r\n * @see #getSofZmanShmaMGA()\r\n */\r\n public getSofZmanShmaMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShmaMGA();\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according\r\n * to the opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos72Zmanis() 72} minutes zmaniyos, or 1/10th of the day before\r\n * {@link #getSunrise() sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos}\r\n * (solar hours) after {@link #getAlos72Zmanis() dawn} based on the opinion of the MGA that the day is calculated\r\n * from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmaniyos, or 1/10th of the day before\r\n * {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getTzais72Zmanis() nightfall} of 72 minutes\r\n * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 3 *\r\n * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72MinutesZmanis()\r\n * @see #getAlos72Zmanis()\r\n */\r\n public getSofZmanShmaMGA72MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according\r\n * to the opinion of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos90() 90} minutes before {@link #getSunrise() sunrise}. This time is 3\r\n * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to\r\n * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 3 *\r\n * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90Minutes()\r\n * @see #getAlos90()\r\n */\r\n public getSofZmanShmaMGA90Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos90()!, this.getTzais90()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise()\r\n * sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after\r\n * {@link #getAlos90Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link\r\n * #getAlos90Zmanis() dawn} of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall}\r\n * of 90 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis90MinutesZmanis()}\r\n * after {@link #getAlos90Zmanis() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90MinutesZmanis()\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getSofZmanShmaMGA90MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos96() 96} minutes before {@link #getSunrise() sunrise}. This time is 3\r\n * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before\r\n * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link\r\n * #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96Minutes()\r\n * @see #getAlos96()\r\n */\r\n public getSofZmanShmaMGA96Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos96()!, this.getTzais96()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos90Zmanis() 96} minutes zmaniyos before {@link #getSunrise()\r\n * sunrise}. This time is 3 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after\r\n * {@link #getAlos96Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link\r\n * #getAlos96Zmanis() dawn} of 96 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall}\r\n * of 96 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis96MinutesZmanis()}\r\n * after {@link #getAlos96Zmanis() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96MinutesZmanis()\r\n * @see #getAlos96Zmanis()\r\n */\r\n public getSofZmanShmaMGA96MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) calculated\r\n * as 3 hours (regular clock hours and not sha'os zmaniyos) before {@link ZmanimCalendar#getChatzos()}.\r\n * Generally known as part of the \"Komarno\" zmanim after Rav Yitzchak Eizik of\r\n * Komarno, a proponent of this calculation, it actually predates him a lot. It is the opinion of the \r\n * Shach in the Nekudas Hakesef (Yoreh Deah 184), Rav Moshe Lifshitz in his commentary\r\n * Lechem Mishneh on Brachos 1:2. It is\r\n * next brought down about 100 years later by the Yaavetz\r\n * (in his siddur, Mor Uktziah Orach\r\n * Chaim 1, Lechem Shamayim, Brachos 1:2\r\n * and She'elos Yaavetz vol. 1 no. 40),\r\n * Rav Yitzchak Eizik of Komarno in the Ma'aseh Oreg on Mishnayos Brachos 11:2, Shevus Yaakov, Chasan Sofer and others.\r\n * See Yisrael Vehazmanim vol. 1 7:3, page 55 -\r\n * 62. A variant of this calculation {@link #getSofZmanShmaFixedLocal()} uses {@link #getFixedLocalChatzos() fixed\r\n * local chatzos} for calculating this type of zman.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see ZmanimCalendar#getChatzos()\r\n * @see #getSofZmanShmaFixedLocal()\r\n * @see #getSofZmanTfila2HoursBeforeChatzos()\r\n */\r\n public getSofZmanShma3HoursBeforeChatzos() {\r\n return this.getChatzos()?.subtract({ minutes: 180 })\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) based\r\n * on alos being {@link #getAlos120() 120} minutes or 1/6th of the day before {@link #getSunrise() sunrise}.\r\n * This time is 3 {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120()\r\n * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120 minutes\r\n * before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of 3\r\n * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman that\r\n * is very much a chumra.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis120Minutes()\r\n * @see #getAlos120()\r\n */\r\n public getSofZmanShmaMGA120Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos120()!, this.getTzais120());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) based\r\n * on the opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at\r\n * {@link #getSeaLevelSunset() sea level sunset}. This is the opinion of the \\u05D7\\u05D9\\u05D3\\u05D5\\u05E9\\u05D9\r\n * \\u05D5\\u05DB\\u05DC\\u05DC\\u05D5\\u05EA \\u05D4\\u05E8\\u05D6\\u05F4\\u05D4 and the \\u05DE\\u05E0\\u05D5\\u05E8\\u05D4 \\u05D4\\u05D8\\u05D4\\u05D5\\u05E8\\u05D4 as\r\n * mentioned by Yisrael Vehazmanim vol 1, sec. 7,\r\n * ch. 3 no. 16. Three shaos zmaniyos are calculated based on this day and added to {@link\r\n * #getAlos16Point1Degrees() alos} to reach this time. This time is 3 shaos zmaniyos (solar hours)\r\n * after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link\r\n * #getAlos16Point1Degrees() alos 16.1°} to {@link #getSeaLevelSunset() sea level sunset}.\r\n * Note: Based on this calculation chatzos will not be at midday.\r\n * \r\n * @return the Date
of the latest zman krias shema based on this day. If the calculation can't\r\n * be computed such as northern and southern locations even south of the Arctic Circle and north of the\r\n * Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a null\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getSeaLevelSunset()\r\n */\r\n public getSofZmanShmaAlos16Point1ToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos16Point1Degrees(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the\r\n * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at\r\n * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}. 3 shaos zmaniyos are calculated\r\n * based on this day and added to {@link #getAlos16Point1Degrees() alos} to reach this time. This time is 3\r\n * shaos zmaniyos (temporal hours) after {@link #getAlos16Point1Degrees() alos 16.1°} based on\r\n * the opinion that the day is calculated from a {@link #getAlos16Point1Degrees() alos 16.1°} to\r\n * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}.\r\n * Note: Based on this calculation chatzos will not be at midday.\r\n * \r\n * @return the Date
of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzaisGeonim7Point083Degrees()\r\n */\r\n public getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos16Point1Degrees(), this.getTzaisGeonim7Point083Degrees());\r\n }\r\n\r\n /**\r\n * From the GRA in Kol Eliyahu on Berachos #173 that states that zman krias shema is calculated as half the\r\n * time from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getFixedLocalChatzos() fixed local chatzos}.\r\n * The GRA himself seems to contradict this when he stated that zman krias shema is 1/4 of the day from\r\n * sunrise to sunset. See Sarah Lamoed #25 in Yisroel Vehazmanim Vol. III page 1016.\r\n * \r\n * @return the Date
of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getFixedLocalChatzos()\r\n * \r\n * @deprecated As per a conversation Rabbi Yisroel Twerski had with Rabbi Harfenes, this zman published in\r\n * the Yisrael Vehazmanim was based on a misunderstanding and should not be used. This deprecated method\r\n * will be removed (likely in KosherJava v3.0) pending confirmation from Rabbi Harfenes.\r\n */\r\n public getSofZmanShmaKolEliyahu(): Temporal.ZonedDateTime | null {\r\n const chatzos = this.getFixedLocalChatzos()!;\r\n if (chatzos === null || this.getSunrise() === null) {\r\n return null;\r\n }\r\n let diff = Temporal.Duration.from({ nanoseconds: Math.trunc(this.getElevationAdjustedSunrise()?.until(chatzos).total(\"nanoseconds\")! / 2) });\r\n return chatzos.subtract(diff)\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise() sunrise}. This time\r\n * is 4 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link\r\n * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to\r\n * nightfall with both being 19.8° below sunrise or sunset. This returns the time of 4 * {@link\r\n * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis19Point8Degrees()\r\n * @see #getAlos19Point8Degrees()\r\n */\r\n public getSofZmanTfilaMGA19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time\r\n * is 4 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link\r\n * #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to\r\n * nightfall with both being 16.1° below sunrise or sunset. This returns the time of 4 * {@link\r\n * #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n */\r\n public getSofZmanTfilaMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos18Degrees() 18°} before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn}\r\n * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°\r\n * below sunrise or sunset. This returns the time of 4 * {@link #getShaahZmanis18Degrees()} after\r\n * {@link #getAlos18Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis18Degrees()\r\n * @see #getAlos18Degrees()\r\n */\r\n public getSofZmanTfilaMGA18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before\r\n * sunrise to {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 4 *\r\n * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to\r\n * {@link #getSofZmanTfilaMGA()} and is repeated here for clarity.\r\n * \r\n * @return the Date
of the latest zman tfila. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72Minutes()\r\n * @see #getAlos72()\r\n * @see #getSofZmanShmaMGA()\r\n */\r\n public getSofZmanTfilaMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaMGA();\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the\r\n * Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis72MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos72Zmanis() dawn}\r\n * based on the opinion of the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72\r\n * minutes zmaniyos before sunrise to {@link #getTzais72Zmanis() nightfall} of 72 minutes zmaniyos\r\n * after sunset. This returns the time of 4 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis72MinutesZmanis()\r\n * @see #getAlos72Zmanis()\r\n */\r\n public getSofZmanTfilaMGA72MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos90() 90} minutes before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to\r\n * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 4 *\r\n * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}.\r\n * \r\n * @return the Date
of the latest zman tfila. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90Minutes()\r\n * @see #getAlos90()\r\n */\r\n public getSofZmanTfilaMGA90Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos90()!, this.getTzais90()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the\r\n * Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is\r\n * 4 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos90Zmanis()\r\n * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos90Zmanis() dawn}\r\n * of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall} of 90 minutes\r\n * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis90MinutesZmanis()} after\r\n * {@link #getAlos90Zmanis() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90MinutesZmanis()\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getSofZmanTfilaMGA90MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos96() 96} minutes before {@link #getSunrise() sunrise}. This time is 4\r\n * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on\r\n * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before\r\n * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 4 *\r\n * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}.\r\n * \r\n * @return the Date
of the latest zman tfila. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96Minutes()\r\n * @see #getAlos96()\r\n */\r\n public getSofZmanTfilaMGA96Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos96()!, this.getTzais96()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the\r\n * Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is\r\n * 4 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos96Zmanis()\r\n * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos96Zmanis() dawn}\r\n * of 96 minutes zmaniyos before sunrise to {@link #getTzais96Zmanis() nightfall} of 96 minutes\r\n * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis96MinutesZmanis()} after\r\n * {@link #getAlos96Zmanis() dawn}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis90MinutesZmanis()\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getSofZmanTfilaMGA96MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion\r\n * of the Magen Avraham (MGA) based on\r\n * alos being {@link #getAlos120() 120} minutes before {@link #getSunrise() sunrise} . This time is 4\r\n * {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120() dawn}\r\n * based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120\r\n * minutes before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of\r\n * 4 * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman\r\n * that is very much a chumra.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis120Minutes()\r\n * @see #getAlos120()\r\n */\r\n public getSofZmanTfilaMGA120Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos120()!, this.getTzais120());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) calculated as 2 hours\r\n * before {@link ZmanimCalendar#getChatzos()}. This is based on the opinions that calculate\r\n * sof zman krias shema as {@link #getSofZmanShma3HoursBeforeChatzos()}. This returns the time of 2 hours\r\n * before {@link ZmanimCalendar#getChatzos()}.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where\r\n * it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see ZmanimCalendar#getChatzos()\r\n * @see #getSofZmanShma3HoursBeforeChatzos()\r\n */\r\n public getSofZmanTfila2HoursBeforeChatzos() {\r\n return this.getChatzos()?.subtract({ minutes: 120 });\r\n }\r\n\r\n /**\r\n * This method returns mincha gedola calculated as 30 minutes after {@link #getChatzos() chatzos}\r\n * and not 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} after {@link #getChatzos() chatzos} as\r\n * calculated by {@link #getMinchaGedola}. Some use this time to delay the start of mincha in the winter when\r\n * 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is less than 30 minutes. See\r\n * {@link #getMinchaGedolaGreaterThan30()} for a convenience method that returns the later of the 2 calculations. One\r\n * should not use this time to start mincha before the standard {@link #getMinchaGedola() mincha gedola}.\r\n * See Shulchan Aruch Orach Chayim 234:1 and\r\n * the Shaar Hatziyon seif katan ches.\r\n * \r\n * @return the Date
of 30 minutes after chatzos. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaGedolaGreaterThan30()\r\n */\r\n public getMinchaGedola30Minutes() {\r\n return this.getChatzos()?.add({ minutes: 30 });\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola according to the Magen Avraham with the day starting 72\r\n * minutes before sunrise and ending 72 minutes after sunset. This is the earliest time to pray mincha. For\r\n * more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is\r\n * calculated as 6.5 {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *\r\n * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}.\r\n * \r\n * @see #getAlos72()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @see ZmanimCalendar#getMinchaGedola()\r\n * @return the Date
of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaGedola72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaGedola(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola according to the Magen Avraham with the day starting and\r\n * ending 16.1° below the horizon. This is the earliest time to pray mincha. For more information on\r\n * this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is calculated as 6.5\r\n * {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *\r\n * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date
of the time of mincha gedola. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedola16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaGedola(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola based on the opinion of Rabbi Yaakov Moshe Hillel as published in the luach\r\n * of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that mincha gedola is calculated as half a shaah\r\n * zmanis after chatzos with shaos zmaniyos calculated based on a day starting 72 minutes befoe sunrise\r\n * {@link #getAlos16Point1Degrees() alos 16.1°} and ending 13.5 minutes after sunset {@link\r\n * #getTzaisGeonim3Point7Degrees() tzais 3.7°}. Mincha gedola is the earliest time to pray mincha.\r\n * The later of this time or 30 clock minutes after chatzos is returned. See {@link #getMinchaGedolaGreaterThan30()}\r\n * (though that calculation is based on mincha gedola GRA).\r\n * For more information about mincha gedola see the documentation on {@link #getMinchaGedola() mincha gedola}.\r\n * \r\n * @return the Date
of the mincha gedola. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzaisGeonim3Point7Degrees()\r\n * @see #getShaahZmanisAlos16Point1ToTzais3Point7()\r\n * @see #getMinchaGedolaGreaterThan30()\r\n */\r\n public getMinchaGedolaAhavatShalom(): Temporal.ZonedDateTime | null {\r\n if (!this.getMinchaGedola30Minutes() || !this.getMinchaGedola() || !this.getShaahZmanisAlos16Point1ToTzais3Point7()) {\r\n console.log(this.getShaahZmanisAlos16Point1ToTzais3Point7(), this.getAlos16Point1Degrees(), this.getTzaisGeonim3Point7Degrees())\r\n return null;\r\n }\r\n\r\n return [\r\n this.getMinchaGedola30Minutes()!,\r\n this.getChatzos()?.add({nanoseconds: Math.trunc(this.getShaahZmanisAlos16Point1ToTzais3Point7()!.total(\"nanoseconds\") / 2)})!\r\n ].sort(rZTDsort)[0]\r\n }\r\n\r\n /**\r\n * This is a convenience method that returns the later of {@link #getMinchaGedola()} and\r\n * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is\r\n * less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise {@link #getMinchaGedola()}\r\n * will be returned.\r\n *\r\n * @return the Date
of the later of {@link #getMinchaGedola()} and {@link #getMinchaGedola30Minutes()}.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedolaGreaterThan30(): Temporal.ZonedDateTime | null {\r\n if (this.getMinchaGedola30Minutes() === null || this.getMinchaGedola() === null) {\r\n return null;\r\n }\r\n\r\n return [\r\n this.getMinchaGedola30Minutes()!,\r\n this.getMinchaGedola()!\r\n ].sort(rZTDsort)[0]\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana according to the Magen Avraham with the day starting and\r\n * ending 16.1° below the horizon. This is the preferred earliest time to pray mincha according to the\r\n * opinion of the Rambam and others. For more information on\r\n * this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is calculated as 9.5\r\n * {@link #getTemporalHour() solar hours} after alos. The calculation used is 9.5 *\r\n * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date
of the time of mincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaKetana16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana based on the opinion of Rabbi Yaakov Moshe Hillel as published in the luach\r\n * of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that mincha ketana is calculated as 2.5 shaos\r\n * zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos zmaniyos\r\n * calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and ending at\r\n * tzais 3.8°. Mincha ketana is the preferred earliest time to pray mincha according to\r\n * the opinion of the Rambam and others. For more information\r\n * on this see the documentation on {@link #getMinchaKetana() mincha ketana}. \r\n * \r\n * @return the the Date
of the time of mincha ketana. If the calculation can't be computed such as northern\r\n * and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanisAlos16Point1ToTzais3Point8()\r\n * @see #getMinchaGedolaAhavatShalom()\r\n * @see #getPlagAhavatShalom()\r\n */\r\n public getMinchaKetanaAhavatShalom() {\r\n return this.getTzaisGeonim3Point8Degrees()?.subtract({\r\n nanoseconds: Math.trunc(this.getShaahZmanisAlos16Point1ToTzais3Point8()?.total(\"nanoseconds\")! * 2.5)\r\n })\r\n }\r\n\r\n\r\n /**\r\n * This method returns the time of mincha ketana according to the Magen Avraham with the day\r\n * starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the preferred earliest time to pray\r\n * mincha according to the opinion of the Rambam\r\n * and others. For more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}.\r\n * This is calculated as 9.5 {@link #getShaahZmanis72Minutes()} after alos. The calculation used is 9.5 *\r\n * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date
of the time of mincha ketana. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaKetana72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha according to the Magen Avraham with the day starting 60\r\n * minutes before sunrise and ending 60 minutes after sunset. This is calculated as 10.75 hours after\r\n * {@link #getAlos60() dawn}. The formula used is 10.75 {@link #getShaahZmanis60Minutes()} after {@link #getAlos60()}.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis60Minutes()\r\n * @see #getAlos60()\r\n * @see #getTzais60()\r\n */\r\n public getPlagHamincha60Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos60(), this.getTzais60());\r\n }\r\n\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the\r\n * Magen Avraham with the day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is calculated\r\n * as 10.75 hours after {@link #getAlos72() dawn}. The formula used is 10.75 {@link #getShaahZmanis72Minutes()} after\r\n * {@link #getAlos72()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis72Minutes()\r\n */\r\n public getPlagHamincha72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos72(), this.getTzais72());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the\r\n * Magen Avraham with the day starting 90 minutes before sunrise and ending 90 minutes after sunset. This is calculated\r\n * as 10.75 hours after {@link #getAlos90() dawn}. The formula used is 10.75 {@link #getShaahZmanis90Minutes()} after\r\n * {@link #getAlos90()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis90Minutes()\r\n */\r\n public getPlagHamincha90Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos90(), this.getTzais90());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha according to the Magen\r\n * Avraham with the day starting 96 minutes before sunrise and ending 96 minutes after sunset. This is calculated as 10.75\r\n * hours after {@link #getAlos96() dawn}. The formula used is 10.75 {@link #getShaahZmanis96Minutes()} after\r\n * {@link #getAlos96()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanis96Minutes()\r\n */\r\n public getPlagHamincha96Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos96(), this.getTzais96());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha. This is calculated\r\n * as 10.75 hours after {@link #getAlos96Zmanis() dawn}. The formula used is 10.75 * {@link\r\n * #getShaahZmanis96MinutesZmanis()} after {@link #getAlos96Zmanis() dawn}. Since plag by this calculation can\r\n * occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha96MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos96Zmanis(), this.getTzais96Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha. This is calculated\r\n * as 10.75 hours after {@link #getAlos90Zmanis() dawn}. The formula used is 10.75 * {@link\r\n * #getShaahZmanis90MinutesZmanis()} after {@link #getAlos90Zmanis() dawn}. Since plag by this calculation can\r\n * occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha90MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos90Zmanis(), this.getTzais90Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha. This is calculated as\r\n * 10.75 hours after {@link #getAlos72Zmanis()}. The formula used is 10.75 * {@link #getShaahZmanis72MinutesZmanis()} after\r\n * {@link #getAlos72Zmanis() dawn}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHamincha72MinutesZmanis(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos72Zmanis(), this.getTzais72Zmanis());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link\r\n * #getTzais16Point1Degrees() tzais 16.1°}. This is calculated as 10.75 hours zmaniyos\r\n * after {@link #getAlos16Point1Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis16Point1Degrees()}\r\n * after {@link #getAlos16Point1Degrees()}. Since plag by this calculation can occur after sunset, it\r\n * should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n */\r\n public getPlagHamincha16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos19Point8Degrees() alos 19.8°} and ends at {@link\r\n * #getTzais19Point8Degrees() tzais 19.8°}. This is calculated as 10.75 hours zmaniyos\r\n * after {@link #getAlos19Point8Degrees() dawn}. The formula used is 10.75 * {@link\r\n * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees()}. Since plag by this\r\n * calculation can occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis19Point8Degrees()\r\n */\r\n public getPlagHamincha19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos19Point8Degrees(), this.getTzais19Point8Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos26Degrees() alos 26°} and ends at {@link\r\n * #getTzais26Degrees() tzais 26°}. This is calculated as 10.75 hours zmaniyos after {@link\r\n * #getAlos26Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis26Degrees()} after {@link\r\n * #getAlos26Degrees()}. Since the zman based on an extremely early alos and a very late\r\n * tzais, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis26Degrees()\r\n * @see #getPlagHamincha120Minutes()\r\n */\r\n public getPlagHamincha26Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos26Degrees(), this.getTzais26Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the\r\n * opinion that the day starts at {@link #getAlos18Degrees() alos 18°} and ends at {@link\r\n * #getTzais18Degrees() tzais 18°}. This is calculated as 10.75 hours zmaniyos after {@link\r\n * #getAlos18Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis18Degrees()} after {@link\r\n * #getAlos18Degrees()}. Since plag by this calculation can occur after sunset, it should only be used\r\n * lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis18Degrees()\r\n */\r\n public getPlagHamincha18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos18Degrees(), this.getTzais18Degrees());\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns the time of plag hamincha based on the opinion\r\n * that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getSunset() sunset}.\r\n * 10.75 shaos zmaniyos are calculated based on this day and added to {@link #getAlos16Point1Degrees()\r\n * alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal hours) after {@link\r\n * #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link #getAlos16Point1Degrees()\r\n * dawn} of 16.1 degrees before sunrise to {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 10.75 *\r\n * the calculated shaah zmanis after {@link #getAlos16Point1Degrees() dawn}. Since plag by this\r\n * calculation can occur after sunset, it should only be used lechumra.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
of the plag. If the calculation can't be computed such as northern and southern\r\n * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getSeaLevelSunset()\r\n */\r\n public getPlagAlosToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos16Point1Degrees(), this.getElevationAdjustedSunset());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha based on the opinion that the day starts at\r\n * {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getTzaisGeonim7Point083Degrees()\r\n * tzais}. 10.75 shaos zmaniyos are calculated based on this day and added to {@link\r\n * #getAlos16Point1Degrees() alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal\r\n * hours) after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a\r\n * {@link #getAlos16Point1Degrees() dawn} of 16.1 degrees before sunrise to\r\n * {@link #getTzaisGeonim7Point083Degrees() tzais} . This returns the time of 10.75 * the calculated\r\n * shaah zmanis after {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date
of the plag. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos16Point1Degrees()\r\n * @see #getTzaisGeonim7Point083Degrees()\r\n */\r\n public getPlagAlos16Point1ToTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos16Point1Degrees(), this.getTzaisGeonim7Point083Degrees());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha (the earliest time that Shabbos can be started) based on the\r\n * opinion of Rabbi Yaakov Moshe Hillel as published in\r\n * the luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that that plag hamincha is calculated\r\n * as 1.25 shaos zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos\r\n * zmaniyos calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and\r\n * ending at tzais 3.8°.\r\n * \r\n * @return the Date
of the plag. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not\r\n * reach low enough below the horizon for this calculation, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanisAlos16Point1ToTzais3Point8()\r\n * @see #getMinchaGedolaAhavatShalom()\r\n * @see #getMinchaKetanaAhavatShalom()\r\n */\r\n public getPlagAhavatShalom() {\r\n const distance = Temporal.Duration.from({ nanoseconds: this.getShaahZmanisAlos16Point1ToTzais3Point8()?.total(\"nanoseconds\")! * 1.25 });\r\n return this.getTzaisGeonim3Point8Degrees()?.subtract(distance)\r\n }\r\n\r\n /**\r\n * Method to return the beginning of bain hashmashos of Rabbeinu Tam calculated when the sun is\r\n * {@link #ZENITH_13_POINT_24 13.24°} below the western {@link #GEOMETRIC_ZENITH geometric horizon} (90°)\r\n * after sunset. This calculation is based on the same calculation of {@link #getBainHashmashosRT58Point5Minutes()\r\n * bain hashmashos Rabbeinu Tam 58.5 minutes} but uses a degree-based calculation instead of 58.5 exact\r\n * minutes. This calculation is based on the position of the sun 58.5 minutes after sunset in Jerusalem around the equinox / equilux,\r\n * which calculates to 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith}.\r\n * NOTE: As per Yisrael Vehazmanim Vol. III page 1028, No. 50, a dip of slightly less than 13° should be used.\r\n * Calculations show that the proper dip to be 13.2456° (truncated to 13.24 that provides about 1.5 second\r\n * earlier (lechumra) time) below the horizon at that time. This makes a difference of 1 minute and 10\r\n * seconds in Jerusalem during the Equinox, and 1 minute 29 seconds during the solstice as compared to the proper\r\n * 13.24° versus 13°. For NY during the solstice, the difference is 1 minute 56 seconds.\r\n * @todo recalculate the above based on equilux/equinox calculations.\r\n * \r\n * @return the Date
of the sun being 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith}\r\n * (90°). If the calculation can't be computed such as northern and southern locations even south of the\r\n * Arctic Circle and north of the Antarctic Circle where the sun may not reach low enough below the horizon\r\n * for this calculation, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_13_POINT_24\r\n * @see #getBainHashmashosRT58Point5Minutes()\r\n */\r\n public getBainHashmashosRT13Point24Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_13_POINT_24);\r\n }\r\n\r\n /**\r\n * This method returns the beginning of Bain hashmashos of Rabbeinu Tam calculated as a 58.5\r\n * minute offset after sunset. bain hashmashos is 3/4 of a Mil before tzais or 3 1/4\r\n * Mil after sunset. With a Mil calculated as 18 minutes, 3.25 * 18 = 58.5 minutes.\r\n * \r\n * @return the Date
of 58.5 minutes after sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n */\r\n public getBainHashmashosRT58Point5Minutes() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 58, seconds: 30 });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos based on the calculation of 13.5 minutes (3/4 of an\r\n * 18-minute Mil) before shkiah calculated as {@link #getTzaisGeonim7Point083Degrees() 7.083°}.\r\n * \r\n * @return the Date
of the bain hashmashos of Rabbeinu Tam in this calculation. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getTzaisGeonim7Point083Degrees()\r\n */\r\n public getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_083)?.subtract({ minutes: 13, seconds: 30 })\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos of Rabbeinu Tam calculated according to the\r\n * opinion of the Divrei Yosef (see Yisrael Vehazmanim) calculated 5/18th (27.77%) of the time between\r\n * alos (calculated as 19.8° before sunrise) and sunrise. This is added to sunset to arrive at the time\r\n * for bain hashmashos of Rabbeinu Tam.\r\n * \r\n * @return the Date
of bain hashmashos of Rabbeinu Tam for this calculation. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getBainHashmashosRT2Stars() {\r\n const alos19Point8: Temporal.ZonedDateTime | null = this.getAlos19Point8Degrees();\r\n const sunrise: Temporal.ZonedDateTime | null = this.getElevationAdjustedSunrise();\r\n if (alos19Point8 === null || sunrise === null) {\r\n return null;\r\n }\r\n\r\n const inverseOfSunriseToAlot = -alos19Point8.until(sunrise).total(\"nanoseconds\")\r\n\r\n return this.getElevationAdjustedSunset()?.add({ nanoseconds: inverseOfSunriseToAlot * (5 / 18) });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 18 minutes\r\n * or 3/4 of a 24-minute Mil before sunset. According to the Yereim, bain hashmashos starts 3/4\r\n * of a Mil before sunset and tzais or nightfall starts at sunset. \r\n * \r\n * @return the Date
of 18 minutes before sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getBainHashmashosYereim3Point05Degrees()\r\n */\r\n public getBainHashmashosYereim18Minutes() {\r\n return this.getElevationAdjustedSunset()?.subtract({ minutes: 18 })\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's\r\n * position 3.05° above the horizon around the equinox / equilux,\r\n * its position 18 minutes or 3/4 of an 24-minute mil before sunset. According to the Yereim, bain\r\n * hashmashos starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset.\r\n * Note that lechumra (of about 14 seconds) a refraction value of 0.5166° as opposed to the traditional\r\n * 0.566° is used. This is more inline with the actual refraction in Eretz Yisrael and is brought down\r\n * by Rabbi\r\n * Yedidya Manet in his Zmanei Halacha\r\n * Lema\u2019aseh (p. 11). That is the first source that I am aware of that calculates degree-based Yereim\r\n * zmanim. The 0.5166° refraction is also used by the Luach Itim\r\n * Lebinah. Calculating the Yereim's bain hashmashos using 18-minute based degrees is also suggested\r\n * in the upcoming 8th edition of the zmanim Kehilchasam. For more details, see the article The Yereim\u2019s Bein Hashmashos.\r\n * \r\n * @todo recalculate based on equinox/equilux\r\n * @return the Date
of the sun's position 3.05° minutes before sunset. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_MINUS_3_POINT_05\r\n * @see #getBainHashmashosYereim18Minutes()\r\n * @see #getBainHashmashosYereim2Point8Degrees()\r\n * @see #getBainHashmashosYereim2Point1Degrees()\r\n */\r\n public getBainHashmashosYereim3Point05Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_MINUS_3_POINT_05);\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 16.875\r\n * minutes or 3/4 of a 22.5-minute Mil before sunset. According to the Yereim, bain hashmashos\r\n * starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset. \r\n * \r\n * @return the Date
of 16.875 minutes before sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getBainHashmashosYereim2Point8Degrees()\r\n */\r\n public getBainHashmashosYereim16Point875Minutes() {\r\n return this.getElevationAdjustedSunset()?.subtract({ minutes: 16, seconds: 52, milliseconds: 500 });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's\r\n * position 2.8° above the horizon around the equinox / equilux,\r\n * its position 16.875 minutes or 3/4 of an 18-minute Mil before sunset. According to the Yereim, bain\r\n * hashmashos starts 3/4 of a Mil before sunset and tzais or nightfall starts at sunset.\r\n * Details, including how the degrees were calculated can be seen in the documentation of\r\n * {@link #getBainHashmashosYereim3Point05Degrees()}.\r\n * \r\n * @return the Date
of the sun's position 2.8° minutes before sunset. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_MINUS_2_POINT_8\r\n * @see #getBainHashmashosYereim16Point875Minutes()\r\n * @see #getBainHashmashosYereim3Point05Degrees()\r\n * @see #getBainHashmashosYereim2Point1Degrees()\r\n */\r\n public getBainHashmashosYereim2Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_MINUS_2_POINT_8);\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos (twilight) according to the Yereim (Rabbi Eliezer of Metz) calculated as 13.5 minutes\r\n * or 3/4 of an 18-minute Mil before sunset. According to the Yereim, bain hashmashos starts 3/4 of\r\n * a Mil before sunset and tzais or nightfall starts at sunset.\r\n * \r\n * @return the Date
of 13.5 minutes before sunset. If the calculation can't be computed such as in the\r\n * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getBainHashmashosYereim2Point1Degrees()\r\n */\r\n public getBainHashmashosYereim13Point5Minutes() {\r\n return this.getElevationAdjustedSunset()?.subtract({ minutes: 13, seconds: 30 });\r\n }\r\n\r\n /**\r\n * This method returns the beginning of bain hashmashos according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's\r\n * position 2.1° above the horizon around the equinox / equilux in\r\n * Yerushalayim, its position 13.5 minutes or 3/4 of an 18-minute Mil before sunset. According to the Yereim,\r\n * bain hashmashos starts 3/4 of a mil before sunset and tzais or nightfall starts at sunset.\r\n * Details, including how the degrees were calculated can be seen in the documentation of\r\n * {@link #getBainHashmashosYereim3Point05Degrees()}.\r\n * \r\n * @return the Date
of the sun's position 2.1° minutes before sunset. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #ZENITH_MINUS_2_POINT_1\r\n * @see #getBainHashmashosYereim13Point5Minutes()\r\n * @see #getBainHashmashosYereim2Point8Degrees()\r\n * @see #getBainHashmashosYereim3Point05Degrees()\r\n */\r\n public getBainHashmashosYereim2Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_MINUS_2_POINT_1);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_3_POINT_7 3.7°} below the western horizon.\r\n * \r\n * @return the Date
representing the time when the sun is 3.7° below sea level.\r\n * @see #ZENITH_3_POINT_7\r\n */\r\n public getTzaisGeonim3Point7Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_7);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_3_POINT_8 3.8°} below the western horizon.\r\n * \r\n * @return the Date
representing the time when the sun is 3.8° below sea level.\r\n * @see #ZENITH_3_POINT_8\r\n */\r\n public getTzaisGeonim3Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_8);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_5_POINT_95 5.95°} below the western horizon.\r\n * \r\n * @return the Date
representing the time when the sun is 5.95° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_5_POINT_95\r\n */\r\n public getTzaisGeonim5Point95Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_5_POINT_95);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil based on an 18\r\n * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_65 3.65°} below the western\r\n * horizon. This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @return the Date
representing the time when the sun is 3.65° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_3_POINT_65\r\n */\r\n public getTzaisGeonim3Point65Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_65);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil based on an 18\r\n * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_676 3.676°} below the western\r\n * horizon based on the calculations of Stanley Fishkind. This is a very early zman and should not be\r\n * relied on without Rabbinical guidance.\r\n * \r\n * @return the Date
representing the time when the sun is 3.676° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_3_POINT_676\r\n */\r\n public getTzaisGeonim3Point676Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_3_POINT_676);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a mil based\r\n * on a 24-minute Mil, or 18 minutes. It is the sun's position at {@link #ZENITH_4_POINT_61 4.61°} below the\r\n * western horizon. This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @return the Date
representing the time when the sun is 4.61° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_4_POINT_61\r\n */\r\n public getTzaisGeonim4Point61Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_4_POINT_61);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil, based on a 22.5\r\n * minute Mil, or 16 7/8 minutes. It is the sun's position at {@link #ZENITH_4_POINT_37 4.37°} below the western\r\n * horizon. This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @return the Date
representing the time when the sun is 4.37° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_4_POINT_37\r\n */\r\n public getTzaisGeonim4Point37Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_4_POINT_37);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a 24-minute Mil,\r\n * based on a Mil being 24 minutes, and is calculated as 18 + 2 + 4 for a total of 24 minutes. It is the\r\n * sun's position at {@link #ZENITH_5_POINT_88 5.88°} below the western horizon. This is a very early\r\n * zman and should not be relied on without Rabbinical guidance.\r\n * \r\n * @todo Additional detailed documentation needed.\r\n * @return the Date
representing the time when the sun is 5.88° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_5_POINT_88\r\n */\r\n public getTzaisGeonim5Point88Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_5_POINT_88);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4\r\n * of a Mil based on the\r\n * sun's position at {@link #ZENITH_4_POINT_8 4.8°} below the western horizon. This is based on Rabbi Leo Levi's\r\n * calculations. This is the This is a very early zman and should not be relied on without Rabbinical guidance.\r\n * @todo Additional documentation needed.\r\n * \r\n * @return the Date
representing the time when the sun is 4.8° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_4_POINT_8\r\n */\r\n public getTzaisGeonim4Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_4_POINT_8);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim as calculated by\r\n * Rabbi Yechiel Michel Tucazinsky. It is\r\n * based on of the position of the sun no later than {@link #getTzaisGeonim6Point45Degrees() 31 minutes} after sunset\r\n * in Jerusalem the height of the summer solstice and is 28 minutes after shkiah around the equinox / equilux. This\r\n * computes to 6.45° below the western horizon.\r\n * @todo Additional documentation details needed.\r\n * \r\n * @return the Date
representing the time when the sun is 6.45° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_6_POINT_45\r\n */\r\n public getTzaisGeonim6Point45Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_6_POINT_45);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated when the\r\n * sun's position {@link #ZENITH_7_POINT_083 7.083° (or 7° 5\\u2032}) below the western horizon. This is often\r\n * referred to as 7°5' or 7° and 5 minutes. This calculation is based on the observation of 3 medium sized\r\n * stars by Dr. Baruch (Berthold) Cohn in his luach Tabellen enthaltend die Zeitangaben f\u00FCr\r\n * den Beginn der Nacht und des Tages f\u00FCr die Breitengrade + 66 bis -38 published in Strasbourg, France in 1899.\r\n * This calendar was very popular in Europe, and many other calendars based their time on it. Rav Dovid Tzvi Hoffman in his\r\n * Sh\"Ut Melamed Leho'il in an exchange of letters with Baruch Cohn in Orach Chaim 30 agreed to this zman (page 36),\r\n * as did the Sh\"Ut Bnei Tziyon and the Tenuvas Sadeh. It is very close to the time of the Mekor Chesed of the Sefer chasidim. It is close to the position of the sun 30 minutes\r\n * after sunset in Jerusalem around the equinox / equilux, but not\r\n * Exactly. The actual position of the sun 30 minutes after sunset in Jerusalem at the equilux is 7.205° and 7.199°\r\n * at the equinox. See Hazmanim Bahalacha vol 2, pages 520-521 for more details.\r\n * \r\n * @return the Date
representing the time when the sun is 7.083° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_7_POINT_083\r\n */\r\n public getTzaisGeonim7Point083Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_083);\r\n }\r\n\r\n /**\r\n * This method returns tzais (nightfall) based on the opinion of the Geonim calculated as 45 minutes\r\n * after sunset during the summer solstice in New York, when the neshef (twilight) is the longest. The sun's\r\n * position at this time computes to {@link #ZENITH_7_POINT_67 7.75°} below the western horizon. See Igros Moshe Even Haezer 4, Ch. 4 (regarding\r\n * tzais for krias Shema). It is also mentioned in Rabbi Heber's Shaarei Zmanim on in\r\n * chapter 10 (page 87) and\r\n * chapter 12 (page 108). Also see the\r\n * time of 45 minutes in Rabbi Simcha Bunim Cohen's The radiance of Shabbos as the earliest zman for New York.\r\n * This zman is also listed in the Divrei\r\n * Shalom Vol. III, chapter 75, and Bais Av\"i\r\n * Vol. III, chapter 117. This zman is also listed in the Divrei Shalom etc. chapter 177 (FIXME - could not\r\n * be located). Since this zman depends on the level of light, Rabbi Yaakov Shakow presented this degree-based\r\n * calculation to Rabbi Rabbi Shmuel Kamenetsky who agreed\r\n * to it.\r\n * @todo add hyperlinks to source of Divrei Shalom.\r\n * @return the Date
representing the time when the sun is 7.67° below sea level. If the\r\n * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and\r\n * north of the Antarctic Circle where the sun may not reach low enough below the horizon for this\r\n * calculation, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #ZENITH_7_POINT_67\r\n */\r\n public getTzaisGeonim7Point67Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_7_POINT_67);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the\r\n * sun's position at {@link #ZENITH_8_POINT_5 8.5°} below the western horizon.\r\n * \r\n * @return the Date
representing the time when the sun is 8.5° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_8_POINT_5\r\n */\r\n public getTzaisGeonim8Point5Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_8_POINT_5);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the calculations used in the Luach Itim Lebinah as the stringent time for tzais. It is\r\n * calculated at the sun's position at {@link #ZENITH_9_POINT_3 9.3°} below the western horizon.\r\n * \r\n * @return the Date
representing the time when the sun is 9.3° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getTzaisGeonim9Point3Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_9_POINT_3);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 60\r\n * minutes after sunset around the equinox / equilux, the\r\n * day that a solar hour is 60 minutes in New York. The sun's position at this time computes to\r\n * {@link #ZENITH_9_POINT_75 9.75°} below the western horizon. This is the opinion of Rabbi Eliyahu Henkin. This also follows the opinion of\r\n * Rabbi Shmuel Kamenetsky. Rabbi Yaakov Shakow presented\r\n * these degree-based times to Rabbi Shmuel Kamenetsky who agreed to them.\r\n * \r\n * @todo recalculate based on equinox / equilux.\r\n * @return the Date
representing the time when the sun is 9.75° below sea level. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of\r\n * the Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a\r\n * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n *\r\n * @see #getTzais60()\r\n */\r\n public getTzaisGeonim9Point75Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_9_POINT_75);\r\n }\r\n\r\n /**\r\n * This method returns the tzais (nightfall) based on the opinion of the Chavas Yair and Divrei Malkiel that the time to walk the distance of a Mil is 15 minutes for a total of 60 minutes\r\n * for 4 Mil after {@link #getSeaLevelSunset() sea level sunset}. See detailed documentation explaining the\r\n * 60 minute concept at {@link #getAlos60()}.\r\n * \r\n * @return the Date
representing 60 minutes after sea level sunset. If the calculation can't be\r\n * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n * and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getAlos60()\r\n * @see #getPlagHamincha60Minutes()\r\n * @see #getShaahZmanis60Minutes()\r\n */\r\n public getTzais60() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 60 })\r\n }\r\n\r\n /**\r\n * This method returns tzais usually calculated as 40 minutes (configurable to any offset via\r\n * {@link #setAteretTorahSunsetOffset(double)}) after sunset. Please note that Chacham Yosef Harari-Raful\r\n * of Yeshivat Ateret Torah who uses this time, does so only for calculating various other zmanai hayom\r\n * such as Sof Zman Krias Shema and Plag Hamincha. His calendars do not publish a zman\r\n * for Tzais. It should also be noted that Chacham Harari-Raful provided a 25 minute zman\r\n * for Israel. This API uses 40 minutes year round in any place on the globe by default. This offset can be change\r\n * by calling {@link #setAteretTorahSunsetOffset(double)}.\r\n * \r\n * @return the Date
representing 40 minutes (configurable via {@link #setAteretTorahSunsetOffset})\r\n * after sea level sunset. If the calculation can't be computed such as in the Arctic Circle where there is\r\n * at least one day a year where the sun does not rise, and one where it does not set, a null will be\r\n * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getTzaisAteretTorah() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: this.getAteretTorahSunsetOffset() });\r\n }\r\n\r\n /**\r\n * Returns the offset in minutes after sunset used to calculate tzais based on the calculations of\r\n * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculations. The default value is 40 minutes.\r\n * This affects most zmanim, since almost all zmanim use subset as part of their calculation.\r\n * \r\n * @return the number of minutes after sunset for Tzait.\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getAteretTorahSunsetOffset(): number {\r\n return this.ateretTorahSunsetOffset;\r\n }\r\n\r\n /**\r\n * Allows setting the offset in minutes after sunset for the Ateret Torah zmanim. The default if unset is\r\n * 40 minutes. Chacham Yosef Harari-Raful of Yeshivat Ateret Torah uses 40 minutes globally with the exception\r\n * of Israel where a 25 minute offset is used. This 40 minute (or any other) offset can be overridden by this method.\r\n * This offset impacts all Ateret Torah zmanim.\r\n * \r\n * @param ateretTorahSunsetOffset\r\n * the number of minutes after sunset to use as an offset for the Ateret Torah tzais\r\n * @see #getAteretTorahSunsetOffset()\r\n */\r\n public setAteretTorahSunsetOffset(ateretTorahSunsetOffset: number): void {\r\n this.ateretTorahSunsetOffset = ateretTorahSunsetOffset;\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the\r\n * calculation of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts\r\n * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending\r\n * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via\r\n * {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and added\r\n * to {@link #getAlos72Zmanis() alos} to reach this time. This time is 3\r\n * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after\r\n * {@link #getAlos72Zmanis() alos 72 zmaniyos}. Note: Based on this calculation chatzos\r\n * will not be at midday.\r\n * \r\n * @return the Date
of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * @see #getShaahZmanisAteretTorah()\r\n */\r\n public getSofZmanShmaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getAlos72Zmanis(), this.getTzaisAteretTorah()!);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) based on the calculation\r\n * of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis()\r\n * 1/10th of the day} before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes\r\n * after sunset} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos\r\n * are calculated based on this day and added to {@link #getAlos72Zmanis() alos} to reach this time. This time\r\n * is 4 * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after\r\n * {@link #getAlos72Zmanis() alos 72 zmaniyos}.\r\n * Note: Based on this calculation chatzos will not be at midday.\r\n * \r\n * @return the Date
of the latest zman krias shema based on this calculation. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation\r\n * on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n */\r\n public getSofZmanTfilahAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getAlos72Zmanis(), this.getTzaisAteretTorah()!);\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola based on the calculation of Chacham Yosef\r\n * Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day}\r\n * before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset}\r\n * (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest\r\n * time to pray mincha according to the opinion of the Rambam and others. For more information on this see the documentation on {@link #getMinchaGedola() mincha\r\n * gedola}. This is calculated as 6.5 {@link #getShaahZmanisAteretTorah() solar hours} after alos. The\r\n * calculation used is 6.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}.\r\n * \r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetanaAteretTorah()\r\n * @see ZmanimCalendar#getMinchaGedola()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * \r\n * @return the Date
of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaGedolaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaGedola(this.getAlos72Zmanis(), this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana based on the calculation of\r\n * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts\r\n * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending\r\n * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via\r\n * {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest time to pray mincha\r\n * according to the opinion of the Rambam and others.\r\n * For more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is\r\n * calculated as 9.5 {@link #getShaahZmanisAteretTorah() solar hours} after {@link #getAlos72Zmanis() alos}.\r\n * The calculation used is 9.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}.\r\n * \r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #getAteretTorahSunsetOffset()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * @see #getMinchaGedola()\r\n * @see #getMinchaKetana()\r\n * @return the Date
of the time of mincha ketana. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaKetanaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getAlos72Zmanis(), this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha based on the calculation of Chacham Yosef Harari-Raful\r\n * of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is\r\n * usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset\r\n * via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and\r\n * added to {@link #getAlos72Zmanis() alos} to reach this time. This time is 10.75\r\n * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after {@link #getAlos72Zmanis()\r\n * dawn}.\r\n * \r\n * @return the Date
of the plag. If the calculation can't be computed such as in the Arctic Circle\r\n * where there is at least one day a year where the sun does not rise, and one where it does not set, a null\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72Zmanis()\r\n * @see #getTzaisAteretTorah()\r\n * @see #getShaahZmanisAteretTorah()\r\n * @see #setAteretTorahSunsetOffset(double)\r\n * @see #getAteretTorahSunsetOffset()\r\n */\r\n public getPlagHaminchaAteretTorah(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getAlos72Zmanis(), this.getTzaisAteretTorah());\r\n }\r\n\r\n /**\r\n * This method returns the time of misheyakir based on the common calculation of the Syrian community in NY\r\n * that the alos is a fixed minute offset from day starting {@link #getAlos72Zmanis() 1/10th of the day}\r\n * before sunrise. The common offsets are 6 minutes (based on the Pri Megadim, but not linked to the\r\n * calculation of Alos as 1/10th of the day), 8 and 18 minutes (possibly attributed to\r\n * Chacham Baruch Ben Haim). Since there is no universal accepted offset, the user of this API will have to\r\n * Chacham Baruch Ben Haim). Since there is no\r\n * universal accepted offset, the user of this API will have to specify one. Chacham Yosef Harari-Raful of\r\n * Yeshivat Ateret Torah does not supply any zman for misheyakir and does not endorse any\r\n * specific calculation for misheyakir. For that reason, this method is not a public method.\r\n *\r\n * @param minutes\r\n * the number of minutes after alos calculated as {@link #getAlos72Zmanis() 1/10th of the day}\r\n * @return the Date
of misheyakir. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos72Zmanis()\r\n */\r\n private getMesheyakirAteretTorah(minutes: number) {\r\n return this.getAlos72Zmanis()?.add({ minutes })\r\n }\r\n\r\n /**\r\n * Method to return tzais (dusk) calculated as 72 minutes zmaniyos, or 1/10th of the day after\r\n * {@link #getSeaLevelSunset() sea level sunset}. This is the way that the Minchas Cohen in Ma'amar 2:4 calculates Rebbeinu Tam's\r\n * time of tzeis. It should be noted that this calculation results in the shortest time from sunset to\r\n * tzais being during the winter solstice, the longest at the summer solstice and 72 clock minutes at the\r\n * equinox. This does not match reality, since there is no direct relationship between the length of the day and\r\n * twilight. The shortest twilight is during the equinox, the longest is during the the summer solstice, and in the\r\n * winter with the shortest daylight, the twilight period is longer than during the equinoxes.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos72Zmanis()\r\n */\r\n public getTzais72Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(1.2);\r\n }\r\n\r\n /**\r\n * A utility method to return alos (dawn) or tzais (dusk) based on a fractional day offset. \r\n * @param hours the number of shaaos zmaniyos (temporal hours) before sunrise or after sunset that defines dawn\r\n * or dusk. If a negative number is passed in, it will return the time of alos (dawn) (subtracting the\r\n * time from sunrise) and if a positive number is passed in, it will return the time of tzais (dusk)\r\n * (adding the time to sunset). If 0 is passed in, a null will be returned (since we can't tell if it is sunrise\r\n * or sunset based).\r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. A null will also be returned if 0 is passed in, since we can't tell if it is sunrise\r\n * or sunset based. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n private getZmanisBasedOffset(hours: 0): undefined;\r\n private getZmanisBasedOffset(hours: ExcludeDate
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos90Zmanis()\r\n */\r\n public getTzais90Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(1.5);\r\n }\r\n\r\n /**\r\n * Method to return tzais (dusk) calculated using 96 minutes zmaniyos or 1/7.5 of the day after\r\n * {@link #getSeaLevelSunset() sea level sunset}.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos96Zmanis()\r\n */\r\n public getTzais96Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(1.6);\r\n }\r\n\r\n /**\r\n * Method to return tzais (dusk) calculated as 90 minutes after sea level sunset. This method returns\r\n * tzais (nightfall) based on the opinion of the Magen Avraham that the time to walk the distance of a\r\n * Mil according to the Rambam's opinion\r\n * is 18 minutes for a total of 90 minutes based on the opinion of Ula who calculated tzais as 5\r\n * Mil after sea level shkiah (sunset). A similar calculation {@link #getTzais19Point8Degrees()}\r\n * uses solar position calculations based on this time.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getTzais19Point8Degrees()\r\n * @see #getAlos90()\r\n */\r\n public getTzais90() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 90 })\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns tzais (nightfall) based on the calculations\r\n * of Rav Chaim Naeh that the time to walk the\r\n * distance of a Mil according to the Rambam's opinion\r\n * is 2/5 of an hour (24 minutes) for a total of 120 minutes based on the opinion of Ula who calculated\r\n * tzais as 5 Mil after sea level shkiah (sunset). A similar calculation {@link\r\n * #getTzais26Degrees()} uses degree-based calculations based on this 120 minute calculation. Since the zman\r\n * is extremely late and at a point that is long past the 18° point where the darkest point is\r\n * reached, it should only be used lechumra, such as delaying the start of nighttime mitzvos.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}.\r\n * documentation.\r\n * @see #getTzais26Degrees()\r\n * @see #getAlos120()\r\n */\r\n public getTzais120() {\r\n return this.getElevationAdjustedSunset()!.add({ minutes: 120 })\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns tzais (dusk) calculated using 120 minutes\r\n * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. Since the zman\r\n * is extremely late and at a point when the it is long past the 18° point where the darkest point is\r\n * reached, it should only be used lechumra, such as delaying the start of nighttime mitzvos.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos120Zmanis()\r\n * @see #getTzais120()\r\n * @see #getTzais26Degrees()\r\n */\r\n public getTzais120Zmanis(): Temporal.ZonedDateTime | null {\r\n return this.getZmanisBasedOffset(2);\r\n }\r\n\r\n /**\r\n * This calculates the time of tzais at the point when the sun is 16.1° below the horizon. This is\r\n * the sun's dip below the horizon 72 minutes after sunset according Rabbeinu Tam's calculation of tzais\r\n * around the equinox / equilux in\r\n * Jerusalem. The question of equinox VS equilux is complex, with Rabbi Meir Posen in the Ohr Meir of the opinion that the equilux should be used. See\r\n * Yisrael Vehazmanim vol I, 34:1:4. Rabbi Yedidya Manet in his Zmanei Halacha Lema'aseh (4th edition part 2, pages\r\n * and 22 and 24) and Rabbi Yonah Metzbuch (in a letter published by Rabbi Manet) are of the opinion that the\r\n * astronomical equinox should be used. The difference adds up to about 9 seconds, too trivial to make much of a\r\n * difference. For information on how this is calculated see the comments on {@link #getAlos16Point1Degrees()}.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTzais72()\r\n * @see #getAlos16Point1Degrees() for more information on this calculation.\r\n */\r\n public getTzais16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_16_POINT_1);\r\n }\r\n\r\n /**\r\n * This method should be used lechumra only and returns tzais based on when the sun is 26°\r\n * below the horizon.For information on how this is calculated see the comments on {@link #getAlos26Degrees()}.\r\n * Since the zman is extremely late and at a point when it is long past the 18° point where the\r\n * darkest point is reached, it should only be used lechumra such as delaying the start of nighttime\r\n * mitzvos.\r\n * \r\n * @deprecated This method should be used lechumra only since it returns a very late time, and if used\r\n * lekula can result in chillul Shabbos etc. There is no current plan to remove this\r\n * method from the API, and this deprecation is intended to alert developers of the danger of using it.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTzais120()\r\n * @see #getAlos26Degrees()\r\n */\r\n public getTzais26Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_26_DEGREES);\r\n }\r\n\r\n /**\r\n * For information on how this is calculated see the comments on {@link #getAlos18Degrees()}\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos18Degrees()\r\n */\r\n public getTzais18Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ASTRONOMICAL_ZENITH);\r\n }\r\n\r\n /**\r\n * For information on how this is calculated see the comments on {@link #getAlos19Point8Degrees()}\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as northern and\r\n * southern locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may\r\n * not reach low enough below the horizon for this calculation, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getTzais90()\r\n * @see #getAlos19Point8Degrees()\r\n */\r\n public getTzais19Point8Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_19_POINT_8);\r\n }\r\n\r\n /**\r\n * A method to return tzais (dusk) calculated as 96 minutes after sea level sunset. For information on how\r\n * this is calculated see the comments on {@link #getAlos96()}.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * @see #getAlos96()\r\n */\r\n public getTzais96() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 96 });\r\n }\r\n\r\n /**\r\n * A method that returns the local time for fixed chatzos. This time is noon and midnight adjusted from\r\n * standard time to account for the local latitude. The 360° of the globe divided by 24 calculates to 15°\r\n * per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... Chatzos is at exactly 12:00\r\n * noon. This is the time of chatzos according to the Aruch Hashulchan in Orach Chaim 233:14 and Rabbi Moshe Feinstein in Igros Moshe Orach Chaim 1:24 and 2:20.\r\n * Lakewood, N.J., with a longitude of -74.2094, is 0.7906 away from the closest multiple of 15 at -75°. This\r\n * is multiplied by 4 to yield 3 minutes and 10 seconds for a chatzos of 11:56:50. This method is not tied\r\n * to the theoretical 15° timezones, but will adjust to the actual timezone and Daylight saving time.\r\n * \r\n * @return the Date representing the local chatzos\r\n * @see GeoLocation#getLocalMeanTimeOffset()\r\n */\r\n public getFixedLocalChatzos() {\r\n const geoLocation: GeoLocation = this.getGeoLocation();\r\n const rawOffsetHours = TimeZone.getRawOffset(geoLocation.getTimeZone()) / ComplexZmanimCalendar.HOUR_NANOS;\r\n return this.getDateFromTime(12 - rawOffsetHours, true)?.subtract({ nanoseconds: Math.trunc(geoLocation.getLocalMeanTimeOffset()) })\r\n }\r\n\r\n /**\r\n * A method that returns the latest zman krias shema (time to recite Shema in the morning) calculated as 3\r\n * clock hours before {@link #getFixedLocalChatzos()}. Note that there are opinions brought down in Yisrael Vehazmanim\r\n * page 57 and Rav Yitzchak Silber's Sha'aos Shavos Balalacha that this calculation is a mistake and regular\r\n * chatzos shoud be used for clock-hour calculations as opposed to fixed local chatzos. According to\r\n * these opinions it should be 3 clock hours before regular chatzos as calculated in {@link\r\n * #getSofZmanShma3HoursBeforeChatzos()}.\r\n * \r\n * @return the Date
of the latest zman krias shema calculated as 3 clock hours before\r\n * {@link #getFixedLocalChatzos()}.\r\n * @see #getFixedLocalChatzos()\r\n * @see #getSofZmanShma3HoursBeforeChatzos()\r\n * @see #getSofZmanTfilaFixedLocal()\r\n * \r\n * @deprecated This method of calculating sof zman Shma is considered a mistaken understanding of the proper\r\n * calculation of this zman in the opinion of Rav Yitzchak Silber's Sha'aos Shavos Balalacha. On pages 316-318 he discusses Rav Yisrael\r\n * Harfenes's calculations and points to his seeming agreement that using fixed local chatzos as the focal\r\n * point is problematic. See Yisrael Vehazmanim page 57. While the Yisrael Vehazmanim mentions\r\n * this issue in vol. 1, it was not corrected in the calculations in vol. 3 and other parts of the sefer.\r\n * A competent rabbinical authority should be consulted before using this zman. Instead, the use of {@link\r\n * #getSofZmanShma3HoursBeforeChatzos()} should be used to calculate sof zman Tfila using 3 fixed clock hours.\r\n * This will likely be removed in v3.0.\r\n */\r\n public getSofZmanShmaFixedLocal() {\r\n return this.getFixedLocalChatzos()?.subtract({ minutes: 180 });\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfila (time to recite the morning prayers) calculated as 2 hours\r\n * before {@link #getFixedLocalChatzos()}. See the documentation on {@link #getSofZmanShmaFixedLocal()} showing\r\n * differing opinions on how the zman is calculated. According to many opinions {@link\r\n * #getSofZmanTfila2HoursBeforeChatzos()} should be used as opposed to this zman.\r\n * \r\n * @return the Date
of the latest zman tfila.\r\n * @see #getFixedLocalChatzos()\r\n * @see #getSofZmanShmaFixedLocal()\r\n * @see #getSofZmanTfila2HoursBeforeChatzos()\r\n * \r\n * @deprecated This method of calculating sof zman Tfila is considered a mistaken understanding of the proper\r\n * calculation of this zman in the opinion of Rav Yitzchak Silber's Sha'aos Shavos Balalacha. On pages 316-318 he discusses Rav Yisrael\r\n * Harfenes's calculations and points to his seeming agreement that using fixed local chatzos as the focal\r\n * point is problematic. See Yisrael Vehazmanim page 57. While the Yisrael Vehazmanim mentions\r\n * this issue in vol. 1, it was not corrected in the calculations in vol. 3 and other parts of the sefer.\r\n * A competent rabbinical authority should be consulted before using this zman. Instead, the use of {@link\r\n * #getSofZmanTfila2HoursBeforeChatzos()} should be used to calculate sof zman Tfila using 2 fixed\r\n * clock hours. This will likely be removed in v3.0.\r\n */\r\n public getSofZmanTfilaFixedLocal() {\r\n return this.getFixedLocalChatzos()?.subtract({ minutes: 120 });\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kidush Levana according to the Maharil's opinion that it is calculated as\r\n * halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time\r\n * between molad and molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad.\r\n * If the time of sof zman Kiddush Levana occurs during the day (between the alos and tzais passed in\r\n * as parameters), it returns the alos passed in. If a null alos or tzais are passed to this method,\r\n * the non-daytime adjusted time will be returned.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and\r\n * ending at tzais), the time returned will be alos. If either the alos or tzais\r\n * parameters are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at\r\n * tzais), the time returned will be alos. If either the alos or tzais parameter\r\n * are null, no daytime adjustment will be made.\r\n * @return the Date representing the moment halfway between molad and molad. If the time occurs between\r\n * alos and tzais, alos will be returned\r\n * @see #getSofZmanKidushLevanaBetweenMoldos()\r\n * @see #getSofZmanKidushLevana15Days(Date, Date)\r\n * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos()\r\n */\r\n public getSofZmanKidushLevanaBetweenMoldos(alos: Temporal.ZonedDateTime, tzais: Temporal.ZonedDateTime) : Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in French\r\n // Polynesia on Dec 2027 when kiddush Levana 3 days can be said on Rosh Chodesh, the sof zman Kiddush Levana\r\n // will be on the 12th of the Teves. In the case of Anadyr, Russia on Jan, 2071, sof zman Kiddush Levana between the\r\n // moldos will occur is on the night of 17th of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() < 11 || jewishCalendar.getJewishDayOfMonth() > 16) { \r\n return null;\r\n }\r\n return this.getMoladBasedTime(jewishCalendar.getSofZmanKidushLevanaBetweenMoldos(), alos, tzais, false);\r\n }\r\n\r\n /**\r\n * Returns the Date of the molad based time if it occurs on the current date. Since Kiddush Levana\r\n * can only be said during the day, there are parameters to limit it to between alos and tzais. If\r\n * the time occurs between alos and tzais, tzais will be returned.\r\n * \r\n * @param moladBasedTime\r\n * the molad based time such as molad, tchilas and sof zman Kiddush Levana\r\n * @param alos\r\n * optional start of day to limit molad times to the end of the night before or beginning of the next night.\r\n * Ignored if either alos or tzais are null.\r\n * @param tzais\r\n * optional end of day to limit molad times to the end of the night before or beginning of the next night.\r\n * Ignored if either tzais or alos are null\r\n * @param techila\r\n * is it the start of Kiddush Levana time or the end? If it is start roll it to the next tzais, and\r\n * and if it is the end, return the end of the previous night (alos passed in). Ignored if either\r\n * alos or tzais are null.\r\n * @return the molad based time. If the zman does not occur during the current date, null will be returned. \r\n */\r\n private getMoladBasedTime(moladBasedTime: Temporal.ZonedDateTime, alos: Temporal.ZonedDateTime | null, tzais: Temporal.ZonedDateTime | null, techila: boolean): Temporal.ZonedDateTime | null {\r\n const lastMidnight: Temporal.ZonedDateTime = this.getMidnightLastNight();\r\n const midnightTonight: Temporal.ZonedDateTime = this.getMidnightTonight();\r\n\r\n if (!((moladBasedTime < lastMidnight) || (moladBasedTime > midnightTonight))) {\r\n if (alos !== null || tzais !== null) {\r\n return techila && !(moladBasedTime < tzais! || moladBasedTime > alos!)\r\n ? tzais\r\n : alos;\r\n }\r\n return moladBasedTime;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Returns the latest time of Kiddush Levana calculated as 15 days after the molad. This is the\r\n * opinion brought down in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the\r\n * Rema who brings down the opinion of the Maharil's of calculating\r\n * {@link #getSofZmanKidushLevanaBetweenMoldos(Date, Date) half way between molad and molad} is of\r\n * the opinion that the Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject,\r\n * see Rabbi Dovid Heber's very detailed write-up in Siman Daled (chapter 4) of Shaarei Zmanim. If the time of sof zman Kiddush Levana occurs during\r\n * the day (between the alos and tzais passed in as parameters), it returns the alos passed in. If a\r\n * null alos or tzais are passed to this method, the non-daytime adjusted time will be returned.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and\r\n * ending at tzais), the time returned will be alos. If either the alos or tzais\r\n * parameters are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at\r\n * tzais), the time returned will be alos. If either the alos or tzais parameters\r\n * are null, no daytime adjustment will be made.\r\n *\r\n * @return the Date representing the moment 15 days after the molad. If the time occurs between alos and\r\n * tzais, alos will be returned\r\n * \r\n * @see #getSofZmanKidushLevanaBetweenMoldos(Date, Date)\r\n * @see JewishCalendar#getSofZmanKidushLevana15Days()\r\n */\r\n public getSofZmanKidushLevana15Days(alos: Temporal.ZonedDateTime | null = null, tzais: Temporal.ZonedDateTime | null = null): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n\r\n // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in\r\n // French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on Rosh Chodesh, the sof zman Kiddush\r\n // Levana will be on the 12th of the Teves. in the case of Anadyr, Russia on Jan, 2071, sof zman kiddush levana will\r\n // occur after midnight on the 17th of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() < 11 || jewishCalendar.getJewishDayOfMonth() > 17) {\r\n return null;\r\n }\r\n return this.getMoladBasedTime(jewishCalendar.getSofZmanKidushLevana15Days(), alos, tzais, false);\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana according to Rabbeinu Yonah's opinion that it can be said 3 days after the molad.\r\n * If the time of tchilas zman Kiddush Levana occurs during the day (between alos and tzais passed to\r\n * this method) it will return the following tzais. If null is passed for either alos or tzais, the actual\r\n * tchilas zman Kiddush Levana will be returned, regardless of if it is during the day or not.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending\r\n * at tzais), the time returned will be tzais. If either the alos or tzais parameters\r\n * are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at\r\n * tzais), the time returned will be tzais. If either the alos or tzais parameters\r\n * are null, no daytime adjustment will be made.\r\n *\r\n * @return the Date representing the moment 3 days after the molad. If the time occurs between alos and\r\n * tzais, tzais will be returned\r\n * @see #getTchilasZmanKidushLevana3Days()\r\n * @see #getTchilasZmanKidushLevana7Days(Date, Date)\r\n * @see JewishCalendar#getTchilasZmanKidushLevana3Days()\r\n */\r\n public getTchilasZmanKidushLevana3Days(alos: Temporal.ZonedDateTime | null = null, tzais: Temporal.ZonedDateTime | null = null): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar();\r\n jewishCalendar.setGregorianDate(this.getDate().year, this.getDate().month - 1, this.getDate().day);\r\n\r\n // Do not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 3 days for\r\n // the extreme case of Rapa Iti in French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on the evening\r\n // of the 30th, the second night of Rosh Chodesh. The 3rd day after the molad will be on the 4th of the month.\r\n // In the case of Anadyr, Russia on Jan, 2071, when sof zman kiddush levana is on the 17th of the month, the 3rd day\r\n // from the molad will be on the 5th day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() > 5 && jewishCalendar.getJewishDayOfMonth() < 30) {\r\n return null;\r\n }\r\n\r\n let zman: Temporal.ZonedDateTime | null = this.getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), alos, tzais, true);\r\n\r\n // Get the following month's zman kiddush Levana for the extreme case of Rapa Iti in French Polynesia on Dec 2027 when\r\n // kiddush Levana can be said on Rosh Chodesh (the evening of the 30th). See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (page 32)\r\n if (zman === null && jewishCalendar.getJewishDayOfMonth() === 30) {\r\n jewishCalendar.forward(Calendar.MONTH, 1);\r\n zman = this.getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), null, null, true);\r\n }\r\n\r\n return zman;\r\n }\r\n\r\n /**\r\n * Returns the point in time of Molad as a Date
Object. For the traditional day of week, hour,\r\n * minute and chalakim, {@link JewishCalendar#getMoladAsDate()} and the not yet completed\r\n * {@link HebrewDateFormatter} that will have formatting for this.\r\n * \r\n * @return the Date representing the moment of the molad. If the molad does not occur on this day, a null will be returned.\r\n * \r\n * @see #getTchilasZmanKidushLevana3Days()\r\n * @see #getTchilasZmanKidushLevana7Days(Date, Date)\r\n * @see JewishCalendar#getMoladAsDate()\r\n */\r\n public getZmanMolad(): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n\r\n // Optimize to not calculate for impossible dates, but account for extreme cases. The molad in the extreme case of Rapa\r\n // Iti in French Polynesia on Dec 2027 occurs on the night of the 27th of Kislev. In the case of Anadyr, Russia on\r\n // Jan 2071, the molad will be on the 2nd day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() > 2 && jewishCalendar.getJewishDayOfMonth() < 27) {\r\n return null;\r\n }\r\n\r\n let molad: Temporal.ZonedDateTime | null = this.getMoladBasedTime(jewishCalendar.getMoladAsDate(), null, null, true);\r\n\r\n // deal with molad that happens on the end of the previous month\r\n if (molad === null && jewishCalendar.getJewishDayOfMonth() > 26) {\r\n jewishCalendar.setDate(jewishCalendar.getDate().add({ months: 1 }))\r\n molad = this.getMoladBasedTime(jewishCalendar.getMoladAsDate(), null, null, true);\r\n }\r\n return molad;\r\n }\r\n\r\n /**\r\n * Used by Molad based zmanim to determine if zmanim occur during the current day.\r\n * @see #getMoladBasedTime(Date, Date, Date, boolean)\r\n * @return previous midnight\r\n */\r\n private getMidnightLastNight(): Temporal.ZonedDateTime {\r\n // reset hour, minutes, seconds and millis\r\n return this.getDate().toZonedDateTime(this.getGeoLocation().getTimeZone()).with({\r\n hour: 0,\r\n minute: 0,\r\n second: 0,\r\n millisecond: 0,\r\n });\r\n }\r\n\r\n /**\r\n * Used by Molad based zmanim to determine if zmanim occur during the current day.\r\n * @see #getMoladBasedTime(Date, Date, Date, boolean)\r\n * @return following midnight\r\n */\r\n private getMidnightTonight(): Temporal.ZonedDateTime {\r\n return this.getDate().toZonedDateTime(this.getGeoLocation().getTimeZone())\r\n .add({ days: 1 })\r\n .with({\r\n hour: 0,\r\n minute: 0,\r\n second: 0,\r\n millisecond: 0,\r\n });\r\n }\r\n\r\n /**\r\n * Returns the earliest time of Kiddush Levana according to the opinions that it should not be said until 7\r\n * days after the molad. If the time of tchilas zman Kiddush Levana occurs during the day (between\r\n * {@link ZmanimCalendar#getAlos72() alos} and {@link ZmanimCalendar#getTzais72() tzais}) it\r\n * return the next tzais.\r\n * \r\n * @param alos\r\n * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos\r\n * and ending at tzais), the time returned will be tzais. If either the alos or\r\n * tzais parameters are null, no daytime adjustment will be made.\r\n * @param tzais\r\n * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and\r\n * ending at tzais), the time returned will be tzais. If either the alos or\r\n * tzais parameters are null, no daytime adjustment will be made.\r\n *\r\n * @return the Date representing the moment 7 days after the molad. If the time occurs between alos and\r\n * tzais, tzais will be returned\r\n * @see #getTchilasZmanKidushLevana3Days(Date, Date)\r\n * @see #getTchilasZmanKidushLevana7Days()\r\n * @see JewishCalendar#getTchilasZmanKidushLevana7Days()\r\n */\r\n public getTchilasZmanKidushLevana7Days(alos: Temporal.ZonedDateTime | null = null, tzais: Temporal.ZonedDateTime | null = null): Temporal.ZonedDateTime | null {\r\n const jewishCalendar: JewishCalendar = new JewishCalendar(this.getDate());\r\n\r\n // Optimize to not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 7 days for\r\n // the extreme case of Rapa Iti in French Polynesia on Jan 2028 (when kiddush Levana 3 days can be said on the evening\r\n // of the 30th, the second night of Rosh Chodesh), the 7th day after the molad will be on the 4th of the month.\r\n // In the case of Anadyr, Russia on Jan, 2071, when sof zman kiddush levana is on the 17th of the month, the 7th day\r\n // from the molad will be on the 9th day of Shevat. See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (pages 28 and 32).\r\n if (jewishCalendar.getJewishDayOfMonth() < 4 || jewishCalendar.getJewishDayOfMonth() > 9) {\r\n return null;\r\n }\r\n\r\n return this.getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana7Days(), alos, tzais, true);\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to\r\n * the opinion of theGRA. This time is identical to the {@link\r\n * #getSofZmanTfilaGRA() Sof zman tfilah GRA} and is provided as a convenience method for those who are\r\n * unaware how this zman is calculated. This time is 4 hours into the day based on the opinion of the\r\n * GRA that the day is calculated from sunrise to sunset.\r\n * This returns the time 4 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea level sunrise}.\r\n * \r\n * @see ZmanimCalendar#getShaahZmanisGra()\r\n * @see ZmanimCalendar#getSofZmanTfilaGRA()\r\n * @return the Date
one is allowed eating chametz on Erev Pesach. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does\r\n * not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanAchilasChametzGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaGRA();\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the\r\n * opinion of the Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is identical to the\r\n * {@link #getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link #getShaahZmanisMGA()\r\n * shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of the MGA that the day is\r\n * calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link #getTzais72() nightfall} of 72 minutes\r\n * after sunset. This returns the time of 4 * {@link #getShaahZmanisMGA()} after {@link #getAlos72() dawn}.\r\n * \r\n * @return the Date
of the latest time of eating chametz. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set), a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanisMGA()\r\n * @see #getAlos72()\r\n * @see #getSofZmanTfilaMGA72Minutes()\r\n */\r\n public getSofZmanAchilasChametzMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaMGA72Minutes();\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the\r\n * opinion of theMagen Avraham (MGA) based on alos\r\n * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time is 4 {@link\r\n * #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees() dawn}\r\n * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1°\r\n * below sunrise or sunset. This returns the time of 4 {@link #getShaahZmanis16Point1Degrees()} after\r\n * {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest time of eating chametz. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where\r\n * the sun may not reach low enough below the horizon for this calculation, a null will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getSofZmanTfilaMGA16Point1Degrees()\r\n */\r\n public getSofZmanAchilasChametzMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaMGA16Point1Degrees();\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion\r\n * of the GRA. This time is 5 hours into the day based on the\r\n * opinion of the GRA that the day is calculated from\r\n * sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea\r\n * level sunrise}.\r\n * \r\n * @see ZmanimCalendar#getShaahZmanisGra()\r\n * @return the Date
of the latest time for burning chametz on Erev Pesach. If the\r\n * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where\r\n * the sun does not rise, and one where it does not set, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanBiurChametzGRA(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getElevationAdjustedSunrise(), this.getElevationAdjustedSunset(), 5);\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of\r\n * the Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 5 {@link\r\n * #getShaahZmanisMGA() shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of\r\n * the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link\r\n * #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link #getShaahZmanisMGA()} after\r\n * {@link #getAlos72() dawn}.\r\n * \r\n * @return the Date
of the latest time for burning chametz on Erev Pesach. If the calculation\r\n * 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,\r\n * and one where it does not set), a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * @see #getShaahZmanisMGA()\r\n * @see #getAlos72()\r\n */\r\n public getSofZmanBiurChametzMGA72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getAlos72()!, this.getTzais72()!, 5);\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion\r\n * of the Magen Avraham (MGA) based on alos\r\n * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time is 5\r\n * {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees()\r\n * dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1°\r\n * below sunrise or sunset. This returns the time of 5 {@link #getShaahZmanis16Point1Degrees()} after\r\n * {@link #getAlos16Point1Degrees() dawn}.\r\n * \r\n * @return the Date
of the latest time for burning chametz on Erev Pesach. If the calculation\r\n * can't be computed such as northern and southern locations even south of the Arctic Circle and north of the\r\n * Antarctic Circle where the sun may not reach low enough below the horizon for this calculation, a null\r\n * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @see #getAlos16Point1Degrees()\r\n */\r\n public getSofZmanBiurChametzMGA16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getAlos16Point1Degrees(), this.getTzais16Point1Degrees(), 5);\r\n }\r\n\r\n /**\r\n * A method that returns the Baal Hatanya's\r\n * netz amiti (sunrise) without {@link AstronomicalCalculator#getElevationAdjustment(double)\r\n * elevation adjustment}. This forms the base for the Baal Hatanya's dawn-based calculations that are\r\n * calculated as a dip below the horizon before sunrise.\r\n *\r\n * According to the Baal Hatanya, netz amiti, or true (halachic) sunrise, is when the top of the sun's\r\n * disk is visible at an elevation similar to the mountains of Eretz Yisrael. The time is calculated as the point at which\r\n * the center of the sun's disk is 1.583° below the horizon. This degree-based calculation can be found in Rabbi Shalom\r\n * DovBer Levine's commentary on The Baal\r\n * Hatanya's Seder Hachnasas Shabbos. From an elevation of 546 meters, the top of Har Hacarmel, the sun disappears when it is 1° 35' or 1.583°\r\n * below the sea level horizon. This in turn is based on the Gemara Shabbos 35a. There are other opinions brought down by\r\n * Rabbi Levine, including Rabbi Yosef Yitzchok Feigelstock who calculates it as the degrees below the horizon 4 minutes after\r\n * sunset in Yerushalayim (on the equinox). That is brought down as 1.583°. This is identical to the 1° 35' zman\r\n * and is probably a typo and should be 1.683°. These calculations are used by most Chabad calendars that use the Baal Hatanya's zmanim. See\r\n * About Our\r\n * Zmanim Calculations @ Chabad.org.\r\n *\r\n * Note: netz amiti is used only for calculating certain zmanim, and is intentionally unpublished. For\r\n * practical purposes, daytime mitzvos like shofar and lulav should not be done until after the\r\n * published time for netz / sunrise.\r\n * \r\n * @return the Date
representing the exact sea-level netz amiti (sunrise) time. If the calculation can't be\r\n * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one\r\n * where it does not set, a null will be returned. See detailed explanation on top of the page.\r\n * \r\n * @see #getSunrise()\r\n * @see #getSeaLevelSunrise()\r\n * @see #getSunsetBaalHatanya()\r\n * @see #ZENITH_1_POINT_583\r\n */\r\n private getSunriseBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_1_POINT_583);\r\n }\r\n\r\n /**\r\n * A method that returns the Baal Hatanya's\r\n * shkiah amiti (sunset) without {@link AstronomicalCalculator#getElevationAdjustment(double)\r\n * elevation adjustment}. This forms the base for the Baal Hatanya's dusk-based calculations that are calculated\r\n * as a dip below the horizon after sunset.\r\n * \r\n * According to the Baal Hatanya, shkiah amiti, true (halachic) sunset, is when the top of the \r\n * sun's disk disappears from view at an elevation similar to the mountains of Eretz Yisrael.\r\n * This time is calculated as the point at which the center of the sun's disk is 1.583 degrees below the horizon.\r\n *\r\n * Note: shkiah amiti is used only for calculating certain zmanim, and is intentionally unpublished. For\r\n * practical purposes, all daytime mitzvos should be completed before the published time for shkiah / sunset.\r\n *\r\n * For further explanation of the calculations used for the Baal Hatanya's zmanim in this library, see\r\n * About Our\r\n * Zmanim Calculations @ Chabad.org.\r\n * \r\n * @return the Date
representing the exact sea-level shkiah amiti (sunset) time. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does not\r\n * rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getSunset()\r\n * @see #getSeaLevelSunset()\r\n * @see #getSunriseBaalHatanya()\r\n * @see #ZENITH_1_POINT_583\r\n */\r\n private getSunsetBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_1_POINT_583);\r\n }\r\n\r\n /**\r\n * A method that returns the Baal Hatanya's\r\n * a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}). This forms the base for the\r\n * Baal Hatanya's day based calculations that are calculated as a 1.583° dip below the horizon after sunset. \r\n * According to the Baal Hatanya, shkiah amiti, true (halachic) sunset, is when the top of the \r\n * sun's disk disappears from view at an elevation similar to the mountains of Eretz Yisrael.\r\n * This time is calculated as the point at which the center of the sun's disk is 1.583 degrees below the horizon.\r\n * A method that returns a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}) calculated \r\n * based on the Baal Hatanya's netz\r\n * amiti and shkiah amiti using a dip of 1.583° below the sea level horizon. This calculation divides\r\n * the day based on the opinion of the Baal Hatanya that the day runs from {@link #getSunriseBaalHatanya() netz amiti}\r\n * to {@link #getSunsetBaalHatanya() shkiah amiti}. The calculations are based on a day from {@link\r\n * #getSunriseBaalHatanya() sea level netz amiti} to {@link #getSunsetBaalHatanya() sea level shkiah amiti}.\r\n * The day is split into 12 equal parts with each one being a shaah zmanis. This method is similar to {@link\r\n * #getTemporalHour}, but all calculations are based on a sea level sunrise and sunset.\r\n * @return the long
millisecond length of a shaah zmanis calculated from\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)} to {@link #getSunsetBaalHatanya() shkiah amiti\r\n * (\"real\" sunset)}. If the calculation can't be computed such as in the Arctic Circle where there is at least one day a\r\n * year where the sun does not rise, and one where it does not set, {@link Long#MIN_VALUE} will be returned. See\r\n * detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * \r\n * @see #getTemporalHour(Date, Date)\r\n * @see #getSunriseBaalHatanya()\r\n * @see #getSunsetBaalHatanya()\r\n * @see #ZENITH_1_POINT_583\r\n */\r\n public getShaahZmanisBaalHatanya() {\r\n return this.getTemporalHour(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * Returns the Baal Hatanya's alos\r\n * (dawn) calculated as the time when the sun is 16.9° below the eastern {@link #GEOMETRIC_ZENITH geometric horizon}\r\n * before {@link #getSunrise sunrise}. For more information the source of 16.9° see {@link #ZENITH_16_POINT_9}.\r\n * \r\n * @see #ZENITH_16_POINT_9\r\n * @return The Date
of dawn. If the calculation can't be computed such as northern and southern\r\n * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getAlosBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunriseOffsetByDegrees(ComplexZmanimCalendar.ZENITH_16_POINT_9);\r\n }\r\n\r\n /**\r\n * This method returns the latest zman krias shema (time to recite Shema in the morning). This time is 3\r\n * {@link #getShaahZmanisBaalHatanya() shaos zmaniyos} (solar hours) after {@link #getSunriseBaalHatanya() \r\n * netz amiti (sunrise)} based on the opinion of the Baal Hatanya that the day is calculated from\r\n * sunrise to sunset. This returns the time 3 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() \r\n * netz amiti (sunrise)}.\r\n * \r\n * @see ZmanimCalendar#getSofZmanShma(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @return the Date
of the latest zman shema according to the Baal Hatanya. If the calculation\r\n * can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does\r\n * not rise, and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanShmaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanShma(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * This method returns the latest zman tfilah (time to recite the morning prayers). This time is 4\r\n * hours into the day based on the opinion of the Baal Hatanya that the day is\r\n * calculated from sunrise to sunset. This returns the time 4 * {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see ZmanimCalendar#getSofZmanTfila(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @return the Date
of the latest zman tfilah. If the calculation can't be computed such as in\r\n * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does\r\n * not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getSofZmanTfilaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfila(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the\r\n * opinion of the Baal Hatanya. This time is identical to the {@link #getSofZmanTfilaBaalHatanya() Sof zman tfilah\r\n * Baal Hatanya}. This time is 4 hours into the day based on the opinion of the Baal Hatanya that the day is calculated\r\n * from sunrise to sunset. This returns the time 4 {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getShaahZmanisBaalHatanya()\r\n * @see #getSofZmanTfilaBaalHatanya()\r\n * @return the Date
one is allowed eating chametz on Erev Pesach. If the calculation can't\r\n * be computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise,\r\n * and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanAchilasChametzBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSofZmanTfilaBaalHatanya();\r\n }\r\n\r\n /**\r\n * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of\r\n * the Baal Hatanya. This time is 5 hours into the day based on the opinion of the Baal Hatanya that the day is calculated\r\n * from sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getShaahZmanisBaalHatanya()\r\n * @return the Date
of the latest time for burning chametz on Erev Pesach. If the calculation\r\n * 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,\r\n * and one where it does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSofZmanBiurChametzBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getShaahZmanisBasedZman(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya(), 5)\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha gedola. Mincha gedola is the earliest time one can pray\r\n * mincha. The Rambam is of the opinion that it is\r\n * better to delay mincha until {@link #getMinchaKetanaBaalHatanya() mincha ketana} while the\r\n * Ra\"sh,\r\n * Tur, GRA and others are of the opinion that mincha can be prayed\r\n * lechatchila starting at mincha gedola. This is calculated as 6.5 {@link #getShaahZmanisBaalHatanya()\r\n * sea level solar hours} after {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. This calculation is based\r\n * on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time 6.5\r\n * * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() netz amiti (\"real\" sunrise)}.\r\n * \r\n * @see #getMinchaGedola(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @see #getMinchaKetanaBaalHatanya()\r\n * @return the Date
of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaGedolaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaGedola(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * This is a convenience method that returns the later of {@link #getMinchaGedolaBaalHatanya()} and\r\n * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisBaalHatanya()\r\n * shaah zmanis} is less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise\r\n * {@link #getMinchaGedolaBaalHatanya()} will be returned.\r\n * \r\n * @return the Date
of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getMinchaGedolaBaalHatanyaGreaterThan30(): Temporal.ZonedDateTime | null {\r\n if (this.getMinchaGedola30Minutes() === null || this.getMinchaGedolaBaalHatanya() === null) {\r\n return null;\r\n }\r\n\r\n return [\r\n this.getMinchaGedola30Minutes()!,\r\n this.getMinchaGedolaBaalHatanya()!\r\n ].sort(rZTDsort)[0];\r\n }\r\n\r\n /**\r\n * This method returns the time of mincha ketana. This is the preferred earliest time to pray\r\n * mincha in the opinion of the Rambam and others.\r\n * For more information on this see the documentation on {@link #getMinchaGedolaBaalHatanya() mincha gedola}.\r\n * This is calculated as 9.5 {@link #getShaahZmanisBaalHatanya() sea level solar hours} after {@link #getSunriseBaalHatanya()\r\n * netz amiti (sunrise)}. This calculation is calculated based on the opinion of the Baal Hatanya that the\r\n * day is calculated from sunrise to sunset. This returns the time 9.5 * {@link #getShaahZmanisBaalHatanya()} after {@link\r\n * #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getMinchaKetana(Date, Date)\r\n * @see #getShaahZmanisBaalHatanya()\r\n * @see #getMinchaGedolaBaalHatanya()\r\n * @return the Date
of the time of mincha ketana. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getMinchaKetanaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getMinchaKetana(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * This method returns the time of plag hamincha. This is calculated as 10.75 hours after sunrise. This\r\n * calculation is based on the opinion of the Baal Hatanya that the day is calculated\r\n * from sunrise to sunset. This returns the time 10.75 * {@link #getShaahZmanisBaalHatanya()} after\r\n * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.\r\n * \r\n * @see #getPlagHamincha(Date, Date)\r\n * @return the Date
of the time of plag hamincha. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the\r\n * {@link AstronomicalCalendar} documentation.\r\n */\r\n public getPlagHaminchaBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getPlagHamincha(this.getSunriseBaalHatanya(), this.getSunsetBaalHatanya());\r\n }\r\n\r\n /**\r\n * A method that returns tzais (nightfall) when the sun is 6° below the western geometric horizon\r\n * (90°) after {@link #getSunset sunset}. For information on the source of this calculation see\r\n * {@link #ZENITH_6_DEGREES}.\r\n *\r\n * @return The Date
of nightfall. If the calculation can't be computed such as northern and southern\r\n * locations even south of the Arctic Circle and north of the Antarctic Circle where the sun may not reach\r\n * low enough below the horizon for this calculation, a null will be returned. See detailed explanation on\r\n * top of the {@link AstronomicalCalendar} documentation.\r\n * @see #ZENITH_6_DEGREES\r\n */\r\n public getTzaisBaalHatanya(): Temporal.ZonedDateTime | null {\r\n return this.getSunsetOffsetByDegrees(ComplexZmanimCalendar.ZENITH_6_DEGREES);\r\n }\r\n\r\n /**\r\n * A utility methos to calculate zmanim based on Rav Moshe\r\n * Feinstein as calculated in MTJ, Yeshiva of Staten Island, and Camp Yeshiva\r\n * of Staten Island. The day is split in two, from alos / sunrise to fixed local chatzos, and the\r\n * second half of the day, from fixed local chatzos to sunset / tzais. Morning based times are calculated\r\n * based on the first 6 hours, and afternoon times based on the second half of the day.\r\n * \r\n * @param startOfHalfDay\r\n * The start of the half day. This would be alos or sunrise for morning based times and fixed\r\n * local chatzos for the second half of the day.\r\n * @param endOfHalfDay\r\n * The end of the half day. This would be fixed local chatzos for morning based times and sunset\r\n * or tzais for afternoon based times.\r\n * @param hours\r\n * the number of hours to offset the beginning of the first or second half of the day\r\n * \r\n * @return the Date
of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}.\r\n * If the calculation can't be computed such as in the Arctic Circle where there is at least one day a year\r\n * where the sun does not rise, and one where it does not set, a null will be returned. See detailed\r\n * explanation on top of the {@link AstronomicalCalendar} documentation.\r\n *\r\n * @see ComplexZmanimCalendar#getFixedLocalChatzos()\r\n */\r\n public getFixedLocalChatzosBasedZmanim(startOfHalfDay: Temporal.ZonedDateTime, endOfHalfDay: Temporal.ZonedDateTime, hours: number): Temporal.ZonedDateTime | null {\r\n if (startOfHalfDay == null || endOfHalfDay == null) {\r\n return null;\r\n }\r\n const shaahZmanis = startOfHalfDay.until(endOfHalfDay).total('nanoseconds') / 6;\r\n return startOfHalfDay.add({ nanoseconds: Math.trunc(shaahZmanis * hours) });\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos18Degrees() 18°} and ends at {@link #getFixedLocalChatzos() fixed local\r\n * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after alos or half of this half-day.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos18Degrees()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA18DegreesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos18Degrees()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos16Point1Degrees() 16.1°} and ends at {@link #getFixedLocalChatzos() fixed local\r\n * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or half of this half-day.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos16Point1Degrees()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos16Point1Degrees()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos90() 90 minutes before sunrise} and ends at {@link #getFixedLocalChatzos()\r\n * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or\r\n * half of this half-day.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos90()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA90MinutesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos90()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the Magen Avraham (MGA) that the\r\n * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts\r\n * at alos defined as {@link #getAlos72() 72 minutes before sunrise} and ends at {@link #getFixedLocalChatzos()\r\n * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or\r\n * half of this half-day.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getAlos72()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaMGA72MinutesToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getAlos72()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the\r\n * opinion of the GRA that the day is calculated from\r\n * sunrise to sunset, but calculated using the first half of the day only. The half a day starts at {@link #getSunrise()\r\n * sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman Shema is 3 shaos\r\n * zmaniyos (solar hours) after sunrise or half of this half-day.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getSunrise()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanShmaGRASunriseToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getSunrise()!, this.getFixedLocalChatzos()!, 3);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of the\r\n * calculation of sof zman tfila (zman tfilah (the latest time to recite the morning prayers))\r\n * according to the opinion of the GRA that the day is\r\n * calculated from sunrise to sunset, but calculated using the first half of the day only. The half a day starts at\r\n * {@link #getSunrise() sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman tefila\r\n * is 4 shaos zmaniyos (solar hours) after sunrise or 2/3 of this half-day.\r\n * \r\n * @return the Date
of the latest zman krias shema. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n * @see #getSunrise()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getFixedLocalChatzosBasedZmanim(Date, Date, double)\r\n */\r\n public getSofZmanTfilaGRASunriseToFixedLocalChatzos(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getSunrise()!, this.getFixedLocalChatzos()!, 4);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion of\r\n * the calculation of mincha gedola, the earliest time one can pray mincha GRAthat is 30 minutes after {@link #getFixedLocalChatzos() fixed\r\n * local chatzos}.\r\n * \r\n * @return the Date
of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getMinchaGedola()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset\r\n */\r\n public getMinchaGedolaGRAFixedLocalChatzos30Minutes() {\r\n return this.getFixedLocalChatzos()?.add({ minutes: 30 });\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion\r\n * of the calculation of mincha ketana (the preferred time to recite the mincha prayers according to\r\n * the opinion of the Rambam and others) calculated according\r\n * to the GRA that is 3.5 shaos zmaniyos (solar\r\n * hours) after {@link #getFixedLocalChatzos() fixed local chatzos}.\r\n * \r\n * @return the Date
of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getMinchaGedola()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes\r\n */\r\n public getMinchaKetanaGRAFixedLocalChatzosToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getFixedLocalChatzos()!, this.getSunset()!, 3.5);\r\n }\r\n \r\n /**\r\n * This method returns Rav Moshe Feinstein's opinion\r\n * of the calculation of plag hamincha. This method returns plag hamincha calculated according to the\r\n * GRA that the day ends at sunset and is 4.75 shaos\r\n * zmaniyos (solar hours) after {@link #getFixedLocalChatzos() fixed local chatzos}.\r\n * \r\n * @return the Date
of the time of mincha gedola. If the calculation can't be computed such as\r\n * in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it\r\n * does not set, a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n * \r\n * @see #getPlagHamincha()\r\n * @see #getFixedLocalChatzos()\r\n * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset\r\n * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes\r\n */\r\n public getPlagHaminchaGRAFixedLocalChatzosToSunset(): Temporal.ZonedDateTime | null {\r\n return this.getFixedLocalChatzosBasedZmanim(this.getFixedLocalChatzos()!, this.getSunset()!, 4.75);\r\n }\r\n \r\n /**\r\n * Method to return tzais (dusk) calculated as 50 minutes after sea level sunset. This method returns\r\n * tzais (nightfall) based on the opinion of Rabbi Moshe Feinstein for the New York area. This time should\r\n * not be used for latitudes different than the NY area.\r\n * \r\n * @return the Date
representing the time. If the calculation can't be computed such as in the Arctic\r\n * Circle where there is at least one day a year where the sun does not rise, and one where it does not set,\r\n * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}\r\n * documentation.\r\n */\r\n public getTzais50() {\r\n return this.getElevationAdjustedSunset()?.add({ minutes: 50 });\r\n }\r\n \r\n /**\r\n * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before\r\n * {@link #getMinchaKetana()} or is 9 * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link\r\n * #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()}\r\n * setting), calculated according to the GRA using a day starting at\r\n * sunrise and ending at sunset. This is the time that eating or other activity can't begin prior to praying mincha.\r\n * The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos\r\n * 16.1°}. See the Mechaber and Mishna Berurah\r\n * 232 for details.\r\n * \r\n * @see #getShaahZmanisGra()\r\n * @see #getSamuchLeMinchaKetana16Point1Degrees()\r\n * @return the Date
of the time of samuch lemincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSamuchLeMinchaKetanaGRA(): Temporal.ZonedDateTime | null {\r\n return this.getSamuchLeMinchaKetana(this.getElevationAdjustedSunrise()!, this.getElevationAdjustedSunset()!);\r\n }\r\n \r\n /**\r\n * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before\r\n * {@link #getMinchaGedola16Point1Degrees()} or 9 * shaos zmaniyos (temporal hours) after the start of the day,\r\n * calculated using a day starting and ending 16.1° below the horizon. This is the time that eating or other activity\r\n * can't begin prior to praying mincha. The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after\r\n * {@link #getAlos16Point1Degrees() alos 16.1°}. See the Mechaber and Mishna Berurah 232.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @return the Date
of the time of samuch lemincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSamuchLeMinchaKetana16Point1Degrees(): Temporal.ZonedDateTime | null {\r\n return this.getSamuchLeMinchaKetana(this.getAlos16Point1Degrees()!, this.getTzais16Point1Degrees()!);\r\n }\r\n \r\n /**\r\n * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before\r\n * {@link #getMinchaKetana72Minutes()} or 9 * shaos zmaniyos (temporal hours) after the start of the day,\r\n * calculated using a day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the time that eating\r\n * or other activity can't begin prior to praying mincha. The calculation used is 9 * {@link\r\n * #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos 16.1°}. See the Mechaber and Mishna Berurah 232.\r\n * \r\n * @see #getShaahZmanis16Point1Degrees()\r\n * @return the Date
of the time of samuch lemincha ketana. If the calculation can't be computed such\r\n * as northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle\r\n * where the sun may not reach low enough below the horizon for this calculation, a null will be returned.\r\n * See detailed explanation on top of the {@link AstronomicalCalendar} documentation.\r\n */\r\n public getSamuchLeMinchaKetana72Minutes(): Temporal.ZonedDateTime | null {\r\n return this.getSamuchLeMinchaKetana(this.getAlos72()!, this.getTzais72()!);\r\n }\r\n\r\n // eslint-disable-next-line class-methods-use-this\r\n public getClassName() {\r\n return 'com.kosherjava.zmanim.ComplexZmanimCalendar';\r\n }\r\n}\r\n", "import { UnsupportedError } from '../polyfills/errors.ts';\r\n\r\n/**\r\n * A class that represents a numeric time. Times that represent a time of day are stored as {@link java.util.Date}s in\r\n * this API. The time class is used to represent numeric time such as the time in hours, minutes, seconds and\r\n * milliseconds of a {@link AstronomicalCalendar#getTemporalHour() temporal hour}.\r\n *\r\n * @author © Eliyahu Hershfeld 2004 - 2011\r\n * @version 0.9.0\r\n */\r\n\r\nexport class Time {\r\n /** milliseconds in a second. */\r\n private static readonly SECOND_MILLIS: number = 1000;\r\n\r\n /** milliseconds in a minute. */\r\n private static readonly MINUTE_MILLIS: number = Time.SECOND_MILLIS * 60;\r\n\r\n /** milliseconds in an hour. */\r\n private static readonly HOUR_MILLIS: number = Time.MINUTE_MILLIS * 60;\r\n\r\n /**\r\n * @see #getHours()\r\n */\r\n private hours: number = 0;\r\n\r\n /**\r\n * @see #getMinutes()\r\n */\r\n private minutes: number = 0;\r\n\r\n /**\r\n * @see #getSeconds()\r\n */\r\n private seconds: number = 0;\r\n\r\n /**\r\n * @see #getMilliseconds()\r\n */\r\n private milliseconds: number = 0;\r\n\r\n /**\r\n * @see #isNegative()\r\n * @see #setIsNegative(boolean)\r\n */\r\n private negative: boolean = false;\r\n\r\n /**\r\n * Constructor with parameters for the hours, minutes, seconds and millisecods.\r\n *\r\n * @param hours the hours to set\r\n * @param minutes the minutes to set\r\n * @param seconds the seconds to set\r\n * @param milliseconds the milliseconds to set\r\n */\r\n constructor(hours: number, minutes: number, seconds: number, milliseconds: number);\r\n /**\r\n * A constructor that sets the time by milliseconds. The milliseconds are converted to hours, minutes, seconds\r\n * and milliseconds. If the milliseconds are negative it will call {@link #setIsNegative(boolean)}.\r\n * @param millis the milliseconds to set.\r\n */\r\n constructor(millis: number);\r\n /**\r\n * A constructor with 2 overloads:\r\n * - A constructor that sets the time by milliseconds.\r\n * The milliseconds are converted to hours, minutes, seconds and milliseconds. If the\r\n * milliseconds are negative it will call {@link #setIsNegative(boolean)}.\r\n * - A constructor with parameters for the hours, minutes, seconds and millisecods.\r\n * @param hoursOrMillis\r\n * @param minutes\r\n * @param seconds\r\n * @param milliseconds\r\n */\r\n constructor(hoursOrMillis: number, minutes?: number, seconds: number = 0, milliseconds: number = 0) {\r\n if (minutes) {\r\n this.hours = hoursOrMillis;\r\n this.minutes = minutes;\r\n this.seconds = seconds;\r\n this.milliseconds = milliseconds;\r\n } else {\r\n let adjustedMillis: number = hoursOrMillis;\r\n if (adjustedMillis < 0) {\r\n this.negative = true;\r\n adjustedMillis = Math.abs(adjustedMillis);\r\n }\r\n this.hours = Math.trunc(adjustedMillis / Time.HOUR_MILLIS);\r\n adjustedMillis = adjustedMillis - this.hours * Time.HOUR_MILLIS;\r\n\r\n this.minutes = Math.trunc(adjustedMillis / Time.MINUTE_MILLIS);\r\n adjustedMillis = adjustedMillis - this.minutes * Time.MINUTE_MILLIS;\r\n\r\n this.seconds = Math.trunc(adjustedMillis / Time.SECOND_MILLIS);\r\n adjustedMillis = adjustedMillis - this.seconds * Time.SECOND_MILLIS;\r\n\r\n this.milliseconds = adjustedMillis;\r\n }\r\n }\r\n\r\n /*\r\n public Time(millis: number) {\r\n this((int) millis);\r\n }\r\n\r\n public Time(millis: number) {\r\n adjustedMillis: number = millis;\r\n if (adjustedMillis < 0) {\r\n this.isNegative = true;\r\n adjustedMillis = Math.abs(adjustedMillis);\r\n }\r\n this.hours = adjustedMillis / HOUR_MILLIS;\r\n adjustedMillis = adjustedMillis - this.hours * HOUR_MILLIS;\r\n\r\n this.minutes = adjustedMillis / MINUTE_MILLIS;\r\n adjustedMillis = adjustedMillis - this.minutes * MINUTE_MILLIS;\r\n\r\n this.seconds = adjustedMillis / SECOND_MILLIS;\r\n adjustedMillis = adjustedMillis - this.seconds * SECOND_MILLIS;\r\n\r\n this.milliseconds = adjustedMillis;\r\n }\r\n */\r\n\r\n /**\r\n * Does the time represent a negative time 9such as using this to subtract time from another Time.\r\n * @return if the time is negative.\r\n */\r\n public isNegative(): boolean {\r\n return this.negative;\r\n }\r\n\r\n /**\r\n * Set this to represent a negative time.\r\n * @param isNegative that the Time represents negative time\r\n */\r\n public setIsNegative(isNegative: boolean): void {\r\n this.negative = isNegative;\r\n }\r\n\r\n /**\r\n * @return Returns the hour.\r\n */\r\n public getHours(): number {\r\n return this.hours;\r\n }\r\n\r\n /**\r\n * @param hours\r\n * The hours to set.\r\n */\r\n public setHours(hours: number): void {\r\n this.hours = hours;\r\n }\r\n\r\n /**\r\n * @return Returns the minutes.\r\n */\r\n public getMinutes(): number {\r\n return this.minutes;\r\n }\r\n\r\n /**\r\n * @param minutes\r\n * The minutes to set.\r\n */\r\n public setMinutes(minutes: number): void {\r\n this.minutes = minutes;\r\n }\r\n\r\n /**\r\n * @return Returns the seconds.\r\n */\r\n public getSeconds(): number {\r\n return this.seconds;\r\n }\r\n\r\n /**\r\n * @param seconds\r\n * The seconds to set.\r\n */\r\n public setSeconds(seconds: number): void {\r\n this.seconds = seconds;\r\n }\r\n\r\n /**\r\n * @return Returns the milliseconds.\r\n */\r\n public getMilliseconds(): number {\r\n return this.milliseconds;\r\n }\r\n\r\n /**\r\n * @param milliseconds\r\n * The milliseconds to set.\r\n */\r\n public setMilliseconds(milliseconds: number): void {\r\n this.milliseconds = milliseconds;\r\n }\r\n\r\n /**\r\n * Returns the time in milliseconds by converting hours, minutes and seconds into milliseconds.\r\n * @return the time in milliseconds\r\n */\r\n public getTime(): number {\r\n return this.hours * Time.HOUR_MILLIS + this.minutes * Time.MINUTE_MILLIS + this.seconds * Time.SECOND_MILLIS\r\n + this.milliseconds;\r\n }\r\n\r\n /**\r\n * @deprecated This depends on a circular dependency. Use new ZmanimFormatter(TimeZone.getTimeZone(\"UTC\")).format(time)instead.\r\n */\r\n // eslint-disable-next-line class-methods-use-this\r\n public toString(): string {\r\n throw new UnsupportedError('This method is deprecated, due to the fact that it depends on a circular dependency. '\r\n + 'Use `new ZmanimFormatter(TimeZone.getTimeZone(\\'UTC\\')).format(time)` instead');\r\n }\r\n}\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { IntegerUtils, StringUtils } from '../polyfills/Utils.ts';\r\n\r\n/**\r\n * A wrapper class for a astronomical times / zmanim that is mostly intended to allow sorting collections of astronomical times.\r\n * It has fields for both date/time and duration based zmanim, name / labels as well as a longer description or explanation of a\r\n * zman.\r\n *\r\n * Here is an example of various ways of sorting zmanim.\r\n *
First create the Calendar for the location you would like to calculate:\r\n *\r\n *
\r\n * String locationName = "Lakewood, NJ";\r\n * double latitude = 40.0828; // Lakewood, NJ\r\n * double longitude = -74.2094; // Lakewood, NJ\r\n * double elevation = 20; // optional elevation correction in Meters\r\n * // the String parameter in getTimeZone() has to be a valid timezone listed in {@link java.util.TimeZone#getAvailableIDs()}\r\n * TimeZone timeZone = TimeZone.getTimeZone("America/New_York");\r\n * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone);\r\n * ComplexZmanimCalendar czc = new ComplexZmanimCalendar(location);\r\n * Zman sunset = new Zman(czc.getSunset(), \"Sunset\");\r\n * Zman shaah16 = new Zman(czc.getShaahZmanis16Point1Degrees(), \"Shaah zmanis 16.1\");\r\n * Zman sunrise = new Zman(czc.getSunrise(), \"Sunrise\");\r\n * Zman shaah = new Zman(czc.getShaahZmanisGra(), \"Shaah zmanis GRA\");\r\n * ArrayList<Zman> zl = new ArrayList<Zman>();\r\n * zl.add(sunset);\r\n * zl.add(shaah16);\r\n * zl.add(sunrise);\r\n * zl.add(shaah);\r\n * //will sort sunset, shaah 1.6, sunrise, shaah GRA\r\n * System.out.println(zl);\r\n * Collections.sort(zl, Zman.DATE_ORDER);\r\n * // will sort sunrise, sunset, shaah, shaah 1.6 (the last 2 are not in any specific order)\r\n * Collections.sort(zl, Zman.DURATION_ORDER);\r\n * // will sort sunrise, sunset (the first 2 are not in any specific order), shaah GRA, shaah 1.6\r\n * Collections.sort(zl, Zman.NAME_ORDER);\r\n * // will sort shaah 1.6, shaah GRA, sunrise, sunset\r\n *\r\n *\r\n * @author © Eliyahu Hershfeld 2007-2020\r\n * @todo Add secondary sorting. As of now the {@code Comparator}s in this class do not sort by secondary order. This means that when sorting a\r\n * {@link java.util.Collection} of zmanim and using the {@link #DATE_ORDER} {@code Comparator} will have the duration based zmanim\r\n * at the end, but they will not be sorted by duration. This should be N/A for label based sorting.\r\n */\r\nexport class Zman {\r\n /**\r\n * The name / label of the zman.\r\n */\r\n label: string | null;\r\n\r\n /**\r\n * The {@link Date} of the zman\r\n */\r\n zman?: Temporal.ZonedDateTime;\r\n\r\n /**\r\n * The duration if the zman is a {@link AstronomicalCalendar#getTemporalHour() temporal hour} (or the various\r\n * shaah zmanis base times such as {@link ZmanimCalendar#getShaahZmanisGra() shaah Zmanis GRA} or\r\n * {@link ComplexZmanimCalendar#getShaahZmanis16Point1Degrees() shaah Zmanis 16.1°}).\r\n */\r\n duration?: number;\r\n\r\n /**\r\n * A longer description or explanation of a zman.\r\n */\r\n description?: string;\r\n\r\n /**\r\n * The constructor setting a {@link Date} based zman and a label.\r\n * @param date the Date of the zman.\r\n * @param label the label of the zman such as \"Sof Zman Krias Shema GRA\".\r\n * @see #Zman(long, String)\r\n */\r\n constructor(date: Temporal.ZonedDateTime, label: string | null);\r\n /**\r\n * The constructor setting a duration based zman such as\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour} (or the various shaah zmanis times such as\r\n * {@link ZmanimCalendar#getShaahZmanisGra() shaah zmanis GRA} or\r\n * {@link ComplexZmanimCalendar#getShaahZmanis16Point1Degrees() shaah Zmanis 16.1°}) and label.\r\n * @param duration a duration based zman such as ({@link AstronomicalCalendar#getTemporalHour()}\r\n * @param label the label of the zman such as \"Shaah Zmanis GRA\".\r\n * @see #Zman(Date, String)\r\n */\r\n constructor(duration: number, label: string | null);\r\n constructor(dateOrDuration: number | Temporal.ZonedDateTime, label: string | null) {\r\n this.label = label;\r\n if (dateOrDuration instanceof Temporal.ZonedDateTime) {\r\n this.zman = dateOrDuration;\r\n } else if (typeof dateOrDuration === 'number') {\r\n this.duration = dateOrDuration;\r\n }\r\n }\r\n\r\n /**\r\n * A {@link Comparator} that will compare and sort zmanim by date/time order. Compares its two arguments by the zman's date/time\r\n * order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater\r\n * than the second.\r\n * Please note that this class will handle cases where either the {@code Zman} is a null or {@link #getZman()} returns a null.\r\n */\r\n static compareDateOrder(zman1: Zman, zman2: Zman): number {\r\n const times = [zman1, zman2].map(zman => zman.zman) as [Temporal.ZonedDateTime, Temporal.ZonedDateTime];\r\n return Temporal.ZonedDateTime.compare(...times)\r\n }\r\n\r\n /**\r\n * A {@link Comparator} that will compare and sort zmanim by zmanim label order. Compares its two arguments by the zmanim label\r\n * name order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater\r\n * than the second.\r\n * Please note that this class will will sort cases where either the {@code Zman} is a null or {@link #label} returns a null\r\n * as empty {@code String}s.\r\n */\r\n static compareNameOrder(zman1: Zman, zman2: Zman): number {\r\n return StringUtils.compareTo(zman1.label || '', zman2.label || '');\r\n }\r\n\r\n /**\r\n * A {@link Comparator} that will compare and sort duration based zmanim such as\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour} (or the various shaah zmanis times\r\n * such as {@link ZmanimCalendar#getShaahZmanisGra() shaah zmanis GRA} or\r\n * {@link ComplexZmanimCalendar#getShaahZmanis16Point1Degrees() shaah zmanis 16.1°}). Returns a negative\r\n * integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.\r\n * Please note that this class will will sort cases where {@code Zman} is a null.\r\n */\r\n static compareDurationOrder(zman1: Zman, zman2: Zman): number {\r\n return IntegerUtils.compare(zman1.duration || 0, zman2.duration || 0);\r\n }\r\n\r\n toString(): string {\r\n return (`\\nLabel:\\t\\t\\t${this.label}`)\r\n .concat(`\\nZman:\\t\\t\\t${this.zman}`)\r\n .concat(`\\nDuration:\\t\\t\\t${this.duration}`)\r\n .concat(`\\nDescription:\\t\\t\\t${this.description}`);\r\n }\r\n}\r\n\r\nexport type ZmanWithZmanDate = Zman & { zman: Temporal.ZonedDateTime };\r\nexport type ZmanWithDuration = Zman & { duration: number };\r\n", "import { Temporal } from 'temporal-polyfill'\r\n\r\nimport { TimeZone, Utils, padZeros } from '../polyfills/Utils.ts';\r\nimport { Time } from './Time.ts';\r\nimport { AstronomicalCalendar } from '../AstronomicalCalendar.ts';\r\nimport { ZmanimCalendar } from '../ZmanimCalendar.ts';\r\nimport { ComplexZmanimCalendar } from '../ComplexZmanimCalendar.ts';\r\nimport { Zman, ZmanWithDuration, ZmanWithZmanDate } from './Zman.ts';\r\nimport { UnsupportedError } from '../polyfills/errors.ts';\r\n\r\nconst methodBlacklist =
String
\r\n */\r\n /*\r\n public format(milliseconds: number): string {\r\n return this.format(milliseconds);\r\n }\r\n */\r\n\r\n /**\r\n * A method that formats milliseconds into a time format.\r\n *\r\n * @param millis\r\n * The time in milliseconds.\r\n * @return String The formatted String
\r\n */\r\n\r\n /*\r\n public format(millis: number): string {\r\n return format(new Time(millis));\r\n }\r\n */\r\n\r\n /**\r\n * A method that formats {@link Time}objects.\r\n *\r\n * @param time\r\n * The time Object
to be formatted.\r\n * @return String The formatted String
\r\n */\r\n public format(timeOrMillis: Time | number): string {\r\n let time: Time;\r\n if (timeOrMillis instanceof Time) {\r\n time = timeOrMillis as Time;\r\n } else {\r\n time = new Time(timeOrMillis as number);\r\n }\r\n\r\n if (this.timeFormat === ZmanimFormatter.XSD_DURATION_FORMAT) {\r\n return ZmanimFormatter.formatXSDDurationTime(time);\r\n }\r\n let sb: string = padZeros(time.getHours(), this.hourNF)\r\n .concat(':')\r\n .concat(padZeros(time.getMinutes(), ZmanimFormatter.minuteSecondNF));\r\n if (this.useSeconds) {\r\n sb = sb.concat(':')\r\n .concat(padZeros(time.getSeconds(), ZmanimFormatter.minuteSecondNF));\r\n }\r\n if (this.useMillis) {\r\n sb = sb.concat('.')\r\n .concat(padZeros(time.getMilliseconds(), ZmanimFormatter.milliNF));\r\n }\r\n return sb;\r\n }\r\n\r\n /**\r\n * Formats a date using this class's {@link #getDateFormat() date format}.\r\n *\r\n * @param dateTime - the date to format\r\n * @return the formatted String\r\n */\r\n public formatDateTime(dateTime: Temporal.ZonedDateTime): string {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n const _dateTime = dateTime.with({ timeZone: this.getTimeZone() });\r\n\r\n // @ts-ignore\r\n return _dateTime.toLocaleString(...this.dateFormat);\r\n }\r\n\r\n /**\r\n * The date:date-time function returns the current date and time as a date/time string. The date/time string that's\r\n * returned must be a string in the format defined as the lexical representation of xs:dateTime in [3.3.8 dateTime] of [XML Schema 1.1 Part 2: Datatypes]. The date/time format is\r\n * basically CCYY-MM-DDThh:mm:ss, although implementers should consult [XML Schema 1.1 Part 2: Datatypes] and [ISO 8601] for details. The date/time string format must include a\r\n * time zone, either a Z to indicate Coordinated Universal Time or a + or - followed by the difference between the\r\n * difference from UTC represented as hh:mm.\r\n * @param dateTime - the UTC Date Object\r\n * @return the XSD dateTime\r\n */\r\n public getXSDateTime(dateTime: Temporal.ZonedDateTime): string {\r\n return dateTime.with({ timeZone: this.getTimeZone() }).toString();\r\n }\r\n\r\n /**\r\n * Represent the hours and minutes with two-digit strings.\r\n *\r\n * @param digits\r\n * hours or minutes.\r\n * @return two-digit String representation of hrs or minutes.\r\n */\r\n private static formatDigits(digits: number): string {\r\n const dd: string = Math.abs(digits).toString();\r\n return dd.length === 1 ? `0${dd}` : dd;\r\n }\r\n\r\n /**\r\n * This returns the xml representation of an xsd:duration object.\r\n *\r\n * @param millis\r\n * the duration in milliseconds\r\n * @return the xsd:duration formatted String\r\n */\r\n\r\n /*\r\n public formatXSDDurationTime(millis: number): string {\r\n return formatXSDDurationTime(new Time(millis));\r\n }\r\n */\r\n\r\n /**\r\n * This returns the xml representation of an xsd:duration object.\r\n *\r\n * @param time\r\n * the duration as a Time object\r\n * @return the xsd:duration formatted String\r\n */\r\n public static formatXSDDurationTime(timeOrMillis: Time | number): string {\r\n let time: Time;\r\n if (timeOrMillis instanceof Time) {\r\n time = timeOrMillis as Time;\r\n } else {\r\n time = new Time(timeOrMillis as number);\r\n }\r\n\r\n let duration: string;\r\n if (time.getHours() !== 0 || time.getMinutes() !== 0 || time.getSeconds() !== 0 || time.getMilliseconds() !== 0) {\r\n duration = 'P'.concat('T');\r\n\r\n if (time.getHours() !== 0) duration = duration.concat(`${time.getHours()}H`);\r\n\r\n if (time.getMinutes() !== 0) duration = duration.concat(`${time.getMinutes()}M`);\r\n\r\n if (time.getSeconds() !== 0 || time.getMilliseconds() !== 0) {\r\n duration = duration.concat(`${time.getSeconds()}.${padZeros(time.getMilliseconds(), ZmanimFormatter.milliNF)}`);\r\n duration = duration.concat('S');\r\n }\r\n\r\n if (duration.length === 1) duration.concat('T0S'); // zero seconds\r\n\r\n if (time.isNegative()) {\r\n duration = '-' + duration;\r\n }\r\n }\r\n return duration!.toString();\r\n }\r\n\r\n public static formatDecimal(num: number): string {\r\n const hasDecimal = num - Math.trunc(num) > 0;\r\n return hasDecimal ? num.toString() : num.toFixed(1);\r\n }\r\n\r\n /**\r\n * A method that returns an XML formatted String
representing the serialized Object
. The\r\n * format used is:\r\n *\r\n * \r\n * <AstronomicalTimes date="1969-02-08" type="AstronomicalCalendar algorithm="US Naval Almanac Algorithm" location="Lakewood, NJ" latitude="40.095965" longitude="-74.22213" elevation="31.0" timeZoneName="Eastern Standard Time" timeZoneID="America/New_York" timeZoneOffset="-5">\r\n * <Sunrise>2007-02-18T06:45:27-05:00</Sunrise>\r\n * <TemporalHour>PT54M17.529S</TemporalHour>\r\n * ...\r\n * </AstronomicalTimes>\r\n *\r\n *\r\n * Note that the output uses the xsd:dateTime format for\r\n * times such as sunrise, and xsd:duration format for\r\n * times that are a duration such as the length of a\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour}. The output of this method is\r\n * returned by the {@link #toString() toString}.\r\n *\r\n * @param astronomicalCalendar the AstronomicalCalendar Object\r\n *\r\n * @return The XML formatted
String
. The format will be:\r\n *\r\n * \r\n * <AstronomicalTimes date="1969-02-08" type="AstronomicalCalendar algorithm="US Naval Almanac Algorithm" location="Lakewood, NJ" latitude="40.095965" longitude="-74.22213" elevation="31.0" timeZoneName="Eastern Standard Time" timeZoneID="America/New_York" timeZoneOffset="-5">\r\n * <Sunrise>2007-02-18T06:45:27-05:00</Sunrise>\r\n * <TemporalHour>PT54M17.529S</TemporalHour>\r\n * ...\r\n * </AstronomicalTimes>\r\n *\r\n *\r\n * TODO: add proper schema, and support for nulls. XSD duration (for solar hours), should probably return\r\n * nil and not P\r\n * @deprecated\r\n */\r\n public static toXML(): void {\r\n throw new UnsupportedError('This method is not supported.');\r\n }\r\n\r\n /**\r\n * A method that returns a JSON formatted
String
representing the serialized Object
. The\r\n * format used is:\r\n * \r\n * {\r\n * "metadata":{\r\n * "date":"1969-02-08",\r\n * "type":"AstronomicalCalendar",\r\n * "algorithm":"US Naval Almanac Algorithm",\r\n * "location":"Lakewood, NJ",\r\n * "latitude":"40.095965",\r\n * "longitude":"-74.22213",\r\n * "elevation:"31.0",\r\n * "timeZoneName":"Eastern Standard Time",\r\n * "timeZoneID":"America/New_York",\r\n * "timeZoneOffset":"-5"},\r\n * "AstronomicalTimes":{\r\n * "Sunrise":"2007-02-18T06:45:27-05:00",\r\n * "TemporalHour":"PT54M17.529S"\r\n * ...\r\n * }\r\n * }\r\n *\r\n *\r\n * Note that the output uses the xsd:dateTime format for\r\n * times such as sunrise, and xsd:duration format for\r\n * times that are a duration such as the length of a\r\n * {@link AstronomicalCalendar#getTemporalHour() temporal hour}.\r\n *\r\n * @param astronomicalCalendar the AstronomicalCalendar Object\r\n *\r\n * @return The JSON formatted
String
. The format will be:\r\n * \r\n * {\r\n * "metadata":{\r\n * "date":"1969-02-08",\r\n * "type":"AstronomicalCalendar",\r\n * "algorithm":"US Naval Almanac Algorithm",\r\n * "location":"Lakewood, NJ",\r\n * "latitude":"40.095965",\r\n * "longitude":"-74.22213",\r\n * "elevation:"31.0",\r\n * "timeZoneName":"Eastern Standard Time",\r\n * "timeZoneID":"America/New_York",\r\n * "timeZoneOffset":"-5"},\r\n * "AstronomicalTimes":{\r\n * "Sunrise":"2007-02-18T06:45:27-05:00",\r\n * "TemporalHour":"PT54M17.529S"\r\n * ...\r\n * }\r\n * }\r\n *\r\n */\r\n public static toJSON(astronomicalCalendar: AstronomicalCalendar): JsonOutput {\r\n const json: JsonOutput = {\r\n metadata: ZmanimFormatter.getOutputMetadata(astronomicalCalendar),\r\n };\r\n const key: string = ZmanimFormatter.getOutputKey(astronomicalCalendar);\r\n json[key] = ZmanimFormatter.getZmanimOutput(astronomicalCalendar);\r\n\r\n return json;\r\n }\r\n\r\n private static getOutputKey(astronomicalCalendar: AstronomicalCalendar) {\r\n switch (true) {\r\n case astronomicalCalendar instanceof ComplexZmanimCalendar:\r\n return 'Zmanim';\r\n case astronomicalCalendar instanceof ZmanimCalendar:\r\n return 'BasicZmanim';\r\n case astronomicalCalendar instanceof AstronomicalCalendar:\r\n default:\r\n return 'AstronomicalTimes';\r\n }\r\n }\r\n\r\n private static getOutputMetadata(astronomicalCalendar: AstronomicalCalendar): OutputMetadata {\r\n return {\r\n date: astronomicalCalendar.getDate().toString(),\r\n type: astronomicalCalendar.getClassName(),\r\n algorithm: astronomicalCalendar.getAstronomicalCalculator().getCalculatorName(),\r\n location: astronomicalCalendar.getGeoLocation().getLocationName(),\r\n latitude: astronomicalCalendar.getGeoLocation().getLatitude().toString(),\r\n longitude: astronomicalCalendar.getGeoLocation().getLongitude().toString(),\r\n elevation: ZmanimFormatter.formatDecimal(astronomicalCalendar.getGeoLocation().getElevation()),\r\n timeZoneName: TimeZone.getDisplayName(astronomicalCalendar.getGeoLocation().getTimeZone())!,\r\n timeZoneID: astronomicalCalendar.getGeoLocation().getTimeZone(),\r\n timeZoneOffset: ZmanimFormatter.formatDecimal(TimeZone.getOffset(astronomicalCalendar.getGeoLocation().getTimeZone(),\r\n astronomicalCalendar.getDate().toZonedDateTime(astronomicalCalendar.getGeoLocation().getTimeZone()).epochMilliseconds) / ZmanimFormatter.HOUR_MILLIS),\r\n };\r\n }\r\n\r\n private static getZmanimOutput(astronomicalCalendar: AstronomicalCalendar) {\r\n const formatter: ZmanimFormatter = new ZmanimFormatter(ZmanimFormatter.XSD_DURATION_FORMAT, ZmanimFormatter.XSD_DATE_FORMAT,\r\n astronomicalCalendar.getGeoLocation().getTimeZone());\r\n\r\n /*\r\n let dateList: Set
Sample code:\r\n *
\r\n * TefilaRules tr = new TefilaRules();\r\n * JewishCalendar jewishCalendar = new JewishCalendar();\r\n * HebrewDateFormatter hdf = new HebrewDateFormatter();\r\n * jewishCalendar.setJewishDate(5783, JewishDate.TISHREI, 1); // Rosh Hashana\r\n * System.out.println(hdf.format(jewishCalendar) + \": \" + tr.isTachanunRecitedShacharis(jd));\r\n * jewishCalendar.setJewishDate(5783, JewishDate.ADAR, 17);\r\n * System.out.println(hdf.format(jewishCalendar) + \": \" + tr.isTachanunRecitedShacharis(jewishCalendar));\r\n * tr.setTachanunRecitedWeekOfPurim(false);\r\n * System.out.println(hdf.format(jewishCalendar) + \": \" + tr.isTachanunRecitedShacharis(jewishCalendar));\r\n * \r\n * @author © Y. Paritcher 2019 - 2021\r\n * @author © Eliyahu Hershfeld 2019 - 2022\r\n * \r\n * @todo The following items may be added at a future date.\r\n *
true
.\r\n\t * @see #isTachanunRecitedEndOfTishrei()\r\n\t * @see #setTachanunRecitedEndOfTishrei(boolean)\r\n\t */\r\n private tachanunRecitedEndOfTishrei:boolean = true;\r\n\r\n /**\r\n\t * The default value is false
.\r\n\t * @see #isTachanunRecitedWeekAfterShavuos()\r\n\t * @see #setTachanunRecitedWeekAfterShavuos(boolean)\r\n\t */\r\n private tachanunRecitedWeekAfterShavuos:boolean = false;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecited13SivanOutOfIsrael()\r\n\t * @see #setTachanunRecited13SivanOutOfIsrael(boolean)\r\n\t */\r\n private tachanunRecited13SivanOutOfIsrael:boolean = true;\r\n\r\n /**\r\n\t * The default value is false
.\r\n\t * @see #isTachanunRecitedPesachSheni()\r\n\t * @see #setTachanunRecitedPesachSheni(boolean)\r\n\t */\r\n private tachanunRecitedPesachSheni:boolean = false;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecited15IyarOutOfIsrael()\r\n\t * @see #setTachanunRecited15IyarOutOfIsrael(boolean)\r\n\t */\r\n private tachanunRecited15IyarOutOfIsrael:boolean = true;\r\n\r\n /**\r\n\t * The default value is false
.\r\n\t * @see #isTachanunRecitedMinchaErevLagBaomer()\r\n\t * @see #setTachanunRecitedMinchaErevLagBaomer(boolean)\r\n\t */\r\n private tachanunRecitedMinchaErevLagBaomer:boolean = false;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecitedShivasYemeiHamiluim()\r\n\t * @see #setTachanunRecitedShivasYemeiHamiluim(boolean)\r\n\t */\r\n private tachanunRecitedShivasYemeiHamiluim:boolean = true;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecitedWeekOfHod()\r\n\t * @see #setTachanunRecitedWeekOfHod(boolean)\r\n\t */\r\n private tachanunRecitedWeekOfHod:boolean = true;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecitedWeekOfPurim()\r\n\t * @see #setTachanunRecitedWeekOfPurim(boolean)\r\n\t */\r\n private tachanunRecitedWeekOfPurim:boolean = true;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecitedFridays()\r\n\t * @see #setTachanunRecitedFridays(boolean)\r\n\t */\r\n private tachanunRecitedFridays:boolean = true;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecitedSundays()\r\n\t * @see #setTachanunRecitedSundays(boolean)\r\n\t */\r\n private tachanunRecitedSundays:boolean = true;\r\n\r\n /**\r\n\t * The default value is true
.\r\n\t * @see #isTachanunRecitedMinchaAllYear()\r\n\t * @see #setTachanunRecitedMinchaAllYear(boolean)\r\n\t */\r\n private tachanunRecitedMinchaAllYear:boolean = true;\r\n\r\n /**\r\n\t * Returns if tachanun is recited during shacharis on the day in question. See the many\r\n\t * minhag based settings that are available in this class.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if tachanun is recited during shacharis.\r\n\t * @see #isTachanunRecitedMincha(JewishCalendar)\r\n\t */\r\n public isTachanunRecitedShacharis(jewishCalendar: JewishCalendar):boolean {\r\n const holidayIndex:number = jewishCalendar.getYomTovIndex();\r\n const day:number = jewishCalendar.getJewishDayOfMonth();\r\n const month:number = jewishCalendar.getJewishMonth();\r\n\r\n if (jewishCalendar.getDayOfWeek() == SATURDAY\r\n\t\t|| (!this.tachanunRecitedSundays && jewishCalendar.getDayOfWeek() == SUNDAY)\r\n\t\t|| (!this.tachanunRecitedFridays && jewishCalendar.getDayOfWeek() == FRIDAY)\r\n\t\t\t\t|| month == JewishDate.NISSAN\r\n\t\t\t\t|| (month == JewishDate.TISHREI && ((!this.tachanunRecitedEndOfTishrei && day > 8)\r\n\t\t\t\t|| (this.tachanunRecitedEndOfTishrei && (day > 8 && day < 22))))\r\n\t\t\t\t|| (month == JewishDate.SIVAN && (this.tachanunRecitedWeekAfterShavuos && day < 7\r\n\t\t\t\t\t\t|| !this.tachanunRecitedWeekAfterShavuos && day < (!jewishCalendar.getInIsrael()\r\n\t\t\t\t\t\t\t\t&& !this.tachanunRecited13SivanOutOfIsrael ? 14 : 13)))\r\n\t\t\t\t|| (jewishCalendar.isYomTov() && (!jewishCalendar.isTaanis()\r\n\t\t\t\t\t\t|| (!this.tachanunRecitedPesachSheni && holidayIndex == JewishCalendar.PESACH_SHENI))) // Erev YT is included in isYomTov()\r\n\t\t\t\t|| (!jewishCalendar.getInIsrael() && !this.tachanunRecitedPesachSheni && !this.tachanunRecited15IyarOutOfIsrael\r\n\t\t\t\t\t\t&& jewishCalendar.getJewishMonth() == JewishDate.IYAR && day == 15)\r\n\t\t\t\t|| holidayIndex == JewishCalendar.TISHA_BEAV || jewishCalendar.isIsruChag()\r\n\t\t\t\t|| jewishCalendar.isRoshChodesh()\r\n\t\t\t\t|| (!this.tachanunRecitedShivasYemeiHamiluim &&\r\n\t\t\t\t\t\t((!jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR)\r\n\t\t\t\t\t\t\t\t|| (jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR_II)) && day > 22)\r\n\t\t\t\t|| (!this.tachanunRecitedWeekOfPurim &&\r\n\t\t\t\t\t\t((!jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR)\r\n\t\t\t\t\t\t\t\t|| (jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR_II)) && day > 10 && day < 18)\r\n\t\t\t\t|| (jewishCalendar.isUseModernHolidays()\r\n\t\t\t\t\t\t&& (holidayIndex == JewishCalendar.YOM_HAATZMAUT || holidayIndex == JewishCalendar.YOM_YERUSHALAYIM))\r\n\t\t\t\t|| (!this.tachanunRecitedWeekOfHod && month == JewishDate.IYAR && day > 13 && day < 21)) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n\t * Returns if tachanun is recited during mincha on the day in question.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if tachanun is recited during mincha.\r\n\t * @see #isTachanunRecitedShacharis(JewishCalendar)\r\n\t */\r\n public isTachanunRecitedMincha(jewishCalendar: JewishCalendar):boolean {\r\n let tomorrow:JewishCalendar = new JewishCalendar();\r\n tomorrow = jewishCalendar.clone() as JewishCalendar;\r\n tomorrow.forward(Calendar.DATE, 1);\r\n\t\t\r\n if (!this.tachanunRecitedMinchaAllYear\r\n\t\t\t\t\t|| jewishCalendar.getDayOfWeek() == Calendar.FRIDAY\r\n\t\t\t\t\t|| !this.isTachanunRecitedShacharis(jewishCalendar) \r\n\t\t\t\t\t|| (!this.isTachanunRecitedShacharis(tomorrow) && \r\n\t\t\t\t\t\t\t!(tomorrow.getYomTovIndex() == JewishCalendar.EREV_ROSH_HASHANA) &&\r\n\t\t\t\t\t\t\t!(tomorrow.getYomTovIndex() == JewishCalendar.EREV_YOM_KIPPUR) &&\r\n\t\t\t\t\t\t\t!(tomorrow.getYomTovIndex() == JewishCalendar.PESACH_SHENI))\r\n\t\t\t\t\t|| !this.tachanunRecitedMinchaErevLagBaomer && tomorrow.getYomTovIndex() == JewishCalendar.LAG_BAOMER) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\t\r\n /**\r\n\t * Returns if it is the Jewish day (starting the evening before) to start reciting Vesein Tal Umatar Livracha\r\n\t * (Sheailas Geshamim). In Israel this is the 7th day of {@link JewishDate#CHESHVAN Marcheshvan}.\r\n\t * Outside Israel recitation starts on the evening of December 4th (or 5th if it is the year before a civil leap year)\r\n\t * in the 21st century and shifts a day forward every century not evenly divisible by 400. This method will return true\r\n\t * if vesein tal umatar on the current Jewish date that starts on the previous night, so Dec 5/6 will be\r\n\t * returned by this method in the 21st century. vesein tal umatar is not recited on Shabbos and the\r\n\t * start date will be delayed a day when the start day is on a Shabbos (this can only occur out of Israel).\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if it is the first Jewish day (starting the prior evening of reciting Vesein Tal Umatar Livracha\r\n\t * (Sheailas Geshamim).\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartingTonight(JewishCalendar)\r\n\t * @see #isVeseinTalUmatarRecited(JewishCalendar)\r\n\t */\r\n public isVeseinTalUmatarStartDate(jewishCalendar: JewishCalendar):boolean {\r\n if (jewishCalendar.getInIsrael()) {\r\n\t\t\t // The 7th Cheshvan can't occur on Shabbos, so always return true for 7 Cheshvan\r\n if (jewishCalendar.getJewishMonth() == JewishDate.CHESHVAN && jewishCalendar.getJewishDayOfMonth() == 7) {\r\n return true;\r\n }\r\n } else {\r\n if (jewishCalendar.getDayOfWeek() == SATURDAY) { //Not recited on Friday night\r\n return false;\r\n }\r\n if (jewishCalendar.getDayOfWeek() == Calendar.SUNDAY) { // When starting on Sunday, it can be the start date or delayed from Shabbos\r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 48 || jewishCalendar.getTekufasTishreiElapsedDays() == 47;\r\n } \r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 47;\r\n\t\t\t\r\n }\r\n return false; // keep the compiler happy\r\n }\r\n\t\r\n /**\r\n\t * Returns if true if tonight is the first night to start reciting Vesein Tal Umatar Livracha (\r\n\t * Sheailas Geshamim). In Israel this is the 7th day of {@link JewishDate#CHESHVAN\r\n\t * Marcheshvan} (so the 6th will return true). Outside Israel recitation starts on the evening\r\n\t * of December 4th (or 5th if it is the year before a civil leap year) in the 21st century and shifts a\r\n\t * day forward every century not evenly divisible by 400. Vesein tal umatar is not recited on\r\n\t * Shabbos and the start date will be delayed a day when the start day is on a Shabbos\r\n\t * (this can only occur out of Israel).\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if it is the first Jewish day (starting the prior evening of reciting Vesein Tal Umatar\r\n\t * Livracha (Sheailas Geshamim).\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartDate(JewishCalendar)\r\n\t * @see #isVeseinTalUmatarRecited(JewishCalendar)\r\n\t */\r\n public isVeseinTalUmatarStartingTonight(jewishCalendar: JewishCalendar):boolean {\r\n if (jewishCalendar.getInIsrael()) {\r\n // The 7th Cheshvan can't occur on Shabbos, so always return true for 6 Cheshvan\r\n if (jewishCalendar.getJewishMonth() == JewishDate.CHESHVAN && jewishCalendar.getJewishDayOfMonth() == 6) {\r\n return true;\r\n }\r\n } else {\r\n if (jewishCalendar.getDayOfWeek() == Calendar.FRIDAY) { //Not recited on Friday night\r\n return false;\r\n }\r\n if (jewishCalendar.getDayOfWeek() == Calendar.SATURDAY) { // When starting on motzai Shabbos, it can be the start date or delayed from Friday night\r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 47 || jewishCalendar.getTekufasTishreiElapsedDays() == 46;\r\n } \r\n return jewishCalendar.getTekufasTishreiElapsedDays() == 46;\r\n\t\t\t\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n\t * Returns if Vesein Tal Umatar Livracha (Sheailas Geshamim) is recited. This will return\r\n\t * true for the entire season, even on Shabbos when it is not recited.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if Vesein Tal Umatar Livracha (Sheailas Geshamim) is recited.\r\n\t * \r\n\t * @see #isVeseinTalUmatarStartDate(JewishCalendar)\r\n\t * @see #isVeseinTalUmatarStartingTonight(JewishCalendar)\r\n\t */\r\n public isVeseinTalUmatarRecited(jewishCalendar:JewishCalendar):boolean {\r\n if (jewishCalendar.getJewishMonth() == JewishDate.NISSAN && jewishCalendar.getJewishDayOfMonth() < 15) {\r\n return true;\r\n }\r\n if (jewishCalendar.getJewishMonth() < JewishDate.CHESHVAN) {\r\n return false;\r\n }\r\n if (jewishCalendar.getInIsrael()) {\r\n return jewishCalendar.getJewishMonth() != JewishDate.CHESHVAN || jewishCalendar.getJewishDayOfMonth() >= 7;\r\n } \r\n return jewishCalendar.getTekufasTishreiElapsedDays() >= 47;\r\n\t\t\r\n }\r\n\t\r\n /**\r\n\t * Returns if Vesein Beracha is recited. It is recited from 15 {@link JewishDate#NISSAN Nissan} to the\r\n\t * point that {@link #isVeseinTalUmatarRecited(JewishCalendar) vesein tal umatar is recited}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if Vesein Beracha is recited.\r\n\t * @see #isVeseinTalUmatarRecited(JewishCalendar)\r\n\t */\r\n public isVeseinBerachaRecited(jewishCalendar: JewishCalendar):boolean {\r\n return !this.isVeseinTalUmatarRecited(jewishCalendar);\r\n }\r\n\r\n /**\r\n\t * Returns if the date is the start date for reciting Mashiv Haruach Umorid Hageshem. The date is 22\r\n\t * {@link JewishDate#TISHREI Tishrei}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if the date is the start date for reciting Mashiv Haruach Umorid Hageshem.\r\n\t * @see #isMashivHaruachEndDate(JewishCalendar)\r\n\t * @see #isMashivHaruachRecited(JewishCalendar)\r\n\t */\r\n public isMashivHaruachStartDate(jewishCalendar:JewishCalendar):boolean {\r\n return jewishCalendar.getJewishMonth() == JewishDate.TISHREI && jewishCalendar.getJewishDayOfMonth() == 22;\r\n }\r\n\r\n /**\r\n\t * Returns if the date is the end date for reciting Mashiv Haruach Umorid Hageshem. The date is 15\r\n\t * {@link JewishDate#NISSAN Nissan}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if the date is the end date for reciting Mashiv Haruach Umorid Hageshem.\r\n\t * @see #isMashivHaruachStartDate(JewishCalendar)\r\n\t * @see #isMashivHaruachRecited(JewishCalendar)\r\n\t */\r\n public isMashivHaruachEndDate(jewishCalendar:JewishCalendar):boolean {\r\n return jewishCalendar.getJewishMonth() == JewishDate.NISSAN && jewishCalendar.getJewishDayOfMonth() == 15;\r\n }\r\n\r\n /**\r\n\t * Returns if Mashiv Haruach Umorid Hageshem is recited. This period starts on 22 {@link\r\n\t * JewishDate#TISHREI Tishrei} and ends on the 15th day of {@link JewishDate#NISSAN Nissan}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return true if Mashiv Haruach Umorid Hageshem is recited.\r\n\t * @see #isMashivHaruachStartDate(JewishCalendar)\r\n\t * @see #isMashivHaruachEndDate(JewishCalendar)\r\n\t */\r\n public isMashivHaruachRecited(jewishCalendar:JewishCalendar):boolean {\r\n const startDate:JewishDate = new JewishDate(jewishCalendar.getJewishYear(), JewishDate.TISHREI, 22);\r\n const endDate:JewishDate = new JewishDate(jewishCalendar.getJewishYear(), JewishDate.NISSAN, 15);\r\n return jewishCalendar.compareTo(startDate) > 0 && jewishCalendar.compareTo(endDate) < 0;\r\n }\r\n\r\n /**\r\n\t * Returns if Morid Hatal (or the lack of reciting Mashiv Haruach following nussach Ashkenaz) is\r\n\t * recited. This period starts on the 15th day of {@link JewishDate#NISSAN Nissan} and ends on 22 {@link\r\n\t * JewishDate#TISHREI Tishrei}.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * \r\n\t * @return true if Morid Hatal (or the lack of reciting Mashiv Haruach following nussach Ashkenaz) is recited.\r\n\t */\r\n public isMoridHatalRecited(jewishCalendar:JewishCalendar):boolean {\r\n return !this.isMashivHaruachRecited(jewishCalendar) || this.isMashivHaruachStartDate(jewishCalendar) || this.isMashivHaruachEndDate(jewishCalendar);\r\n }\r\n\t\r\n /**\r\n\t * Returns if Hallel is recited on the day in question. This will return true for both Hallel shalem\r\n\t * and Chatzi Hallel. See {@link #isHallelShalemRecited(JewishCalendar)} to know if the complete Hallel\r\n\t * is recited.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if Hallel is recited.\r\n\t * @see #isHallelShalemRecited(JewishCalendar)\r\n\t */\r\n public isHallelRecited(jewishCalendar:JewishCalendar):boolean {\r\n const day:number = jewishCalendar.getJewishDayOfMonth();\r\n const month:number = jewishCalendar.getJewishMonth();\r\n const holidayIndex:number = jewishCalendar.getYomTovIndex();\r\n const inIsrael:boolean = jewishCalendar.getInIsrael();\r\n\t\t\r\n if (jewishCalendar.isRoshChodesh()) { //RH returns false for RC\r\n return true;\r\n }\r\n if (jewishCalendar.isChanukah()) {\r\n return true;\r\n }\r\n switch (month) {\r\n case JewishDate.NISSAN:\r\n if (day >= 15 && ((inIsrael && day <= 21) || (!inIsrael && day <= 22))) {\r\n return true;\r\n }\r\n break;\r\n case JewishDate.IYAR: // modern holidays\r\n if (jewishCalendar.isUseModernHolidays() && (holidayIndex == JewishCalendar.YOM_HAATZMAUT\r\n\t\t\t\t\t\t|| holidayIndex == JewishCalendar.YOM_YERUSHALAYIM)) {\r\n return true;\r\n }\r\n break;\r\n case JewishDate.SIVAN:\r\n if (day == 6 || (!inIsrael && (day == 7))) {\r\n return true;\r\n }\r\n break;\r\n case JewishDate.TISHREI:\r\n if (day >= 15 && (day <= 22 || (!inIsrael && (day <= 23)))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n\t * Returns if hallel shalem is recited on the day in question. This will always return false if {@link\r\n\t * #isHallelRecited(JewishCalendar)} returns false.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if hallel shalem is recited.\r\n\t * @see #isHallelRecited(JewishCalendar)\r\n\t */\r\n public isHallelShalemRecited(jewishCalendar:JewishCalendar):boolean {\r\n const day:number = jewishCalendar.getJewishDayOfMonth();\r\n const month:number = jewishCalendar.getJewishMonth();\r\n const inIsrael:boolean = jewishCalendar.getInIsrael();\r\n if (this.isHallelRecited(jewishCalendar)) {\r\n if ((jewishCalendar.isRoshChodesh() && ! jewishCalendar.isChanukah())\r\n\t\t\t\t\t|| (month == JewishDate.NISSAN && ((inIsrael && day > 15) || (!inIsrael && day > 16)))) {\r\n return false;\r\n } \r\n return true;\r\n\t\t\t\r\n } \r\n return false;\r\n }\r\n\t\r\n /**\r\n\t * Returns if Al HaNissim is recited on the day in question.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if al hanissim is recited.\r\n\t * @see JewishCalendar#isChanukah()\r\n\t * @see JewishCalendar#isPurim()\r\n\t * @see JewishCalendar#getIsMukafChoma()\r\n\t */\r\n public isAlHanissimRecited(jewishCalendar:JewishCalendar): boolean {\r\n\t return jewishCalendar.isPurim() || jewishCalendar.isChanukah();\r\n }\r\n\t\r\n /**\r\n\t * Returns if Yaaleh Veyavo is recited on the day in question.\r\n\t * \r\n\t * @param jewishCalendar the Jewish calendar day.\r\n\t * @return if Yaaleh Veyavo is recited.\r\n\t * @see JewishCalendar#isPesach()\r\n\t * @see JewishCalendar#isShavuos()\r\n\t * @see JewishCalendar#isRoshHashana()\r\n\t * @see JewishCalendar#isYomKippur()\r\n\t * @see JewishCalendar#isSuccos()\r\n\t * @see JewishCalendar#isShminiAtzeres()\r\n\t * @see JewishCalendar#isSimchasTorah()\r\n\t * @see JewishCalendar#isRoshChodesh()\r\n\t */\r\n public isYaalehVeyavoRecited(jewishCalendar:JewishCalendar):boolean {\r\n\t return jewishCalendar.isPesach() || jewishCalendar.isShavuos() || jewishCalendar.isRoshHashana() || jewishCalendar.isYomKippur()\r\n\t \t\t|| jewishCalendar.isSuccos() || jewishCalendar.isShminiAtzeres() || jewishCalendar.isSimchasTorah()\r\n\t \t\t|| jewishCalendar.isRoshChodesh();\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited during the week of Purim, from the 11th through the 17th of {@link\r\n\t * JewishDate#ADAR Adar} (on a non-leap year, or {@link JewishDate#ADAR_II Adar II} on a leap year). Some\r\n\t * chasidishe communities do not recite tachanun during this period. See the Minhag Yisrael Torah 131 and Darkei Chaim Veshalom 191who discuss the\r\n\t * minhag not to recite tachanun. Also see the Mishmeres Shalom (Hadras Shalom) who discusses the\r\n\t * minhag of not reciting it on the 16th and 17th.\r\n\t * @return If tachanun is set to be recited during the week of Purim from the 11th through the 17th of {@link\r\n\t * JewishDate#ADAR Adar} (on a non-leap year, or {@link JewishDate#ADAR_II Adar II} on a leap year).\r\n\t * @see #setTachanunRecitedWeekOfPurim(boolean)\r\n\t */\r\n public isTachanunRecitedWeekOfPurim():boolean {\r\n return this.tachanunRecitedWeekOfPurim;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the week of Purim from the 11th through the 17th of {@link\r\n\t * JewishDate#ADAR Adar} (on a non-leap year), or {@link JewishDate#ADAR_II Adar II} (on a leap year).\r\n\t * @param tachanunRecitedWeekOfPurim Sets if tachanun is to recited during the week of Purim from the 11th\r\n\t * through the 17th of {@link JewishDate#ADAR Adar} (on a non-leap year), or {@link JewishDate#ADAR_II\r\n\t * Adar II} (on a leap year). Some chasidishe communities do not recite tachanun\r\n\t * during this period.\r\n\t * @see #isTachanunRecitedWeekOfPurim()\r\n\t */\r\n public setTachanunRecitedWeekOfPurim(tachanunRecitedWeekOfPurim:boolean):void {\r\n this.tachanunRecitedWeekOfPurim = tachanunRecitedWeekOfPurim;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited during the sefira week of Hod (14 - 20 {@link JewishDate#IYAR Iyar},\r\n\t * or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}). Some chasidishe communities\r\n\t * do not recite tachanun during this week. See Minhag Yisrael Torah 131:Iyar.\r\n\t * @return If tachanun is set to be recited during the sefira week of Hod (14 - 20 {@link\r\n\t * JewishDate#IYAR Iyar}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}).\r\n\t * @see #setTachanunRecitedWeekOfHod(boolean)\r\n\t */\r\n public isTachanunRecitedWeekOfHod():boolean {\r\n return this.tachanunRecitedWeekOfHod;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the sefira week of Hod (14 - 20 {@link JewishDate#IYAR\r\n\t * Iyar}, or the 29th - 35th of the {@link JewishCalendar#getDayOfOmer() Omer}).\r\n\t * @param tachanunRecitedWeekOfHod Sets if tachanun should be recited during the sefira week of\r\n\t * Hod.\r\n\t * @see #isTachanunRecitedWeekOfHod()\r\n\t */\r\n public setTachanunRecitedWeekOfHod(tachanunRecitedWeekOfHod:boolean):void {\r\n this.tachanunRecitedWeekOfHod = tachanunRecitedWeekOfHod;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited at the end Of {@link JewishDate#TISHREI Tishrei}.The Magen Avraham 669:1 and the Pri\r\n\t * Chadash 131:7 state that some places to not recite tachanun during this period. The Sh\"UT Chasam Sofer on Choshen\r\n\t * Mishpat 77 writes that this is the minhag in Ashkenaz. The Shaarei Teshuva 131:19 quotes the Sheyarie Kneses\r\n\t * Hagdola who also states that it should not be recited. The Aderes wanted to institute saying tachanun during this\r\n\t * period, but was dissuaded from this by Rav Shmuel Salant who did not want to change the minhag in Yerushalayim.\r\n\t * The Aruch Hashulchan is of the opinion that that this minhag is incorrect, and it should be recited, and The Chazon\r\n\t * Ish also recited tachanun during this period. See the Dirshu edition of the Mishna Berurah for details.\r\n\t * @return If tachanun is set to be recited at the end of {@link JewishDate#TISHREI Tishrei}.\r\n\t * @see #setTachanunRecitedEndOfTishrei(tachanunRecitedEndOfTishrei)\r\n\t */\r\n public isTachanunRecitedEndOfTishrei():boolean {\r\n return this.tachanunRecitedEndOfTishrei;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited at the end of {@link JewishDate#TISHREI Tishrei}.\r\n\t * @param tachanunRecitedEndOfTishrei is tachanun recited at the end of {@link JewishDate#TISHREI Tishrei}.\r\n\t * @see #isTachanunRecitedEndOfTishrei()\r\n\t */\r\n public setTachanunRecitedEndOfTishrei(tachanunRecitedEndOfTishrei:boolean):void {\r\n this.tachanunRecitedEndOfTishrei = tachanunRecitedEndOfTishrei;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited during the week after Shavuos. This is the opinion of the Pri Megadim\r\n\t * quoted by the Mishna Berurah. This is since karbanos of Shavuos have tashlumim for\r\n\t * 7 days, it is still considered like a Yom Tov. The Chazon Ish quoted in the Orchos Rabainu vol. 1 page 68\r\n\t * recited tachanun during this week.\r\n\t * \r\n\t * @return If tachanun is set to be recited during the week after Shavuos.\r\n\t * @see #setTachanunRecitedWeekAfterShavuos(boolean)\r\n\t */\r\n public isTachanunRecitedWeekAfterShavuos():boolean {\r\n return this.tachanunRecitedWeekAfterShavuos;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the week after Shavuos.\r\n\t * @param tachanunRecitedWeekAfterShavuos is tachanun recited during the week after Shavuos.\r\n\t * @see #isTachanunRecitedWeekAfterShavuos()\r\n\t */\r\n public setTachanunRecitedWeekAfterShavuos(tachanunRecitedWeekAfterShavuos:boolean):void {\r\n this.tachanunRecitedWeekAfterShavuos = tachanunRecitedWeekAfterShavuos;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun is recited on the 13th of {@link JewishDate#SIVAN Sivan} (Yom Tov Sheni shel Galuyos of the 7th\r\n\t * day) outside Israel. This is brought down by the Shaarie Teshuva 131:19 quoting the Sheyarei Kneses Hagedola 131:12that\r\n\t * tachanun should not be recited on this day. Rav Shlomo Zalman Orbach in Halichos Shlomo on\r\n\t * Shavuos 12:16:25 is of the opinion that even in chutz laaretz it should be recited since the yemei\r\n\t * Tashlumin are counted based on Israel since that is where the karbanos are brought. Both\r\n\t * {@link #isTachanunRecitedShacharis(JewishCalendar)} and {@link #isTachanunRecitedMincha(JewishCalendar)}\r\n\t * only return false if the location is not set to {@link JewishCalendar#getInIsrael() Israel} and both\r\n\t * {@link #tachanunRecitedWeekAfterShavuos} and {@link #setTachanunRecited13SivanOutOfIsrael} are set to false.\r\n\t * \r\n\t * @return If tachanun is set to be recited on the 13th of {@link JewishDate#SIVAN Sivan} out of Israel.\r\n\t * @see #setTachanunRecited13SivanOutOfIsrael(isTachanunRecitedThirteenSivanOutOfIsrael)\r\n\t * @see #isTachanunRecitedWeekAfterShavuos()\r\n\t */\r\n public isTachanunRecited13SivanOutOfIsrael():boolean {\r\n return this.tachanunRecited13SivanOutOfIsrael;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on the 13th of {@link JewishDate#SIVAN Sivan} (Yom Tov Sheni shel Galuyos of the 7th\r\n\t * day) outside Israel. \r\n\t * @param tachanunRecitedThirteenSivanOutOfIsrael sets if tachanun should be recited on the 13th of {@link\r\n\t * JewishDate#SIVAN Sivan} out of Israel. Both {@link #isTachanunRecitedShacharis(JewishCalendar)} and\r\n\t * {@link #isTachanunRecitedMincha(JewishCalendar)} only return false if the location is not set to {@link\r\n\t * JewishCalendar#getInIsrael() Israel} and both {@link #tachanunRecitedWeekAfterShavuos} and\r\n\t * {@link #setTachanunRecited13SivanOutOfIsrael} are set to false.\r\n\t * @see #isTachanunRecited13SivanOutOfIsrael()\r\n\t */\r\n public setTachanunRecited13SivanOutOfIsrael(tachanunRecitedThirteenSivanOutOfIsrael:boolean):void {\r\n this.tachanunRecited13SivanOutOfIsrael = tachanunRecitedThirteenSivanOutOfIsrael;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}. The Pri Chadash 131:7 states\r\n\t * that tachanun should not be recited. The Aruch Hashulchan states that this is the minhag of the sephardim.\r\n\t * the Shaarei Efraim 10:27 also mentions that it is not recited, as does the Siddur Yaavetz (Shaar Hayesod, Chodesh Iyar).\r\n\t * The Pri Megadim (Mishbetzes Hazahav 131:15) and the Chazon Ish (Erev Pesahc Shchal Beshabos, page 203 in Rav Sheraya\r\n\t * Devlitzky's comments).\r\n\t * \r\n\t * @return If tachanun is recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}.\r\n\t * @see #setTachanunRecitedPesachSheni(boolean)\r\n\t */\r\n public isTachanunRecitedPesachSheni():boolean {\r\n return this.tachanunRecitedPesachSheni;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on {@link JewishCalendar#PESACH_SHENI Pesach Sheni}.\r\n\t * @param tachanunRecitedPesachSheni sets if tachanun should be recited on Pesach Sheni.\r\n\t * @see #isTachanunRecitedPesachSheni()\r\n\t */\r\n public setTachanunRecitedPesachSheni(tachanunRecitedPesachSheni:boolean):void {\r\n this.tachanunRecitedPesachSheni = tachanunRecitedPesachSheni;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited on 15 {@link JewishDate#IYAR Iyar} (sfaika deyoma of {@link JewishCalendar#PESACH_SHENI\r\n\t * Pesach Sheni}) out of Israel. If {@link #isTachanunRecitedPesachSheni()} is true
this will be\r\n\t * ignored even if false
.\r\n\t * \r\n\t * @return if tachanun is recited on 15 {@link JewishDate#IYAR Iyar} (sfaika deyoma of {@link\r\n\t * JewishCalendar#PESACH_SHENI Pesach Sheni} out of Israel. If {@link #isTachanunRecitedPesachSheni()}\r\n\t * is true
this will be ignored even if false
.\r\n\t * @see #setTachanunRecited15IyarOutOfIsrael(boolean)\r\n\t * @see #setTachanunRecitedPesachSheni(boolean)\r\n\t * @see #isTachanunRecitedPesachSheni()\r\n\t */\r\n public isTachanunRecited15IyarOutOfIsrael():boolean {\r\n return this.tachanunRecited15IyarOutOfIsrael;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on the 15th of {@link JewishDate#IYAR Iyar} (Yom Tov Sheni shel Galuyos of\r\n\t * {@link JewishCalendar#PESACH_SHENI Pesach Sheni}) out of Israel. Ignored if {@link\r\n\t * #isTachanunRecitedPesachSheni()} is true
.\r\n\t * \r\n\t * @param tachanunRecited15IyarOutOfIsrael if tachanun should be recited on the 15th of {@link JewishDate#IYAR\r\n\t * Iyar} (sfaika deyoma of {@link JewishCalendar#PESACH_SHENI Pesach Sheni}) out of Israel.\r\n\t * @see #isTachanunRecited15IyarOutOfIsrael()\r\n\t */\r\n public setTachanunRecited15IyarOutOfIsrael(tachanunRecited15IyarOutOfIsrael: boolean): void {\r\n this.tachanunRecited15IyarOutOfIsrael = tachanunRecited15IyarOutOfIsrael;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited on mincha on erev {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @return if tachanun is recited in mincha on erev\r\n\t * {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @see #setTachanunRecitedMinchaErevLagBaomer(boolean)\r\n\t */\r\n public isTachanunRecitedMinchaErevLagBaomer():boolean {\r\n return this.tachanunRecitedMinchaErevLagBaomer;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on erev {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @param tachanunRecitedMinchaErevLagBaomer sets if tachanun should be recited on mincha\r\n\t * of erev {@link JewishCalendar#LAG_BAOMER Lag Baomer}.\r\n\t * @see #isTachanunRecitedMinchaErevLagBaomer()\r\n\t */\r\n public setTachanunRecitedMinchaErevLagBaomer(tachanunRecitedMinchaErevLagBaomer:boolean): void {\r\n this.tachanunRecitedMinchaErevLagBaomer = tachanunRecitedMinchaErevLagBaomer;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited during the Shivas Yemei Hamiluim, from the 23 of {@link\r\n\t * JewishDate#ADAR Adar} on a non-leap-year or {@link JewishDate#ADAR_II Adar II} on a\r\n\t * leap year to the end of the month. Some chasidishe communities do not say tachanun\r\n\t * during this week. See Darkei\r\n\t * Chaim Veshalom 191.\r\n\t * @return if tachanun is recited during the Shivas Yemei Hamiluim, from the 23 of {@link\r\n\t * JewishDate#ADAR Adar} on a non-leap-year or {@link JewishDate#ADAR_II Adar II}\r\n\t * on a leap year to the end of the month.\r\n\t * @see #setTachanunRecitedShivasYemeiHamiluim(boolean)\r\n\t */\r\n public isTachanunRecitedShivasYemeiHamiluim():boolean {\r\n return this.tachanunRecitedShivasYemeiHamiluim;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited during the Shivas Yemei Hamiluim, from the 23 of\r\n\t * {@link JewishDate#ADAR Adar} on a non-leap-year or {@link JewishDate#ADAR_II Adar II}\r\n\t * on a leap year to the end of the month.\r\n\t * @param tachanunRecitedShivasYemeiHamiluim sets if tachanun should be recited during the\r\n\t * Shivas Yemei Hamiluim.\r\n\t * @see #isTachanunRecitedShivasYemeiHamiluim()\r\n\t */\r\n public setTachanunRecitedShivasYemeiHamiluim(tachanunRecitedShivasYemeiHamiluim:boolean):void {\r\n this.tachanunRecitedShivasYemeiHamiluim = tachanunRecitedShivasYemeiHamiluim;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited on Fridays. Some chasidishe communities do not recite\r\n\t * tachanun on Fridays. See Likutei\r\n\t * Maharich Vol 2 Seder Hanhagos Erev Shabbos. This is also the minhag in Satmar.\r\n\t * @return if tachanun is recited on Fridays.\r\n\t * @see #setTachanunRecitedFridays(boolean)\r\n\t */\r\n public isTachanunRecitedFridays():boolean {\r\n return this.tachanunRecitedFridays;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on Fridays. \r\n\t * @param tachanunRecitedFridays sets if tachanun should be recited on Fridays. Some chasidishe\r\n\t * communities do not recite tachanun on Fridays.\r\n\t * @see #isTachanunRecitedFridays()\r\n\t */\r\n public setTachanunRecitedFridays(tachanunRecitedFridays:boolean):void {\r\n this.tachanunRecitedFridays = tachanunRecitedFridays;\r\n }\r\n\r\n /**\r\n\t * Is tachanun recited on Sundays. Some chasidishe communities do not recite\r\n\t * tachanun on Sundays. See Likutei\r\n\t * Maharich Vol 2 Seder Hanhagos Erev Shabbos. \r\n\t * @return if tachanun is recited on Sundays.\r\n\t * @see #setTachanunRecitedSundays(boolean)\r\n\t */\r\n public isTachanunRecitedSundays():boolean {\r\n return this.tachanunRecitedSundays;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited on Sundays. \r\n\t * @param tachanunRecitedSundays sets if tachanun should be recited on Sundays. Some chasidishe\r\n\t * communities do not recite tachanun on Sundays.\r\n\t * @see #isTachanunRecitedSundays()\r\n\t */\r\n public setTachanunRecitedSundays(tachanunRecitedSundays:boolean):void {\r\n this.tachanunRecitedSundays = tachanunRecitedSundays;\r\n }\r\n\t\r\n /**\r\n\t * Is tachanun recited in Mincha the entire year. Some chasidishe communities do not recite\r\n\t * tachanun by Mincha all year round. SeeNemukei Orach Chaim 131:3.\r\n\t * @return if tachanun is recited in Mincha the entire year.\r\n\t * @see #setTachanunRecitedMinchaAllYear(boolean)\r\n\t */\r\n public isTachanunRecitedMinchaAllYear():boolean {\r\n return this.tachanunRecitedMinchaAllYear;\r\n }\r\n\r\n /**\r\n\t * Sets if tachanun should be recited in Mincha the entire year.\r\n\t * @param tachanunRecitedMinchaAllYear sets if tachanun should be recited by mincha all year. If set\r\n\t * to false, {@link #isTachanunRecitedMincha(JewishCalendar)} will always return false. If set to true (the\r\n\t * default), it will use the regular rules.\r\n\t * @see #isTachanunRecitedMinchaAllYear()\r\n\t */\r\n public setTachanunRecitedMinchaAllYear(tachanunRecitedMinchaAllYear:boolean):void {\r\n this.tachanunRecitedMinchaAllYear = tachanunRecitedMinchaAllYear;\r\n }\r\n}", "import { Daf } from './limud/Daf.ts';\r\nimport { JewishDate } from './JewishDate.ts';\r\nimport { JewishCalendar, Parsha } from './JewishCalendar.ts';\r\nimport { IllegalArgumentException } from '../polyfills/errors.ts';\r\nimport { DafYomiYerushalmi } from './limud/YerushalmiYomiCalculator.ts';\r\n\r\n/**\r\n * The HebrewDateFormatter class formats a {@link JewishDate}.\r\n *\r\n * The class formats Jewish dates, numbers, Daf Yomi (Bavli and Yerushalmi), the Omer,\r\n * Parshas Hashavua (including the special parshiyos of Shekalim, Zachor, Parah\r\n * and Hachodesh), Yomim Tovim and the Molad (experimental) in Hebrew or Latin chars, and has various settings.\r\n * Sample full date output includes (using various options):\r\n * \"בראשית, נח, לך לך,\r\n * וירא, חיי שרה,\r\n * תולדות, ויצא, וישלח,\r\n * וישב, מקץ, ויגש, ויחי,\r\n * שמות, וארא, בא, בשלח,\r\n * יתרו, משפטים, תרומה,\r\n * תצוה, כי תשא, ויקהל,\r\n * פקודי, ויקרא, צו,\r\n * שמיני, תזריע, מצרע,\r\n * אחרי מות, קדושים,\r\n * אמור, בהר, בחקתי,\r\n * במדבר, נשא, בהעלתך,\r\n * שלח לך, קרח, חוקת, בלק,\r\n * פינחס, מטות, מסעי,\r\n * דברים, ואתחנן, עקב,\r\n * ראה, שופטים, כי תצא,\r\n * כי תבוא, D9;צבים, וילך,\r\n * האזינו, וזאת הברכה,\r\n * ויקהל פקודי, תזריע\r\n * מצרע, אחרי מות\r\n * קדושים, בהר בחקתי,\r\n * חוקת בלק, מטות מסעי,\r\n * נצבים וילך, שקלים,\r\n\t * זכור, פרה, החדש,\r\n\t * שובה,שירה,הגדול,\r\n\t * חזון,נחמו\"
\r\n */\r\n private readonly hebrewParshaMap: Record[\"ערב פסח\",\r\n * \"פסח\", \"חול המועד\r\n * פסח\", \"פסח שני\", \"ערב\r\n * שבועות\", \"שבועות\",\r\n * \"שבעה עשר בתמוז\",\r\n * \"תשעה באב\",\r\n * \"ט״ו באב\",\r\n * \"ערב ראש השנה\",\r\n * \"ראש השנה\",\r\n * \"צום גדליה\",\r\n * \"ערב יום כיפור\",\r\n * \"יום כיפור\",\r\n * \"ערב סוכות\",\r\n * \"סוכות\",\r\n * \"חול המועד סוכות\",\r\n * \"הושענא רבה\",\r\n * \"שמיני עצרת\",\r\n * \"שמחת תורה\",\r\n * \"ערב חנוכה\",\r\n * \"חנוכה\", \"עשרה בטבת\",\r\n * \"ט״ו בשבט\",\r\n * \"תענית אסתר\",\r\n * \"פורים\",\r\n * \"פורים שושן\",\r\n * \"פורים קטן\",\r\n * \"ראש חודש\",\r\n * \"יום השואה\",\r\n * \"יום הזיכרון\",\r\n * \"יום העצמאות\",\r\n * \"יום ירושלים\",\r\n * \"ל״ג בעומר\",\r\n * \"פורים שושן קטן\"]
\r\n */\r\n private static readonly hebrewHolidays: string[] = ['\\u05E2\\u05E8\\u05D1 \\u05E4\\u05E1\\u05D7', '\\u05E4\\u05E1\\u05D7',\r\n '\\u05D7\\u05D5\\u05DC \\u05D4\\u05DE\\u05D5\\u05E2\\u05D3 \\u05E4\\u05E1\\u05D7',\r\n '\\u05E4\\u05E1\\u05D7 \\u05E9\\u05E0\\u05D9', '\\u05E2\\u05E8\\u05D1 \\u05E9\\u05D1\\u05D5\\u05E2\\u05D5\\u05EA',\r\n '\\u05E9\\u05D1\\u05D5\\u05E2\\u05D5\\u05EA',\r\n '\\u05E9\\u05D1\\u05E2\\u05D4 \\u05E2\\u05E9\\u05E8 \\u05D1\\u05EA\\u05DE\\u05D5\\u05D6',\r\n '\\u05EA\\u05E9\\u05E2\\u05D4 \\u05D1\\u05D0\\u05D1', '\\u05D8\\u05F4\\u05D5 \\u05D1\\u05D0\\u05D1',\r\n '\\u05E2\\u05E8\\u05D1 \\u05E8\\u05D0\\u05E9 \\u05D4\\u05E9\\u05E0\\u05D4',\r\n '\\u05E8\\u05D0\\u05E9 \\u05D4\\u05E9\\u05E0\\u05D4', '\\u05E6\\u05D5\\u05DD \\u05D2\\u05D3\\u05DC\\u05D9\\u05D4',\r\n '\\u05E2\\u05E8\\u05D1 \\u05D9\\u05D5\\u05DD \\u05DB\\u05D9\\u05E4\\u05D5\\u05E8',\r\n '\\u05D9\\u05D5\\u05DD \\u05DB\\u05D9\\u05E4\\u05D5\\u05E8', '\\u05E2\\u05E8\\u05D1 \\u05E1\\u05D5\\u05DB\\u05D5\\u05EA',\r\n '\\u05E1\\u05D5\\u05DB\\u05D5\\u05EA',\r\n '\\u05D7\\u05D5\\u05DC \\u05D4\\u05DE\\u05D5\\u05E2\\u05D3 \\u05E1\\u05D5\\u05DB\\u05D5\\u05EA',\r\n '\\u05D4\\u05D5\\u05E9\\u05E2\\u05E0\\u05D0 \\u05E8\\u05D1\\u05D4',\r\n '\\u05E9\\u05DE\\u05D9\\u05E0\\u05D9 \\u05E2\\u05E6\\u05E8\\u05EA',\r\n '\\u05E9\\u05DE\\u05D7\\u05EA \\u05EA\\u05D5\\u05E8\\u05D4', '\\u05E2\\u05E8\\u05D1 \\u05D7\\u05E0\\u05D5\\u05DB\\u05D4',\r\n '\\u05D7\\u05E0\\u05D5\\u05DB\\u05D4', '\\u05E2\\u05E9\\u05E8\\u05D4 \\u05D1\\u05D8\\u05D1\\u05EA',\r\n '\\u05D8\\u05F4\\u05D5 \\u05D1\\u05E9\\u05D1\\u05D8', '\\u05EA\\u05E2\\u05E0\\u05D9\\u05EA \\u05D0\\u05E1\\u05EA\\u05E8',\r\n '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD', '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD \\u05E9\\u05D5\\u05E9\\u05DF',\r\n '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD \\u05E7\\u05D8\\u05DF', '\\u05E8\\u05D0\\u05E9 \\u05D7\\u05D5\\u05D3\\u05E9',\r\n '\\u05D9\\u05D5\\u05DD \\u05D4\\u05E9\\u05D5\\u05D0\\u05D4',\r\n '\\u05D9\\u05D5\\u05DD \\u05D4\\u05D6\\u05D9\\u05DB\\u05E8\\u05D5\\u05DF',\r\n '\\u05D9\\u05D5\\u05DD \\u05D4\\u05E2\\u05E6\\u05DE\\u05D0\\u05D5\\u05EA',\r\n '\\u05D9\\u05D5\\u05DD \\u05D9\\u05E8\\u05D5\\u05E9\\u05DC\\u05D9\\u05DD',\r\n '\\u05DC\\u05F4\\u05D2 \\u05D1\\u05E2\\u05D5\\u05DE\\u05E8',\r\n '\\u05E4\\u05D5\\u05E8\\u05D9\\u05DD \\u05E9\\u05D5\\u05E9\\u05DF \\u05E7\\u05D8\\u05DF',\r\n '\\u05D0\\u05E1\\u05E8\\u05D5 \\u05D7\\u05D2'];\r\n\r\n /**\r\n * Formats the Yom Tov (holiday) in Hebrew or transliterated Latin characters.\r\n *\r\n * @param jewishCalendar the JewishCalendar\r\n * @return the formatted holiday or an empty String if the day is not a holiday.\r\n * @see #isHebrewFormat()\r\n */\r\n public formatYomTov(jewishCalendar: JewishCalendar): string {\r\n const index: number = jewishCalendar.getYomTovIndex();\r\n if (index === JewishCalendar.CHANUKAH) {\r\n const dayOfChanukah: number = jewishCalendar.getDayOfChanukah();\r\n return this.hebrewFormat\r\n ? (`${this.formatHebrewNumber(dayOfChanukah)} ${HebrewDateFormatter.hebrewHolidays[index]}`)\r\n : (`${this.transliteratedHolidays[index]} ${dayOfChanukah}`);\r\n }\r\n if (index === -1) return '';\r\n return this.hebrewFormat ? HebrewDateFormatter.hebrewHolidays[index] : this.transliteratedHolidays[index];\r\n }\r\n\r\n /**\r\n * Formats a day as Rosh Chodesh in the format of in the format of ראש\r\n * חודש שבט or Rosh Chodesh Shevat. If it\r\n * is not Rosh Chodesh, an empty String
will be returned.\r\n * @param jewishCalendar the JewishCalendar\r\n * @return The formatted String
in the format of ראש\r\n * חודש שבט or Rosh Chodesh Shevat. If it\r\n * is not Rosh Chodesh, an empty String
will be returned.\r\n */\r\n public formatRoshChodesh(jewishCalendar: JewishCalendar): string {\r\n if (!jewishCalendar.isRoshChodesh()) return '';\r\n\r\n let formattedRoshChodesh: string;\r\n let month: number = jewishCalendar.getJewishMonth();\r\n if (jewishCalendar.getJewishDayOfMonth() === 30) {\r\n if (month < JewishCalendar.ADAR || (month === JewishCalendar.ADAR && jewishCalendar.isJewishLeapYear())) {\r\n month++;\r\n } else { // roll to Nissan\r\n month = JewishCalendar.NISSAN;\r\n }\r\n }\r\n\r\n // This method is only about formatting, so we shouldn't make any changes to the params passed in...\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n const _jewishCalendar = jewishCalendar.clone() as JewishCalendar;\r\n _jewishCalendar.setJewishMonth(month);\r\n formattedRoshChodesh = this.hebrewFormat ? HebrewDateFormatter.hebrewHolidays[JewishCalendar.ROSH_CHODESH]\r\n : this.transliteratedHolidays[JewishCalendar.ROSH_CHODESH];\r\n formattedRoshChodesh += ` ${this.formatMonth(_jewishCalendar)}`;\r\n return formattedRoshChodesh;\r\n }\r\n\r\n /**\r\n * Returns if the formatter is set to use Hebrew formatting in the various formatting methods.\r\n *\r\n * @return the hebrewFormat\r\n * @see #setHebrewFormat(boolean)\r\n * @see #format(JewishDate)\r\n * @see #formatDayOfWeek(JewishDate)\r\n * @see #formatMonth(JewishDate)\r\n * @see #formatOmer(JewishCalendar)\r\n * @see #formatParsha(JewishCalendar)\r\n * @see #formatYomTov(JewishCalendar)\r\n */\r\n public isHebrewFormat(): boolean {\r\n return this.hebrewFormat;\r\n }\r\n\r\n /**\r\n * Sets the formatter to format in Hebrew in the various formatting methods.\r\n *\r\n * @param hebrewFormat\r\n * the hebrewFormat to set\r\n * @see #isHebrewFormat()\r\n * @see #format(JewishDate)\r\n * @see #formatDayOfWeek(JewishDate)\r\n * @see #formatMonth(JewishDate)\r\n * @see #formatOmer(JewishCalendar)\r\n * @see #formatParsha(JewishCalendar)\r\n * @see #formatYomTov(JewishCalendar)\r\n */\r\n public setHebrewFormat(hebrewFormat: boolean): void {\r\n this.hebrewFormat = hebrewFormat;\r\n }\r\n\r\n /**\r\n * Returns the Hebrew Omer prefix. By default it is the letter ב producing\r\n * בעומר, but it can be set to ל to produce\r\n * לעומר (or any other prefix) using the {@link #setHebrewOmerPrefix(String)}.\r\n *\r\n * @return the hebrewOmerPrefix\r\n *\r\n * @see #hebrewOmerPrefix\r\n * @see #setHebrewOmerPrefix(String)\r\n * @see #formatOmer(JewishCalendar)\r\n */\r\n public getHebrewOmerPrefix(): string {\r\n return this.hebrewOmerPrefix;\r\n }\r\n\r\n /**\r\n * Method to set the Hebrew Omer prefix. By default it is the letter ב, but this allows setting it to a\r\n * ל (or any other prefix).\r\n *\r\n * @param hebrewOmerPrefix\r\n * the hebrewOmerPrefix to set. You can use the Unicode \u05DC to set it to ל.\r\n * @see #getHebrewOmerPrefix()\r\n * @see #formatOmer(JewishCalendar)\r\n */\r\n public setHebrewOmerPrefix(hebrewOmerPrefix: string): void {\r\n this.hebrewOmerPrefix = hebrewOmerPrefix;\r\n }\r\n\r\n /**\r\n * Returns the list of months transliterated into Latin chars. The default list of months uses Ashkenazi\r\n * pronunciation in typical American English spelling. This list has a length of 14 with 3 variations for Adar -\r\n * \"Adar\", \"Adar II\", \"Adar I\"\r\n *\r\n * @return the list of months beginning in Nissan and ending in in \"Adar\", \"Adar II\", \"Adar I\". The default list is\r\n * currently [\"Nissan\", \"Iyar\", \"Sivan\", \"Tammuz\", \"Av\", \"Elul\", \"Tishrei\", \"Cheshvan\", \"Kislev\", \"Teves\",\r\n * \"Shevat\", \"Adar\", \"Adar II\", \"Adar I\"].\r\n * @see #setTransliteratedMonthList(String[])\r\n */\r\n public getTransliteratedMonthList(): string[] {\r\n return this.transliteratedMonths;\r\n }\r\n\r\n /**\r\n * Setter method to allow overriding of the default list of months transliterated into into Latin chars. The default\r\n * uses Ashkenazi American English transliteration.\r\n *\r\n * @param transliteratedMonths\r\n * an array of 14 month names that defaults to [\"Nissan\", \"Iyar\", \"Sivan\", \"Tamuz\", \"Av\", \"Elul\", \"Tishrei\",\r\n * \"Heshvan\", \"Kislev\", \"Tevet\", \"Shevat\", \"Adar\", \"Adar II\", \"Adar I\"].\r\n * @see #getTransliteratedMonthList()\r\n */\r\n public setTransliteratedMonthList(transliteratedMonths: string[]): void {\r\n this.transliteratedMonths = transliteratedMonths;\r\n }\r\n\r\n /**\r\n * Unicode list of Hebrew months in the following format [\"\\u05E0\\u05D9\\u05E1\\u05DF\",\"\\u05D0\\u05D9\\u05D9\\u05E8\",\r\n * \"\\u05E1\\u05D9\\u05D5\\u05DF\",\"\\u05EA\\u05DE\\u05D5\\u05D6\",\"\\u05D0\\u05D1\",\"\\u05D0\\u05DC\\u05D5\\u05DC\",\r\n * \"\\u05EA\\u05E9\\u05E8\\u05D9\",\"\\u05D7\\u05E9\\u05D5\\u05DF\",\"\\u05DB\\u05E1\\u05DC\\u05D5\",\"\\u05D8\\u05D1\\u05EA\",\r\n * \"\\u05E9\\u05D1\\u05D8\",\"\\u05D0\\u05D3\\u05E8\",\"\\u05D0\\u05D3\\u05E8 \\u05D1\",\"\\u05D0\\u05D3\\u05E8 \\u05D0\"]
\r\n *\r\n * @see #formatMonth(JewishDate)\r\n */\r\n private hebrewMonths: string[] = ['\\u05E0\\u05D9\\u05E1\\u05DF', '\\u05D0\\u05D9\\u05D9\\u05E8',\r\n '\\u05E1\\u05D9\\u05D5\\u05DF', '\\u05EA\\u05DE\\u05D5\\u05D6', '\\u05D0\\u05D1', '\\u05D0\\u05DC\\u05D5\\u05DC',\r\n '\\u05EA\\u05E9\\u05E8\\u05D9', '\\u05D7\\u05E9\\u05D5\\u05DF', '\\u05DB\\u05E1\\u05DC\\u05D5',\r\n '\\u05D8\\u05D1\\u05EA', '\\u05E9\\u05D1\\u05D8', '\\u05D0\\u05D3\\u05E8', '\\u05D0\\u05D3\\u05E8 \\u05D1',\r\n '\\u05D0\\u05D3\\u05E8 \\u05D0'];\r\n\r\n /**\r\n * Unicode list of Hebrew days of week in the format of [\"ראשון\",\r\n * \"שני\",\"שלישי\",\"רביעי\",\r\n * \"חמישי\",\"ששי\",\"שבת\"]
\r\n */\r\n private static readonly hebrewDaysOfWeek: string[] = ['\\u05E8\\u05D0\\u05E9\\u05D5\\u05DF', '\\u05E9\\u05E0\\u05D9',\r\n '\\u05E9\\u05DC\\u05D9\\u05E9\\u05D9', '\\u05E8\\u05D1\\u05D9\\u05E2\\u05D9', '\\u05D7\\u05DE\\u05D9\\u05E9\\u05D9',\r\n '\\u05E9\\u05E9\\u05D9', '\\u05E9\\u05D1\\u05EA'];\r\n\r\n /**\r\n * Formats the day of week. If {@link #isHebrewFormat() Hebrew formatting} is set, it will display in the format\r\n * ראשון etc. If Hebrew formatting is not in use it will return it in the format\r\n * of Sunday etc. There are various formatting options that will affect the output.\r\n *\r\n * @param jewishDate the JewishDate Object\r\n * @return the formatted day of week\r\n * @see #isHebrewFormat()\r\n * @see #isLongWeekFormat()\r\n */\r\n public formatDayOfWeek(jewishDate: JewishDate): string {\r\n if (this.hebrewFormat) {\r\n if (this.isLongWeekFormat()) {\r\n return HebrewDateFormatter.hebrewDaysOfWeek[jewishDate.getDayOfWeek() - 1];\r\n }\r\n\r\n if (jewishDate.getDayOfWeek() === 7) {\r\n return this.formatHebrewNumber(300);\r\n }\r\n\r\n return this.formatHebrewNumber(jewishDate.getDayOfWeek());\r\n }\r\n\r\n if (jewishDate.getDayOfWeek() === 7) {\r\n if (this.isLongWeekFormat()) {\r\n return this.getTransliteratedShabbosDayOfWeek();\r\n }\r\n\r\n return this.getTransliteratedShabbosDayOfWeek().substring(0, 3);\r\n }\r\n\r\n const dateTime = jewishDate.getDate();\r\n return this.weekFormat\r\n ? dateTime.toLocaleString(undefined, this.weekFormat)\r\n : dateTime.toString();\r\n }\r\n\r\n /**\r\n * Returns whether the class is set to use the Geresh ׳ and Gershayim ״ in formatting Hebrew dates and\r\n * numbers. When true and output would look like כ״א שבט תש״כ\r\n * (or כ״א שבט תש״ך). When set to false, this output\r\n * would display as כא שבט תשכ.\r\n *\r\n * @return true if set to use the Geresh ׳ and Gershayim ״ in formatting Hebrew dates and numbers.\r\n */\r\n public isUseGershGershayim(): boolean {\r\n return this.useGershGershayim;\r\n }\r\n\r\n /**\r\n * Sets whether to use the Geresh ׳ and Gershayim ״ in formatting Hebrew dates and numbers. The default\r\n * value is true and output would look like כ״א שבט תש״כ\r\n * (or כ״א שבט תש״ך). When set to false, this output would\r\n * display as כא שבט תשכ (or\r\n * כא שבט תשך). Single digit days or month or years such as כ׳\r\n * שבט ו׳ אלפים show the use of the Geresh.\r\n *\r\n * @param useGershGershayim\r\n * set to false to omit the Geresh ׳ and Gershayim ״ in formatting\r\n */\r\n public setUseGershGershayim(useGershGershayim: boolean): void {\r\n this.useGershGershayim = useGershGershayim;\r\n }\r\n\r\n /**\r\n * Returns whether the class is set to use the מנצפ״ך letters when\r\n * formatting years ending in 20, 40, 50, 80 and 90 to produce תש״פ if false or\r\n * or תש״ף if true. Traditionally non-final form letters are used, so the year\r\n * 5780 would be formatted as תש״פ if the default false is used here. If this returns\r\n * true, the format תש״ף would be used.\r\n *\r\n * @return true if set to use final form letters when formatting Hebrew years. The default value is false.\r\n */\r\n public isUseFinalFormLetters(): boolean {\r\n return this.useFinalFormLetters;\r\n }\r\n\r\n /**\r\n * When formatting a Hebrew Year, traditionally years ending in 20, 40, 50, 80 and 90 are formatted using non-final\r\n * form letters for example תש״פ for the year 5780. Setting this to true (the default\r\n * is false) will use the final form letters for מנצפ״ך and will format\r\n * the year 5780 as תש״ף.\r\n *\r\n * @param useFinalFormLetters\r\n * Set this to true to use final form letters when formatting Hebrew years.\r\n */\r\n public setUseFinalFormLetters(useFinalFormLetters: boolean): void {\r\n this.useFinalFormLetters = useFinalFormLetters;\r\n }\r\n\r\n /**\r\n * Returns whether the class is set to use the thousands digit when formatting. When formatting a Hebrew Year,\r\n * traditionally the thousands digit is omitted and output for a year such as 5729 (1969 Gregorian) would be\r\n * calculated for 729 and format as תשכ״ט. When set to true the long format year such\r\n * as ה׳ תשכ״ט for 5729/1969 is returned.\r\n *\r\n * @return true if set to use the thousands digit when formatting Hebrew dates and numbers.\r\n */\r\n public isUseLongHebrewYears(): boolean {\r\n return this.useLonghebrewYears;\r\n }\r\n\r\n /**\r\n * When formatting a Hebrew Year, traditionally the thousands digit is omitted and output for a year such as 5729\r\n * (1969 Gregorian) would be calculated for 729 and format as תשכ״ט. This method\r\n * allows setting this to true to return the long format year such as ה׳\r\n * תשכ״ט for 5729/1969.\r\n *\r\n * @param useLongHebrewYears\r\n * Set this to true to use the long formatting\r\n */\r\n public setUseLongHebrewYears(useLongHebrewYears: boolean): void {\r\n this.useLonghebrewYears = useLongHebrewYears;\r\n }\r\n\r\n /**\r\n * Formats the Jewish date. If the formatter is set to Hebrew, it will format in the form, \"day Month year\" for\r\n * example כ״א שבט תשכ״ט, and the format\r\n * \"21 Shevat, 5729\" if not.\r\n *\r\n * @param jewishDate\r\n * the JewishDate to be formatted\r\n * @return the formatted date. If the formatter is set to Hebrew, it will format in the form, \"day Month year\" for\r\n * example כ״א שבט תשכ״ט, and the format\r\n * \"21 Shevat, 5729\" if not.\r\n */\r\n public format(jewishDate: JewishDate): string {\r\n if (this.isHebrewFormat()) {\r\n return `${this.formatHebrewNumber(jewishDate.getJewishDayOfMonth())} ${this.formatMonth(jewishDate)} ${this.formatHebrewNumber(jewishDate.getJewishYear())}`;\r\n }\r\n return `${jewishDate.getJewishDayOfMonth()} ${this.formatMonth(jewishDate)}, ${jewishDate.getJewishYear()}`;\r\n }\r\n\r\n /**\r\n * Returns a string of the current Hebrew month such as \"Tishrei\". Returns a string of the current Hebrew month such\r\n * as \"אדר ב׳\".\r\n *\r\n * @param jewishDate\r\n * the JewishDate to format\r\n * @return the formatted month name\r\n * @see #isHebrewFormat()\r\n * @see #setHebrewFormat(boolean)\r\n * @see #getTransliteratedMonthList()\r\n * @see #setTransliteratedMonthList(String[])\r\n */\r\n public formatMonth(jewishDate: JewishDate): string {\r\n const month: number = jewishDate.getJewishMonth();\r\n if (this.isHebrewFormat()) {\r\n if (jewishDate.isJewishLeapYear() && month === JewishDate.ADAR) {\r\n return this.hebrewMonths[13] + (this.useGershGershayim ? HebrewDateFormatter.GERESH : ''); // return Adar I, not Adar in a leap year\r\n } else if (jewishDate.isJewishLeapYear() && month === JewishDate.ADAR_II) {\r\n return this.hebrewMonths[12] + (this.useGershGershayim ? HebrewDateFormatter.GERESH : '');\r\n }\r\n return this.hebrewMonths[month - 1];\r\n }\r\n\r\n if (jewishDate.isJewishLeapYear() && month === JewishDate.ADAR) {\r\n return this.transliteratedMonths[13]; // return Adar I, not Adar in a leap year\r\n }\r\n\r\n return this.transliteratedMonths[month - 1];\r\n }\r\n\r\n /**\r\n * Returns a String of the Omer day in the form ל״ג בעומר if\r\n * Hebrew Format is set, or \"Omer X\" or \"Lag B'Omer\" if not. An empty string if there is no Omer this day.\r\n *\r\n * @param jewishCalendar\r\n * the JewishCalendar to be formatted\r\n *\r\n * @return a String of the Omer day in the form or an empty string if there is no Omer this day. The default\r\n * formatting has a ב׳ prefix that would output בעומר, but this\r\n * can be set via the {@link #setHebrewOmerPrefix(String)} method to use a ל and output\r\n * ל״ג לעומר.\r\n * @see #isHebrewFormat()\r\n * @see #getHebrewOmerPrefix()\r\n * @see #setHebrewOmerPrefix(String)\r\n */\r\n public formatOmer(jewishCalendar: JewishCalendar): string {\r\n const omer: number = jewishCalendar.getDayOfOmer();\r\n if (omer === -1) {\r\n return '';\r\n }\r\n\r\n if (this.hebrewFormat) {\r\n return `${this.formatHebrewNumber(omer)} ${this.hebrewOmerPrefix}\u05E2\u05D5\u05DE\u05E8`;\r\n }\r\n\r\n if (omer === 33) { // if Lag B'Omer\r\n return this.transliteratedHolidays[33];\r\n }\r\n\r\n return `Omer ${omer}`;\r\n }\r\n\r\n /**\r\n * Formats a molad.\r\n * TODO: Experimental and incomplete\r\n *\r\n * @param moladChalakim - the chalakim of the molad\r\n * @return the formatted molad. FIXME: define proper format in English and Hebrew.\r\n */\r\n private static formatMolad(moladChalakim: number): string {\r\n let adjustedChalakim: number = moladChalakim;\r\n const MINUTE_CHALAKIM: number = 18;\r\n const HOUR_CHALAKIM: number = 1080;\r\n const DAY_CHALAKIM: number = 24 * HOUR_CHALAKIM;\r\n\r\n let days: number = adjustedChalakim / DAY_CHALAKIM;\r\n adjustedChalakim -= (days * DAY_CHALAKIM);\r\n const hours: number = Math.trunc(adjustedChalakim / HOUR_CHALAKIM);\r\n if (hours >= 6) {\r\n days += 1;\r\n }\r\n adjustedChalakim -= (hours * HOUR_CHALAKIM);\r\n const minutes: number = Math.trunc(adjustedChalakim / MINUTE_CHALAKIM);\r\n adjustedChalakim -= minutes * MINUTE_CHALAKIM;\r\n return `Day: ${days % 7} hours: ${hours}, minutes: ${minutes}, chalakim: ${adjustedChalakim}`;\r\n }\r\n\r\n /**\r\n * Returns the kviah in the traditional 3 letter Hebrew format where the first letter represents the day of week of\r\n * Rosh Hashana, the second letter represents the lengths of Cheshvan and Kislev ({@link JewishDate#SHELAIMIM\r\n * Shelaimim} , {@link JewishDate#KESIDRAN Kesidran} or {@link JewishDate#CHASERIM Chaserim}) and the 3rd letter\r\n * represents the day of week of Pesach. For example 5729 (1969) would return בשה (Rosh Hashana on\r\n * Monday, Shelaimim, and Pesach on Thursday), while 5771 (2011) would return השג (Rosh Hashana on\r\n * Thursday, Shelaimim, and Pesach on Tuesday).\r\n *\r\n * @param jewishYear\r\n * the Jewish year\r\n * @return the Hebrew String such as בשה for 5729 (1969) and השג for 5771\r\n * (2011).\r\n */\r\n public getFormattedKviah(jewishYear: number): string {\r\n const jewishDate: JewishDate = new JewishDate(jewishYear, JewishDate.TISHREI, 1); // set date to Rosh Hashana\r\n const kviah: number = jewishDate.getCheshvanKislevKviah();\r\n const roshHashanaDayOfweek: number = jewishDate.getDayOfWeek();\r\n let returnValue: string = this.formatHebrewNumber(roshHashanaDayOfweek);\r\n returnValue += (kviah === JewishDate.CHASERIM ? '\\u05D7' : kviah === JewishDate.SHELAIMIM ? '\\u05E9' : '\\u05DB');\r\n jewishDate.setJewishDate(jewishYear, JewishDate.NISSAN, 15); // set to Pesach of the given year\r\n const pesachDayOfweek: number = jewishDate.getDayOfWeek();\r\n returnValue += this.formatHebrewNumber(pesachDayOfweek);\r\n returnValue = returnValue.replace(new RegExp(HebrewDateFormatter.GERESH, 'g'), ''); // geresh is never used in the kviah format\r\n // boolean isLeapYear = JewishDate.isJewishLeapYear(jewishYear);\r\n // for efficiency we can avoid the expensive recalculation of the pesach day of week by adding 1 day to Rosh\r\n // Hashana for a 353 day year, 2 for a 354 day year, 3 for a 355 or 383 day year, 4 for a 384 day year and 5 for\r\n // a 385 day year\r\n return returnValue;\r\n }\r\n\r\n /**\r\n * Formats the Daf Yomi Yerushalmi in the format\r\n * of \"עירובין נ״ב\" in {@link #isHebrewFormat() Hebrew}, or\r\n * the transliterated format of \"Eruvin 52\".\r\n *\r\n * @param daf the Daf to be formatted.\r\n * @return the formatted daf.\r\n */\r\n public formatDafYomi(daf: Daf): string {\r\n if (daf == null) {\r\n if (this.hebrewFormat) {\r\n return DafYomiYerushalmi.getMasechtos()[39];\r\n }\r\n\r\n return DafYomiYerushalmi.getMasechtosTransliterated()[39];\r\n }\r\n\r\n if (this.hebrewFormat) {\r\n return daf.getMasechta() + ' ' + this.formatHebrewNumber(daf.getDaf());\r\n }\r\n\r\n return daf.getMasechtaTransliterated() + ' ' + daf.getDaf();\r\n }\r\n\r\n /**\r\n * Returns a Hebrew formatted string of a number. The method can calculate from 0 - 9999.\r\n *