home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / remind-03.00.19.tgz / remind-03.00.19.tar / remind-03.00.19 / www / hebdate.rem-DIST < prev    next >
Text File  |  1998-04-22  |  6KB  |  174 lines

  1. # Hebrew date reminder file
  2. #
  3. # This file is part of REMIND.
  4. # Copyright (C) 1992-1997 by David F. Skoll
  5.  
  6. # $Id: hebdate.rem-DIST,v 1.5 1998/04/23 02:57:07 dfs Exp $
  7.  
  8. BANNER %
  9. IF !$PSCAL
  10.     FSET _hstr(x) HEBDAY(x) + " " + HEBMON(x) + ", " + HEBYEAR(x)
  11.  
  12.     FSET msgsuffix(x) "<P>"
  13.  
  14.     MSG The Hebrew date for today, %d %m, %y, is [_hstr(today())]. %
  15.     MSG And the Hebrew date for tomorrow is [_hstr(today()+1)]. %
  16.  
  17.     fset msgprefix(x) iif($NumTrig==OldTrig, "<H2>Upcoming Holidays</H2>"+char(13,10),"")
  18.     set oldtrig $numtrig
  19. ENDIF
  20.  
  21. #JHOLS
  22. ##########################################################################
  23. #                                         #
  24. # This portion of the file contains reminders for Jewish holidays.  The     #
  25. # dates were obtained from "The First Jewish Catalog" by Richard Siegel     #
  26. # and Michael and Sharon Strassfeld, published by the Jewish Publication #
  27. # Society of America.  The Reform version of the calendar was guessed     #
  28. # at by David Skoll based on experience.  Additional corrections were    #
  29. # made from the paper "Calendrical Calculations" by Nachum Dershowitz    #
  30. # and Edward M. Reingold.  Any further corrections are welcome.          #
  31. #                                     #
  32. ##########################################################################
  33.  
  34. # --- HERE ARE THE JEWISH HOLIDAYS ---
  35. # Set the variable InIsrael to 1 if you live in Israel.  Otherwise,
  36. # you get the Diaspora versions of Jewish holidays
  37. SET InIsrael 0
  38.  
  39. # Set the variable Reform to 1 if you want the Reform version of the
  40. # Jewish calendar.  Otherwise, you get the traditional version
  41. SET Reform 0
  42.  
  43. # Convenient function definition to save typing
  44. FSET _h(x, y) TRIGGER(HEBDATE(x,y))
  45. FSET _h2(x, y) HEBDATE(x, y, TODAY()-7)
  46. FSET _PastSat(x, y) IIF(WKDAYNUM(_h2(x,y))!=6, \
  47.             TRIGGER(_h2(x,y)), \
  48.             TRIGGER(_h2(x,y)+1))
  49.  
  50. # Default values in case InIsrael and Reform are not set
  51. SET InIsrael VALUE("InIsrael", 0)
  52. SET Reform   VALUE("Reform", 0)
  53.  
  54. [_h(1,  "Tishrey")] ++12 MSG %"Rosh Hashana 1%" is %b.
  55.  
  56. # No RH-2 or Tzom Gedalia in Reform
  57. IF !Reform
  58.    [_h(2,  "Tishrey")] ++12 MSG %"Rosh Hashana 2%" is %b.
  59.    [_PastSat(3,  "Tishrey")] ++12 MSG %"Tzom Gedalia%" is %b.
  60. ENDIF
  61.  
  62. [_h(10, "Tishrey")] ++12 MSG %"Yom Kippur%" is %b.
  63. [_h(15, "Tishrey")] ++12 MSG %"Sukkot 1%" is %b.
  64.  
  65. IF !InIsrael
  66.    [_h(16, "Tishrey")] MSG %"Sukkot 2%"
  67. ENDIF
  68.  
  69. [_h(21, "Tishrey")] ++12 MSG %"Hashana Rabba%" is %b.
  70. [_h(22, "Tishrey")] ++12 MSG %"Shemini Atzeret%" is %b.
  71.  
  72. IF InIsrael
  73.    [_h(22, "Tishrey")] ++12 MSG %"Simchat Torah%" is %b.
  74. ELSE
  75.    [_h(23, "Tishrey")] ++12 MSG %"Simchat Torah%" is %b.
  76. ENDIF
  77.  
  78. # Because Kislev can change length, we must be more careful about Chanukah
  79. FSET _chan(x) TRIGGER(HEBDATE(24, "Kislev", today()-9)+x)
  80. [_chan(1)] ++12 MSG %"Chanukah 1%" is %b.
  81. [_chan(2)] MSG %"Chanukah 2%"
  82. [_chan(3)] MSG %"Chanukah 3%"
  83. [_chan(4)] MSG %"Chanukah 4%"
  84. [_chan(5)] MSG %"Chanukah 5%"
  85. [_chan(6)] MSG %"Chanukah 6%"
  86. [_chan(7)] MSG %"Chanukah 7%"
  87. [_chan(8)] MSG %"Chanukah 8%"
  88.  
  89. # Not sure about Reform's position on the next one.
  90. IF !Reform
  91. # The fast is moved to the 11th if the 10th is a Saturday
  92.    REM [_PastSat(10, "Tevet")] MSG %"Tzom Tevet%" is %b.
  93. ENDIF
  94.  
  95. [_h(15, "Shvat")] ++12 MSG %"Tu B'Shvat%" is %b.
  96. [_h(15, "Adar A")] ++12 MSG %"Purim Katan%" is %b.
  97.  
  98. # If Purim is on Sunday, then Fast of Esther is 11 Adar.
  99. IF WKDAYNUM(_h2(13, "Adar")) != 6
  100.    REM [TRIGGER(_h2(13, "Adar"))] ++12 MSG %"Fast of Esther%" is %b.
  101. ELSE
  102.    REM [TRIGGER(_h2(11, "Adar"))] ++12 MSG %"Fast of Esther%" is %b.
  103. ENDIF
  104. [_h(14, "Adar")] ++12 MSG %"Purim%" is %b.
  105. [_h(15, "Nisan")] ++12 MSG %"Pesach%" is %b.
  106.  
  107. IF !InIsrael
  108.    [_h(16, "Nisan")] MSG %"Pesach 2%" is %b.
  109. ENDIF
  110.  
  111. [_h(21, "Nisan")] MSG %"Pesach 7%" is %b.
  112.  
  113. IF !InIsrael && !Reform
  114.    [_h(22, "Nisan")] MSG %"Pesach 8%" is %b.
  115. ENDIF
  116.  
  117. [_h(27, "Nisan")] ++12 MSG %"Yom HaShoah%" is %b.
  118. [_h(4,  "Iyar")] ++12 MSG %"Yom HaZikaron%" is %b.
  119. [_h(5,  "Iyar")] ++12 MSG %"Yom Ha'atzmaut%" is %b.
  120.  
  121. # Not sure about Reform's position on Lag B'Omer
  122. IF !Reform
  123.    [_h(18, "Iyar")] ++12 MSG %"Lag B'Omer%" is %b.
  124. ENDIF
  125.  
  126. [_h(28, "Iyar")] ++12 MSG %"Yom Yerushalayim%" is %b.
  127. [_h(6,  "Sivan")] ++12 MSG %"Shavuot%" is %b.
  128.  
  129. IF !InIsrael && !Reform
  130.    [_h(7, "Sivan")] MSG %"Shavuot 2%" is %b.
  131. ENDIF
  132.  
  133. # Fairly sure Reform Jews don't observe the next two
  134. IF !Reform
  135. # Tzom Tamuz and Tish'a B'Av are moved to Sunday if they normally
  136. # fall on a Saturday
  137.    [_PastSat(17, "Tamuz")] ++12 MSG %"Tzom Tammuz%" is %b.
  138.    [_PastSat(9,  "Av")] ++12 MSG %"Tish'a B'Av%" is %b.
  139. ENDIF
  140.  
  141. fset msgprefix(x) ""
  142.  
  143. # Counting the omer - do the whole spiel, i.e:
  144. # "This is the xth day of the omer, being y weeks and z days of the omer."
  145. # Nice Remind programming example here!
  146. SET ostart HEBDATE(16, "Nisan", TODAY()-50)
  147. IF ostart <= TODAY() && (TODAY() - ostart < 49)
  148.    SET odays TODAY()-ostart+1
  149.    IF odays < 7
  150.       MSG %"%"Today is the [ORD(odays)] day of the Omer.
  151.    ELSE
  152.       IF !(odays % 7)
  153.          MSG %"%"Today is the [ORD(odays)] day of the Omer, being [odays / 7] [PLURAL(odays/7, "week")] of the Omer.
  154.       ELSE
  155.      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.
  156.       ENDIF
  157.    ENDIF
  158.    CAL [ORD(odays)] of Omer
  159. ENDIF
  160.  
  161. IF !$PSCAL
  162.     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.)
  163.     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.)
  164. ELSE
  165.     [trigger(moondate(0))] SPECIAL MOON 0
  166.     [trigger(moondate(1))] SPECIAL MOON 1
  167.     [trigger(moondate(2))] SPECIAL MOON 2
  168.     [trigger(moondate(3))] SPECIAL MOON 3
  169.     REM PS Border Border moveto /DayFont findfont 10 scalefont setfont ([hebday(today())] [hebmon(today())]) show
  170.     REM SPECIAL HTML <P><FONT SIZE=-1>[hebday(today())] [hebmon(today())]</FONT></P>
  171.  
  172. ENDIF
  173.  
  174.