Fix logic so you can set IncludeOmer and IncludeOmerCal independently.

This commit is contained in:
Dianne Skoll
2025-10-07 23:21:37 -04:00
parent 9c580b74d4
commit 775e0a85ec
2 changed files with 13 additions and 10 deletions

View File

@@ -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