# Not sure about Reform's position on the next one.
IF !Reform
# The fast is moved to the 11th if the 10th is a Saturday
REM [_PastSat(10, "Tevet")] MSG %"Tzom Tevet%" is %b.
ENDIF
[_h(15, "Shvat")] ++12 MSG %"Tu B'Shvat%" is %b.
[_h(15, "Adar A")] ++12 MSG %"Purim Katan%" is %b.
# If Purim is on Sunday, then Fast of Esther is 11 Adar.
IF WKDAYNUM(_h2(13, "Adar")) != 6
REM [TRIGGER(_h2(13, "Adar"))] ++12 MSG %"Fast of Esther%" is %b.
ELSE
REM [TRIGGER(_h2(11, "Adar"))] ++12 MSG %"Fast of Esther%" is %b.
ENDIF
[_h(14, "Adar")] ++12 MSG %"Purim%" is %b.
[_h(15, "Nisan")] ++12 MSG %"Pesach%" is %b.
IF !InIsrael
[_h(16, "Nisan")] MSG %"Pesach 2%" is %b.
ENDIF
[_h(21, "Nisan")] MSG %"Pesach 7%" is %b.
IF !InIsrael && !Reform
[_h(22, "Nisan")] MSG %"Pesach 8%" is %b.
ENDIF
[_h(27, "Nisan")] ++12 MSG %"Yom HaShoah%" is %b.
[_h(4, "Iyar")] ++12 MSG %"Yom HaZikaron%" is %b.
[_h(5, "Iyar")] ++12 MSG %"Yom Ha'atzmaut%" is %b.
# Not sure about Reform's position on Lag B'Omer
IF !Reform
[_h(18, "Iyar")] ++12 MSG %"Lag B'Omer%" is %b.
ENDIF
[_h(28, "Iyar")] ++12 MSG %"Yom Yerushalayim%" is %b.
[_h(6, "Sivan")] ++12 MSG %"Shavuot%" is %b.
IF !InIsrael && !Reform
[_h(7, "Sivan")] MSG %"Shavuot 2%" is %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
[_PastSat(17, "Tamuz")] ++12 MSG %"Tzom Tammuz%" is %b.
[_PastSat(9, "Av")] ++12 MSG %"Tish'a B'Av%" is %b.
ENDIF
fset msgprefix(x) ""
# Counting the omer - do the whole spiel, i.e:
# "This is the xth day of the omer, being y weeks and z days of the omer."
# Nice Remind programming example here!
SET ostart HEBDATE(16, "Nisan", TODAY()-50)
IF ostart <= TODAY() && (TODAY() - ostart < 49)
SET odays TODAY()-ostart+1
IF odays < 7
MSG %"%"Today is the [ORD(odays)] day of the Omer.
ELSE
IF !(odays % 7)
MSG %"%"Today is the [ORD(odays)] day of the Omer, being [odays / 7] [PLURAL(odays/7, "week")] of the Omer.
ELSE
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
CAL [ORD(odays)] of Omer
ENDIF
IF !$PSCAL
REM 20 ++40 msg Also available: <a HREF="http://your.machine/your.dir/cal_dispatch?hebps">a PostScript calendar</a> (about 35KB) for %m %y, complete with Hebrew dates, Jewish holidays, and moon phases for Ottawa. (This takes a few seconds to generate.)
REM 20 ++40 msg And: <a HREF="http://your.machine/your.dir/cal_dispatch?hebhtml">an HTML version</a> of the above. (No moons, and your browser must handle tables.)
ELSE
[trigger(moondate(0))] SPECIAL MOON 0
[trigger(moondate(1))] SPECIAL MOON 1
[trigger(moondate(2))] SPECIAL MOON 2
[trigger(moondate(3))] SPECIAL MOON 3
REM PS Border Border moveto /DayFont findfont 10 scalefont setfont ([hebday(today())] [hebmon(today())]) show
REM SPECIAL HTML <P><FONT SIZE=-1>[hebday(today())] [hebmon(today())]</FONT></P>