import { DateTime } from 'luxon'; import { Daf } from './Daf'; import { JewishDate } from './JewishDate'; /** * List of parshiyos or special Shabasos. {@link #NONE} indicates a week without a parsha, while the enum for * the parsha of {@link #VZOS_HABERACHA} exists for consistency, but is not currently used. The special Shabasos of * Shekalim, Zachor, Para, Hachodesh, as well as Shabbos Shuva, Shira, Hagadol, Chazon and Nachamu are also represented in this collection * of parshiyos. * @see #getSpecialShabbos() * @see #getParsha() */ export declare enum Parsha { /** NONE - A week without any parsha such as Shabbos Chol Hamoed */ NONE = 0, BERESHIS = 1, NOACH = 2, LECH_LECHA = 3, VAYERA = 4, CHAYEI_SARA = 5, TOLDOS = 6, VAYETZEI = 7, VAYISHLACH = 8, VAYESHEV = 9, MIKETZ = 10, VAYIGASH = 11, VAYECHI = 12, SHEMOS = 13, VAERA = 14, BO = 15, BESHALACH = 16, YISRO = 17, MISHPATIM = 18, TERUMAH = 19, TETZAVEH = 20, KI_SISA = 21, VAYAKHEL = 22, PEKUDEI = 23, VAYIKRA = 24, TZAV = 25, SHMINI = 26, TAZRIA = 27, METZORA = 28, ACHREI_MOS = 29, KEDOSHIM = 30, EMOR = 31, BEHAR = 32, BECHUKOSAI = 33, BAMIDBAR = 34, NASSO = 35, BEHAALOSCHA = 36, SHLACH = 37, KORACH = 38, CHUKAS = 39, BALAK = 40, PINCHAS = 41, MATOS = 42, MASEI = 43, DEVARIM = 44, VAESCHANAN = 45, EIKEV = 46, REEH = 47, SHOFTIM = 48, KI_SEITZEI = 49, KI_SAVO = 50, NITZAVIM = 51, VAYEILECH = 52, HAAZINU = 53, VZOS_HABERACHA = 54, /** The double parsha of Vayakhel & Peudei */ VAYAKHEL_PEKUDEI = 55, /** The double parsha of Tazria & Metzora */ TAZRIA_METZORA = 56, /** The double parsha of Achrei Mos & Kedoshim */ ACHREI_MOS_KEDOSHIM = 57, /** The double parsha of Behar & Bechukosai */ BEHAR_BECHUKOSAI = 58, /** The double parsha of Chukas & Balak */ CHUKAS_BALAK = 59, /** The double parsha of Matos & Masei */ MATOS_MASEI = 60, /** The double parsha of Nitzavim & Vayelech */ NITZAVIM_VAYEILECH = 61, /** The special parsha of Shekalim */ SHKALIM = 62, /** The special parsha of Zachor */ ZACHOR = 63, /** The special parsha of Para */ PARA = 64, /** The special parsha of Hachodesh */ HACHODESH = 65, /** Shabbos Shuva */ SHUVA = 66, /** Shabbos Shira */ SHIRA = 67, /** Shabbos Hagadol */ HAGADOL = 68, /** Shabbos Chazon */ CHAZON = 69, /** Shabbos Nachamu */ NACHAMU = 70 } /** * The JewishCalendar extends the JewishDate class and adds calendar methods. * * This open source Java code was originally ported 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. The class allows setting whether the holiday and parsha scheme follows the Israel scheme or outside Israel * scheme. The default is the outside Israel scheme. * The parsha code was ported by Y. Paritcher from his libzmanim code. * * TODO: Some do not belong in this class, but here is a partial list of what should still be implemented in some form: *
Date to set the calendar to
*/
/**
* A constructor that initializes the date to the {@link java.util.Calendar Calendar} parameter.
*
* @param calendar
* the Calendar to set the calendar to
*/
/**
* Creates a Jewish date based on a Jewish year, month and day of month.
*
* @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.
* @param inIsrael
* whether in Israel. This affects Yom Tov calculations
*/
/**
* Creates a Jewish date based on a Jewish date and whether in Israel
*
* @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
* @param inIsrael
* whether in Israel. This affects Yom Tov calculations
*/
constructor(jewishYear: number, jewishMonth: number, jewishDayOfMonth: number, inIsrael?: boolean);
constructor(date: Date);
constructor(date: DateTime);
constructor();
/**
* Sets whether to use Israel holiday scheme or not. Default is false.
*
* @param inIsrael
* set to true for calculations for Israel
*
* @see #getInIsrael()
*/
setInIsrael(inIsrael: boolean): void;
/**
* Gets whether Israel holiday scheme is used or not. The default (if not set) is false.
*
* @return if the if the calendar is set to Israel
*
* @see #setInIsrael(boolean)
*/
getInIsrael(): boolean;
/**
* Returns if the city is set as a city surrounded by a wall from the time of Yehoshua, and Shushan Purim
* should be celebrated as opposed to regular Purim.
* @return if the city is set as a city surrounded by a wall from the time of Yehoshua, and Shushan Purim
* should be celebrated as opposed to regular Purim.
* @see #setIsMukafChoma(boolean)
*/
getIsMukafChoma(): boolean;
/**
* Sets if the location is surrounded by a wall from the time of Yehoshua, and Shushan Purim should be
* celebrated as opposed to regular Purim. This should be set for Yerushalayim, Shushan and other cities.
* @param isMukafChoma is the city surrounded by a wall from the time of Yehoshua.
*
* @see #getIsMukafChoma()
*/
setIsMukafChoma(isMukafChoma: boolean): void;
/**
* Birkas Hachamah is recited every 28 years based on
* Tekufas Shmulel (Julian years) that a year is 365.25 days. The Rambam
* in Hilchos Kiddush Hachodesh 9:3 states that
* tekufas Nisan of year 1 was 7 days + 9 hours before molad Nisan. This is calculated as every 10,227 days (28 * 365.25).
* @return true for a day that Birkas Hachamah is recited.
*/
isBirkasHachamah(): boolean;
/**
* Return the type of year for parsha calculations. The algorithm follows the
* Luach Arba'ah Shearim in the Tur Ohr Hachaim.
* @return the type of year for parsha calculations.
* @todo Use constants in this class.
*/
private getParshaYearType;
/**
* Returns this week's {@link Parsha} if it is Shabbos.
* returns Parsha.NONE if a weekday or if there is no parsha that week (for example Yomtov is on Shabbos).
*
* @return the current parsha.
*/
getParsha(): Parsha;
/**
* Returns the upcoming {@link Parsha Parsha} regardless of if it is the weekday or Shabbos (where next
* Shabbos's Parsha will be returned. This is unlike {@link #getParsha()} that returns {@link Parsha#NONE} if
* the date is not Shabbos. If the upcoming Shabbos is a Yom Tov and has no Parsha, the
* following week's Parsha will be returned.
*
* @return the upcoming parsha.
*/
getUpcomingParsha(): Parsha;
/**
* Returns a {@link Parsha Parsha} enum if the Shabbos is one of the four parshiyos of {@link
* Parsha#SHKALIM Shkalim}, {@link Parsha#ZACHOR Zachor}, {@link Parsha#PARA Para}, {@link
* Parsha#HACHODESH Hachodesh}, or five other special Shabbasos of {@link Parsha#HAGADOL Hagadol},
* {@link Parsha#CHAZON Chazon}, {@link Parsha#NACHAMU Nachamu}, {@link Parsha#SHUVA Shuva},
* {@link Parsha#SHIRA Shira}, or {@link Parsha#NONE Parsha.NONE} for a regular Shabbos (or any weekday).
*
* @return one of the four parshiyos of {@link Parsha#SHKALIM Shkalim}, {@link Parsha#ZACHOR Zachor},
* {@link Parsha#PARA Para}, {@link Parsha#HACHODESH Hachodesh}, or five other special Shabbasos
* of {@link Parsha#HAGADOL Hagadol}, {@link Parsha#CHAZON Chazon}, {@link Parsha#NACHAMU Nachamu},
* {@link Parsha#SHUVA Shuva}, {@link Parsha#SHIRA Shira}, or {@link Parsha#NONE Parsha.NONE} for a regular
* Shabbos (or any weekday).
*/
getSpecialShabbos(): Parsha;
/**
* Returns an index of the Jewish holiday or fast day for the current day, or a -1 if there is no holiday for this day.
* There are constants in this class representing each Yom Tov. Formatting of the Yomim tovim is done
* in the {@link HebrewDateFormatter#formatYomTov(JewishCalendar)}.
*
* @todo Consider using enums instead of the constant ints.
*
* @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.
*
* @see HebrewDateFormatter#formatYomTov(JewishCalendar)
*/
getYomTovIndex(): number;
/**
* Returns true if the current day is Yom Tov. The method returns true even for holidays such as {@link #CHANUKAH}
* and minor ones such as {@link #TU_BEAV} and {@link #PESACH_SHENI}. Erev Yom Tov (with the exception of
* {@link #HOSHANA_RABBA} and erev the second days of Pesach) returns false, as do {@link #isTaanis() fast
* days} besides {@link #YOM_KIPPUR}. Use {@link #isAssurBemelacha()} to find the days that have a prohibition of work.
*
* @return true if the current day is a Yom Tov
*
* @see #getYomTovIndex()
* @see #isErevYomTov()
* @see #isErevYomTovSheni()
* @see #isTaanis()
* @see #isAssurBemelacha()
* @see #isCholHamoed()
*/
isYomTov(): boolean;
/**
* Returns true if the Yom Tov day has a melacha (work) prohibition. This method will return false for a
* non-Yom Tov day, even if it is Shabbos.
*
* @return if the Yom Tov day has a melacha (work) prohibition.
*/
isYomTovAssurBemelacha(): boolean;
/**
* Returns true if it is Shabbos or if it is a Yom Tov day that has a melacha (work) prohibition.
*
* @return if the day is a Yom Tov that is assur bemlacha or Shabbos
*/
isAssurBemelacha(): boolean;
/**
* Returns true if the day has candle lighting. This will return true on erev Shabbos, erev Yom Tov, the
* first day of Rosh Hashana and the first days of Yom Tov out of Israel. It is identical
* to calling {@link #isTomorrowShabbosOrYomTov()}.
*
* @return if the day has candle lighting.
*
* @see #isTomorrowShabbosOrYomTov()
*/
hasCandleLighting(): boolean;
/**
* Returns true if tomorrow is Shabbos or Yom Tov. This will return true on erev Shabbos,
* erev Yom Tov, the first day of Rosh Hashana and erev the first days of Yom Tov
* out of Israel. It is identical to calling {@link #hasCandleLighting()}.
*
* @return will return if the next day is Shabbos or Yom Tov.
*
* @see #hasCandleLighting()
*/
isTomorrowShabbosOrYomTov(): boolean;
/**
* Returns true if the day is the second day of Yom Tov. This impacts the second day of Rosh Hashana
* everywhere, and the second days of Yom Tov in chutz laaretz (out of Israel).
*
* @return if the day is the second day of Yom Tov.
*/
isErevYomTovSheni(): boolean;
/**
* Returns true if the current day is Aseret Yemei Teshuva.
*
* @return if the current day is Aseret Yemei Teshuva
*/
isAseresYemeiTeshuva(): boolean;
/**
* Returns true if the current day is Pesach (either the Yom Tov of Pesach orChol Hamoed Pesach).
*
* @return true if the current day is Pesach (either the Yom Tov of Pesach orChol Hamoed Pesach).
* @see #isYomTov()
* @see #isCholHamoedPesach()
* @see #PESACH
* @see #CHOL_HAMOED_PESACH
*/
isPesach(): boolean;
/**
* Returns true if the current day is Chol Hamoed of Pesach.
*
* @return true if the current day is Chol Hamoed of Pesach
* @see #isYomTov()
* @see #isPesach()
* @see #CHOL_HAMOED_PESACH
*/
isCholHamoedPesach(): boolean;
/**
* Returns true if the current day is Shavuos.
*
* @return true if the current day is Shavuos.
* @see #isYomTov()
* @see #SHAVUOS
*/
isShavuos(): boolean;
/**
* Returns true if the current day is Rosh Hashana.
*
* @return true if the current day is Rosh Hashana.
* @see #isYomTov()
* @see #ROSH_HASHANA
*/
isRoshHashana(): boolean;
/**
* Returns true if the current day is Yom Kippur.
*
* @return true if the current day is Yom Kippur.
* @see #isYomTov()
* @see #YOM_KIPPUR
*/
isYomKippur(): boolean;
/**
* Returns true if the current day is Succos (either the Yom Tov of Succos orChol Hamoed Succos).
* It will return false for {@link #isShminiAtzeres() Shmini Atzeres} and {@link #isSimchasTorah() Simchas Torah}.
*
* @return true if the current day is Succos (either the Yom Tov of Succos orChol Hamoed Succos.
* @see #isYomTov()
* @see #isCholHamoedSuccos()
* @see #isHoshanaRabba()
* @see #SUCCOS
* @see #CHOL_HAMOED_SUCCOS
* @see #HOSHANA_RABBA
*/
isSuccos(): boolean;
/**
* Returns true if the current day is Hoshana Rabba.
*
* @return true if the current day is Hoshana Rabba.
* @see #isYomTov()
* @see #HOSHANA_RABBA
*/
isHoshanaRabba(): boolean;
/**
* Returns true if the current day is Shmini Atzeres.
*
* @return true if the current day is Shmini Atzeres.
* @see #isYomTov()
* @see #SHEMINI_ATZERES
*/
isShminiAtzeres(): boolean;
/**
* Returns true if the current day is Simchas Torah. This will always return false if {@link #getInIsrael() in Israel}
*
* @return true if the current day is Shmini Atzeres.
* @see #isYomTov()
* @see #SIMCHAS_TORAH
*/
isSimchasTorah(): boolean;
/**
* Returns true if the current day is Chol Hamoed of Succos.
*
* @return true if the current day is Chol Hamoed of Succos
* @see #isYomTov()
* @see #CHOL_HAMOED_SUCCOS
*/
isCholHamoedSuccos(): boolean;
/**
* Returns true if the current day is Chol Hamoed of Pesach or Succos.
*
* @return true if the current day is Chol Hamoed of Pesach or Succos
* @see #isYomTov()
* @see #CHOL_HAMOED_PESACH
* @see #CHOL_HAMOED_SUCCOS
*/
isCholHamoed(): boolean;
/**
* Returns true if the current day is erev Yom Tov. The method returns true for Erev - Pesach (first and
* last days), Shavuos, Rosh Hashana, Yom Kippur, Succos and Hoshana Rabba.
*
* @return true if the current day is Erev - Pesach, Shavuos, Rosh Hashana, Yom
* Kippur, Succos and Hoshana Rabba.
* @see #isYomTov()
* @see #isErevYomTovSheni()
*/
isErevYomTov(): boolean;
/**
* Returns true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana
*
* @return true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana
* @see #isRoshChodesh()
*/
isErevRoshChodesh(): boolean;
/**
* Returns true if the current day is Yom Kippur Katan. Returns false for Erev Rosh Hashana,
* Erev Rosh Chodesh Cheshvan, Teves and Iyyar. If Erev Rosh Chodesh occurs
* on a Friday or Shabbos, Yom Kippur Katan is moved back to Thursday.
*
* @return true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana.
* @see #isRoshChodesh()
*/
isYomKippurKatan(): boolean;
/**
* The Monday, Thursday and Monday after the first Shabbos after {@link #isRoshChodesh() Rosh Chodesh}
* {@link JewishDate#CHESHVAN Cheshvan} and {@link JewishDate#IYAR Iyar} are BeHaB days. If the last Monday of Iyar's BeHaB coincides with {@link
* #PESACH_SHENI Pesach Sheni}, the method currently considers it both Pesach Sheni and BeHaB.
* As seen in an Ohr Sameach article on the subject The
* unknown Days: BeHaB Vs. Pesach Sheini? there are some customs that delay the day to various points in the future.
* @return true if the day is BeHaB.
*/
isBeHaB(): boolean;
/**
* Return true if the day is a Taanis (fast day). Return true for 17 of Tammuz, Tisha B'Av,
* Yom Kippur, Fast of Gedalyah, 10 of Teves and the Fast of Esther.
*
* @return true if today is a fast day
*/
isTaanis(): boolean;
/**
* Return true if the day is Taanis Bechoros (on erev Pesach). It will return true for the 14th
* of Nissan if it is not on Shabbos, or if the 12th of Nissan occurs on a Thursday.
*
* @return true if today is Taanis Bechoros.
*/
isTaanisBechoros(): boolean;
/**
* Returns the day of Chanukah or -1 if it is not Chanukah.
*
* @return the day of Chanukah or -1 if it is not Chanukah.
* @see #isChanukah()
*/
getDayOfChanukah(): number;
/**
* Returns true if the current day is one of the 8 days of Chanukah.
*
* @return if the current day is one of the 8 days of Chanukah.
*
* @see #getDayOfChanukah()
*/
isChanukah(): boolean;
/**
* Returns if the day is Purim (Shushan Purim
* in a mukaf choma and regular Purim in a non-mukaf choma).
* @return if the day is Purim (Shushan Purim in a mukaf choma and regular Purim in a non-mukaf choma)
*
* @see #getIsMukafChoma()
* @see #setIsMukafChoma(boolean)
*/
isPurim(): boolean;
/**
* Returns if the day is Rosh Chodesh. Rosh Hashana will return false
*
* @return true if it is Rosh Chodesh. Rosh Hashana will return false
*/
isRoshChodesh(): boolean;
/**
* Returns if the day is Shabbos and Sunday is Rosh Chodesh.
*
* @return true if it is Shabbos and Sunday is Rosh Chodesh.
* @todo There is more to tweak in this method (it does not cover all cases and opinions), and it may be removed.
*/
isMacharChodesh(): boolean;
/**
* Returns if the day is Shabbos Mevorchim.
*
* @return true if it is Shabbos Mevorchim.
*/
isShabbosMevorchim(): boolean;
/**
* Returns the int value of the Omer day or -1 if the day is not in the Omer.
*
* @return The Omer count as an int or -1 if it is not a day of the Omer.
*/
getDayOfOmer(): number;
/**
* Returns if the day is Tisha Be'Av (the 9th of Av).
* @return if the day is Tisha Be'Av (the 9th of Av).
*/
isTishaBav(): boolean;
/**
* Returns the molad in Standard Time in Yerushalayim as a Date. The traditional calculation uses local time. This
* method subtracts 20.94 minutes (20 minutes and 56.496 seconds) from the local time (Har Habayis with a longitude
* of 35.2354° is 5.2354° away from the %15 timezone longitude) to get to standard time. This method
* intentionally uses standard time and not dailight savings time. Java will implicitly format the time to the
* default (or set) Timezone.
*
* @return the Date representing the moment of the molad in Yerushalayim standard time (GMT + 2)
*/
getMoladAsDate(): DateTime;
/**
* Returns the earliest time of Kiddush Levana calculated as 3 days after the molad. This method returns the time
* even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider
* displaying the next tzais if the zman is between alos and tzais.
*
* @return the Date representing the moment 3 days after the molad.
*
* @see ComplexZmanimCalendar#getTchilasZmanKidushLevana3Days()
* @see ComplexZmanimCalendar#getTchilasZmanKidushLevana3Days(Date, Date)
*/
getTchilasZmanKidushLevana3Days(): DateTime;
/**
* 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
* even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider
* displaying the next tzais if the zman is between alos and tzais.
*
* @return the Date representing the moment 7 days after the molad.
*
* @see ComplexZmanimCalendar#getTchilasZmanKidushLevana7Days()
* @see ComplexZmanimCalendar#getTchilasZmanKidushLevana7Days(Date, Date)
*/
getTchilasZmanKidushLevana7Days(): DateTime;
/**
* Returns the latest time of Kiddush Levana according to the Maharil's opinion that it is calculated as
* halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between molad and
* molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad. This method returns the time
* even if it is during the day when Kiddush Levana can't be said. Callers of this method should consider
* displaying alos before this time if the zman is between alos and tzais.
*
* @return the Date representing the moment halfway between molad and molad.
*
* @see #getSofZmanKidushLevana15Days()
* @see ComplexZmanimCalendar#getSofZmanKidushLevanaBetweenMoldos()
* @see ComplexZmanimCalendar#getSofZmanKidushLevanaBetweenMoldos(Date, Date)
*/
getSofZmanKidushLevanaBetweenMoldos(): DateTime;
/**
* 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() half way between molad and mold} is of the opinion that Mechaber
* agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, See Rabbi Dovid
* Heber's very detailed writeup in Siman Daled (chapter 4) of Shaarei Zmanim. This method returns the time even if it is during
* the day when Kiddush Levana can't be said. Callers of this method should consider displaying alos
* before this time if the zman is between alos and tzais.
*
* @return the Date representing the moment 15 days after the molad.
* @see #getSofZmanKidushLevanaBetweenMoldos()
* @see ComplexZmanimCalendar#getSofZmanKidushLevana15Days()
* @see ComplexZmanimCalendar#getSofZmanKidushLevana15Days(Date, Date)
*/
getSofZmanKidushLevana15Days(): DateTime;
/**
* Returns the Daf Yomi (Bavli) for the date that the calendar is set to. See the
* {@link HebrewDateFormatter#formatDafYomiBavli(Daf)} for the ability to format the daf in
* Hebrew or transliterated masechta names.
*
* @deprecated This depends on a circular dependency. Use YomiCalculator.getDafYomiBavli(jewishCalendar)instead. * @return the daf as a {@link Daf} */ getDafYomiBavli(): Daf; /** * Returns the Daf Yomi (Yerushalmi) for the date that the calendar is set to. See the * {@link HebrewDateFormatter#formatDafYomiYerushalmi(Daf)} for the ability to format the daf * in Hebrew or transliterated masechta names. * * @deprecated This depends on a circular dependency. Use
YerushalmiYomiCalculator.getDafYomiYerushalmi(jewishCalendar)instead. * @return the daf as a {@link Daf} */ getDafYomiYerushalmi(): Daf; /** * Returns true if the current day is Isru Chag. The method returns true for the day following Pesach * Shavuos and Succos. It utilizes {@see #getInIsrael()} to return the proper date. * * @return true if the current day is Isru Chag. The method returns true for the day following Pesach * Shavuos and Succos. It utilizes {@see #getInIsrael()} to return the proper date. */ isIsruChag(): boolean; /** * Indicates whether some other object is "equal to" this one. * @see Object#equals(Object) */ equals(object: object): boolean; }