From 775e0a85ecfdd1f8cbe81c19e0a8a3d1f4d387d4 Mon Sep 17 00:00:00 2001 From: Dianne Skoll Date: Tue, 7 Oct 2025 23:21:37 -0400 Subject: [PATCH] Fix logic so you can set IncludeOmer and IncludeOmerCal independently. --- include/holidays/jewish.rem | 22 ++++++++++++---------- tests/test.cmp | 1 + 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/include/holidays/jewish.rem b/include/holidays/jewish.rem index 46de8f06..63e9cae9 100644 --- a/include/holidays/jewish.rem +++ b/include/holidays/jewish.rem @@ -95,25 +95,27 @@ IF !Reform REM [_PastSat(9, "Av")] INFO "Url: https://en.wikipedia.org/wiki/Tisha_B%27Av" MSG %"Tish'a B'Av%" %! %b. ENDIF -IF IncludeOmer +IF IncludeOmer || IncludeOmerCal 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. + IF IncludeOmer + IF odays < 7 + REM MSG %"%"Today is the [ORD(odays)] day 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. + 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 ENDIF + IF IncludeOmerCal + REM CAL [ORD(odays)] of Omer + ENDIF ENDIF ENDIF -IF IncludeOmerCal -REM CAL [ORD(odays)] of Omer -ENDIF # Tidy up POP-FUNCS diff --git a/tests/test.cmp b/tests/test.cmp index 3fd2469e..8ef0c67d 100644 --- a/tests/test.cmp +++ b/tests/test.cmp @@ -39640,6 +39640,7 @@ On odd days 2000/06/30 * * * * Always 2000/06/30 * * * * On even days 2000/06/30 * * * * On days divisible by 5 +../include/holidays/jewish.rem(122): `IncludeOmerCal' UNSET without being used (previous SET: ../include/holidays/jewish.rem:10) Testing TODOS in agenda mode First on 2025-08-01