From 5fe1536b3bb600bcbc678b28e200d97b6367a88c Mon Sep 17 00:00:00 2001 From: Dianne Skoll Date: Tue, 30 Sep 2025 13:24:51 -0400 Subject: [PATCH] Add updated "holidays/jewish.rem" courtesy of Nimrod Levy. --- include/holidays/jewish.rem | 147 ++++++++++++++++++------------------ 1 file changed, 73 insertions(+), 74 deletions(-) diff --git a/include/holidays/jewish.rem b/include/holidays/jewish.rem index d0af0dd0..2760f4a8 100644 --- a/include/holidays/jewish.rem +++ b/include/holidays/jewish.rem @@ -1,117 +1,116 @@ -# Major Jewish Holidays -# SPDX-License-Identifier: GPL-2.0-only - # Save variables and functions that we will mess with -PUSH-VARS InIsrael IncludeIsraeliHolidays Reform -PUSH-FUNCS _chan _h2 _PastSat _BackTwoFri _BackTwoSat +PUSH-VARS InIsrael IncludeIsraeliHolidays Reform IncludeOmer IncludeOmerCal SunCal +PUSH-FUNCS _chan _h2 _h2I _YZ _PastSat _BackTwoSat -# Set the variable InIsrael to 1 if you live in Israel. Otherwise, -# you get the Diaspora versions of Jewish holidays SET InIsrael value("InIsrael", 0) - -# Set this if you want to include holidays that are not really -# Jewish religious holidays, but simply Israeli holidays -SET IncludeIsraeliHolidays value("IncludeIsraeliHolidays", 0) - -# Set the variable Reform to 1 if you want the Reform version of the -# Jewish calendar. Otherwise, you get the traditional version +SET IncludeIsraeliHolidays value("IncludeIsraeliHolidays", 1) SET Reform value("Reform", 0) +SET IncludeOmer value("IncludeOmer", 1) +#include Omer in calendar mode +SET IncludeOmerCal value("IncludeOmerCal", 0) +#include Hebrew date on Sundays in calendar mode +SET SunCal value("SunCal", 1) # Convenient function definition to save typing FSET _h2(x, y) HEBDATE(x, y, $U-7) +FSET _h2I(x,y) IIF(InIsrael, _h2(x,y), _h2(x,y)+1) FSET _PastSat(x, y) IIF(WKDAYNUM(_h2(x,y))!=6, _h2(x,y), _h2(x,y)+1) -FSET _BackTwoFri(x, y) IIF(WKDAYNUM(_h2(x,y))!=5, _h2(x,y), _h2(x,y)-2) FSET _BackTwoSat(x, y) IIF(WKDAYNUM(_h2(x,y))!=6, _h2(x,y), _h2(x,y)-2) -REM [hebdate(1, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Rosh_Hashanah" MSG Rosh Hashana 1 -# No RH-2 or Tzom Gedalia in Reform -IF !Reform - REM [hebdate(2, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Rosh_Hashanah" MSG Rosh Hashana 2 - REM [_PastSat(3, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Fast_of_Gedalia" MSG Tzom Gedalia +IF SunCal + REM Sun CAL %"[hebday($T)] [hebmon($T)]%" ENDIF -REM [hebdate(10, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Yom_Kippur" MSG Yom Kippur -REM [hebdate(15, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Sukkot" MSG Sukkot 1 - +REM [hebdate(1, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Rosh_Hashanah" MSG %"Rosh Hashana 1%" %b +IF !Reform + REM [hebdate(2, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Rosh_Hashanah" MSG %"Rosh Hashana 2%" %b + REM [_PastSat(3, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Fast_of_Gedalia" MSG %"Tzom Gedalia%" %b +ENDIF +REM [hebdate(10, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Yom_Kippur" MSG %"Yom Kippur%" %b +REM [hebdate(15, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Sukkot" MSG %"Sukkot 1%" %b IF !InIsrael - REM [hebdate(16, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Sukkot" MSG Sukkot 2 + REM [hebdate(16, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Sukkot" MSG %"Sukkot 2%" %b ENDIF +REM [hebdate(21, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Hoshana_Rabbah" MSG %"Hoshana Rabba%" %b +REM [hebdate(22, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Shemini_Atzeret" MSG %"Shemini Atzeret%" %b +REM [_h2I(22, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Simchat_Torah" MSG %"Simchat Torah%" %b -REM [hebdate(21, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Hoshana_Rabbah" MSG Hoshana Rabba -REM [hebdate(22, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Shemini_Atzeret" MSG Shemini Atzeret +# If the reminder has expired, $T can be zero, hence the +# ($T || $U) below +REM [hebdate(25, "Kislev",$U-9)] through [hebdate(25, "Kislev",$U-9)+7] \ + INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG Chanukah [($T || $U) - hebdate(25,"Kislev",$U-9) + 1] -IF InIsrael - REM [hebdate(22, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Simchat_Torah" MSG Simchat Torah -ELSE - REM [hebdate(23, "Tishrey")] INFO "Url: https://en.wikipedia.org/wiki/Simchat_Torah" MSG Simchat Torah -ENDIF - -# Because Kislev can change length, we must be more careful about Chanukah -FSET _chan(x) HEBDATE(24, "Kislev", $U-9)+x -REM [_chan(1)] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG Chanukah 1 -REM [_chan(2)] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG Chanukah 2 -REM [_chan(3)] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG Chanukah 3 -REM [_chan(4)] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG Chanukah 4 -REM [_chan(5)] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG Chanukah 5 -REM [_chan(6)] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG Chanukah 6 -REM [_chan(7)] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG Chanukah 7 -REM [_chan(8)] INFO "Url: https://en.wikipedia.org/wiki/Hanukkah" MSG Chanukah 8 - -# Not sure about Reform's position on the next one. IF !Reform -# 10 Tevet will never be a Saturday, so whether or not to -# move it is moot. (Thanks to Art Werschulz.) - REM [hebdate(10, "Tevet")] INFO "Url: https://en.wikipedia.org/wiki/Tenth_of_Tevet" MSG Tzom Tevet + REM [hebdate(10, "Tevet")] INFO "Url: https://en.wikipedia.org/wiki/Tenth_of_Tevet" MSG %"Tzom Tevet%" %b ENDIF -REM [hebdate(15, "Shvat")] INFO "Url: https://en.wikipedia.org/wiki/Tu_BiShvat" MSG Tu B'Shvat -REM [hebdate(14, "Adar A")] INFO "Url: https://en.wikipedia.org/wiki/Purim#Purim_Katan" MSG Purim Katan +REM [hebdate(15, "Shvat")] INFO "Url: https://en.wikipedia.org/wiki/Tu_BiShvat" MSG %"Tu B'Shvat%" %b +REM [hebdate(14, "Adar A")] INFO "Url: https://en.wikipedia.org/wiki/Purim#Purim_Katan" MSG %"Purim Katan%" %b +REM [hebdate(15, "Adar A")] INFO "Url: https://en.wikipedia.org/wiki/Purim#Shushan_Purim" MSG %"Shushan Purim Katan%" %b # If Purim is on Sunday, then Fast of Esther is 11 Adar. -IF WKDAYNUM(_h2(13, "Adar")) != 6 - REM [_h2(13, "Adar")] INFO "Url: https://en.wikipedia.org/wiki/Fast_of_Esther" MSG Fast of Esther -ELSE - REM [_h2(11, "Adar")] INFO "Url: https://en.wikipedia.org/wiki/Fast_of_Esther" MSG Fast of Esther -ENDIF -REM [hebdate(14, "Adar")] INFO "Url: https://en.wikipedia.org/wiki/Purim" MSG Purim -REM [hebdate(15, "Nisan")] INFO "Url: https://en.wikipedia.org/wiki/Passover" MSG Pesach +REM [_BackTwoSat(13, "Adar")] INFO "Url: https://en.wikipedia.org/wiki/Fast_of_Esther" MSG %"Fast of Esther%" %b +REM [hebdate(14, "Adar")] INFO "Url: https://en.wikipedia.org/wiki/Purim" MSG %"Purim%" %b +REM [hebdate(15, "Adar")] INFO "Url: https://en.wikipedia.org/wiki/Purim#Shushan_Purim" MSG %"Shushan Purim%" %b + +REM [hebdate(15, "Nisan")] INFO "Url: https://en.wikipedia.org/wiki/Passover" MSG %"Pesach%" %b IF !InIsrael - REM [hebdate(16, "Nisan")] INFO "Url: https://en.wikipedia.org/wiki/Passover" MSG Pesach 2 + REM [hebdate(16, "Nisan")] INFO "Url: https://en.wikipedia.org/wiki/Passover" MSG %"Pesach 2 ENDIF - -REM [hebdate(21, "Nisan")] INFO "Url: https://en.wikipedia.org/wiki/Passover" MSG Pesach 7 - +REM [hebdate(21, "Nisan")] INFO "Url: https://en.wikipedia.org/wiki/Passover" MSG %"Pesach 7 IF !InIsrael && !Reform - REM [hebdate(22, "Nisan")] INFO "Url: https://en.wikipedia.org/wiki/Passover" MSG Pesach 8 + REM [hebdate(22, "Nisan")] INFO "Url: https://en.wikipedia.org/wiki/Passover" MSG %"Pesach 8 ENDIF -REM [hebdate(27, "Nisan")] INFO "Url: https://en.wikipedia.org/wiki/Yom_HaShoah" MSG Yom HaShoah +REM [hebdate(27, "Nisan")] INFO "Url: https://en.wikipedia.org/wiki/Yom_HaShoah" MSG %"Yom HaShoah%" %b IF IncludeIsraeliHolidays - REM [_BackTwoFri(4, "Iyar")] INFO "Url: https://en.wikipedia.org/wiki/Yom_HaZikaron" MSG Yom HaZikaron - REM [_BackTwoSat(5, "Iyar")] INFO "Url: https://en.wikipedia.org/wiki/Independence_Day_(Israel)" MSG Yom Ha'atzmaut - REM [hebdate(28, "Iyar")] INFO "Url: https://en.wikipedia.org/wiki/Jerusalem_Day" MSG Yom Yerushalayim + FSET _YZ(x, y) IIF(WKDAYNUM(_h2(x,y))==0, _h2(x,y)+1,\ + WKDAYNUM(_h2(x,y))==4, _h2(x,y)-1,\ + WKDAYNUM(_h2(x,y))==5, _h2(x,y)-2,\ + _h2(x,y)) + SET YZ _YZ(4, "Iyar") + REM [YZ] INFO "Url: https://en.wikipedia.org/wiki/Yom_HaZikaron" MSG %"Yom HaZikaron%" %b + REM [YZ+1] INFO "Url: https://en.wikipedia.org/wiki/Independence_Day_(Israel)" MSG %"Yom Ha'atzmaut%" %b + REM [hebdate(28, "Iyar")] INFO "Url: https://en.wikipedia.org/wiki/Jerusalem_Day" MSG %"Yom Yerushalayim%" %b ENDIF -# Not sure about Reform's position on Lag B'Omer IF !Reform - REM [hebdate(18, "Iyar")] INFO "Url: https://en.wikipedia.org/wiki/Lag_BaOmer" MSG Lag B'Omer + REM [hebdate(18, "Iyar")] INFO "Url: https://en.wikipedia.org/wiki/Lag_BaOmer" MSG %"Lag B'Omer%" %b ENDIF -REM [hebdate(6, "Sivan")] INFO "Url: https://en.wikipedia.org/wiki/Shavuot" MSG Shavuot +REM [hebdate(6, "Sivan")] INFO "Url: https://en.wikipedia.org/wiki/Shavuot" MSG %"Shavuot%" %b IF !InIsrael && !Reform - REM [hebdate(7, "Sivan")] INFO "Url: https://en.wikipedia.org/wiki/Shavuot" MSG Shavuot 2 + REM [hebdate(7, "Sivan")] INFO "Url: https://en.wikipedia.org/wiki/Shavuot" MSG %"Shavuot 2%" %b ENDIF -# Fairly sure Reform Jews don't observe the next two IF !Reform -# Tzom Tamuz and Tish'a B'Av are moved to Sunday if they normally -# fall on a Saturday - REM [_PastSat(17, "Tamuz")] INFO "Url: https://en.wikipedia.org/wiki/Seventeenth_of_Tammuz" MSG Tzom Tammuz - REM [_PastSat(9, "Av")] INFO "Url: https://en.wikipedia.org/wiki/Tisha_B%27Av" MSG Tish'a B'Av + # Tzom Tamuz and Tish'a B'Av are moved to Sunday if they normally + # fall on a Saturday + REM [_PastSat(17, "Tamuz")] INFO "Url: https://en.wikipedia.org/wiki/Seventeenth_of_Tammuz" MSG %"Tzom Tammuz%" %b + REM [_PastSat(9, "Av")] INFO "Url: https://en.wikipedia.org/wiki/Tisha_B%27Av" MSG %"Tish'a B'Av%" %b +ENDIF + +IF INCLUDEOMER + SET ostart HEBDATE(16, "Nisan", TODAY()-50) + IF ostart <= TODAY() && (TODAY() - ostart < 49) + SET odays TODAY()-ostart+1 + IF odays < 7 + REM MSG %"%"Today is the [ORD(odays)] day of the Omer. + ELSE + IF !(odays % 7) + REM MSG %"%"Today is the [ORD(odays)] day of the Omer, being [odays / 7] [PLURAL(odays/7, "week")] of the Omer. + ELSE + REM MSG %"%"Today is the [ORD(odays)] day of the Omer, being [odays/7] [PLURAL(odays/7, "week")] and [odays%7] [PLURAL(odays%7, "day")] of the Omer. + ENDIF + ENDIF + IF INCLUDEOMERCAL + REM CAL [ORD(odays)] of Omer + ENDIF + ENDIF ENDIF # Tidy up