gergely@dreacad.UUCP (gergely) (01/07/85)
[May be eaten] I would like to thank everyone who responded to my query. Included in this digest are the responses received. Please note that the programs are the property of the authors, and should only be used with their consent. Menu: - Peter J. Gergely; Original message - Darrel VanBuer; Reference and HEBCAL.C program - Raphael Finkel; References and a PASCAL program - Bill Duffy; Commentary on the calendars - Steve Berson; Mention of calculator program - Brian Lando; Request for this summary - Steve Berson; Reference to a program ---------------------------------------------------------------------- Subject: Jewish Calendar to the Gregorian one? Newsgroups: net.religion.jewish,net.astro,net.math Distribution: net Enjoy. I have just seen the formulae for the calculation of Easter. Does anyone know how to calculate the Gregorian date for the major Jewish Holidays for a given year. I would like to implement the calculations in one of my computer programs. Please send all references, or formulae via mail directly to me as I may not necessarily be reading the proper newsgroups to receive the reply. I will be very glad to post a summary of the responses. Thanking all in advance for any leads. ---------------------------------------------------------------------- Date: Thu, 20 Dec 84 08:00:52 pst From: garfield!ihnp4!sdcrdcf!darrelj (Darrel VanBuer) Message-Id: <8412201600.AA05208@sdcrdcf.UUCP> Subject: Re: Jewish Calendar to the Gregorian one? Newsgroups: net.religion.jewish,net.astro,net.math Organization: System Development Corporation R&D, Santa Monica I'll pass one one I received -- From: ihnp4!ulysses!smb Tue Nov 8 18:28:02 1983 Date: 8 Nov 83 10:26:01 EST (Tue) >From: ulysses!smb (Steven Bellovin) Subject: calendar program Message-Id: <8311081526.AA17925@ulysses.UUCP> Received: by ulysses.UUCP (3.327/3.7) id AA17925; 8 Nov 83 10:26:01 EST (Tue) To: ihnp4!sdcrdcf!darrelj Here's a program someone sent me last year. The best algorithmic reference I know of is a book entitled "Elements of the Jewish and Mohammedan [sic] Calendars", published around 1880 by some English clergyman. (I found it in a University library.) --------------- #ifdef comment >From floyd!trb Wed Oct 20 17:31:27 1982 To: rabbit!smb Subject: REAL hebcal.c >From harpo!alice!adw Tue Aug 17 10:45:55 1982 Date: Tue Aug 17 10:44:39 1982 Status: R #endif /* This program accepts a Gregorian date (yr mon date) and produces the*/ /*equivilant Hebrew date, input from command line*/ #include <stdio.h> main(c,v) int c; char *v[]; {int y,m,d; if(c != 4){ fprintf(stderr,"usage: %s yyyy mm dd\n",v[0]); exit(1); } sscanf(v[1],"%d",&y); sscanf(v[2],"%d",&m); sscanf(v[3],"%d",&d); greg_heb(y,m,d); } int daysinh[6][14] ={ {0,30,29,29,29,30,29,30,29,30,29,30,29}, {0,30,29,30,29,30,29,30,29,30,29,30,29}, {0,30,30,30,29,30,29,30,29,30,29,30,29}, {0,30,29,29,29,30,30,29,30,29,30,29,30,29}, {0,30,29,30,29,30,30,29,30,29,30,29,30,29}, {0,30,30,30,29,30,30,29,30,29,30,29,30,29} }; int daysing[2][12] ={ {30,31,30,31,31,28,31,30,31,30,31,31}, {30,31,30,31,31,29,31,30,31,30,31,31} }; char *nameh[2][14] = { {"Tishri", "Heshvan", "Kislev", "Tevet", "Shevat", "Adar", "Nisan", "Iyyar", "Sivan", "Tammuz", "Av", "Elul","Elul"}, {"Tishri", "Heshvan", "Kislev", "Tevet", "Shevat", "Adar I", "Adar II", "Nisan", "Iyyar", "Sivan", "Tammuz", "Av", "Elul", "Elul"} }; greg_heb(gyr, gmo, gdate) int gyr,gmo,gdate; {int rhgr0, rhgr1, rh(), t1, t, type, gdayno, useleap, flag; int hyr,hmo, hdate, septdate,septmon; hyr = (gmo < 9)? gyr -1 :gyr; /*Greg. yr of RH*/ type = 0; rhgr0 = rh(hyr); /*Sept x of RH*/ if(gmo == 9 && gdate < rhgr0) { /*check if date is before RH*/ flag = 1; hyr = gyr +3760; hmo = 13; /*Elul is also 14th month */ hdate = 30 - (rhgr0 -gdate); } else if(gmo == 10 && gdate +30 < rhgr0){ flag = 1; hyr = gyr +3760; hmo = 13; hdate = 30 - (rhgr0 -gdate -30); } else { useleap = 0; if(((hyr+1)%400==0)||(((hyr+1)%4 ==0)&& ((hyr+1)%100 !=0))) useleap = 1; septdate = gdate; /*no. of days from Sept 0*/ septmon = (gmo > 8) ? (gmo -9): gmo +3; /*ie Sept is mon0 */ while( septmon > 0) septdate = daysing[useleap][--septmon] + septdate; rhgr1 = rh(hyr +1); /*Sept x of next RH*/ t= rhgr1 - rhgr0 + useleap; if(t == -12) type = 0; if(t == -11) type = 1; if(t == -10) type = 2; /*Type of year: 12 months is 0-2*/ if(t == 18) type = 3; /*13 months is 3-5*/ if(t == 19) type = 4; if(t == 20) type = 5; hyr = hyr + 3761; hmo = 1; hdate = septdate - rhgr0 + 1; while(hdate > daysinh[type][hmo]) hdate = hdate - daysinh[type][hmo++]; } t1 = (type <3) ? 0 : 1; printf("%d %s %d\n", hyr, nameh[t1][hmo-1], hdate); } rh(y) int y; {int day,x,n2,g; float fraction,n1; g = (y%19) +1; /*g = "golden number"*/ n1 = y/100.0 -y/400.0 -2.0 +(765433.0/492480.0)*((12*g)%19) +(y%4)/4.0 -(313.0*y + 89091.0)/98496.0; n2 = n1; /*this is 'N' in Conway's formula */ day = dayofwk(y-2000,7,n2); fraction = n1 -n2; x = (12 * g)%19; if(day == 1 || day == 4 || day == 6) {n2 = n1 +1; day = day +1; } else { if(day == 3 && (fraction >=(1367.0/2160.0)) && x >6) {day = 5; n2 = n2 +2; } if(day == 2 && (fraction >= (23269.0/25920.0)) && x >11) {day = 3; n2 = n2 +1; } } return(n2); } /*This subroutine computes the day of week of the unadjusted RH */ /*The month is reduced by 2- ie September is the 7th month */ int daysin[] = { 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31, 29 }; dayofwk(yr, mon, date) int yr, mon, date; { int dayofyr, offset, x, y; if(mon <= 0) mon = mon +12; if(mon==12 || mon == 11) yr = yr -1; dayofyr = date; while(mon >1) dayofyr = daysin[--mon] + dayofyr; x = (yr < 0) ? 1 : 0 ; /*adjust for 2000 a leap year*/ y = (dayofyr + yr -x +(yr+x)/4 - (yr+x)/100 + (yr+x)/400 +3)%7; offset = (y >= 0) ? y : y + 7; /*get remainder into [0,6]*/ return(offset); } ---------------------------------------------------------------------- Date: Fri, 21 Dec 84 09:21:13 cst From: garfield!clyde!ulysses!allegra!uwvax!raphael@wisc-crys.arpa (Raphael Finkel) Subject: Re: Jewish Calendar to the Gregorian one? program calendar(input,output); { Undertakes various calculations based on "A guide to the solar-lunar calendar" by b. Elihu Rothblatt, 1978, and "The comprehensive Hebrew calendar", Arthur Spiers, Berman House, 1952. Some data structures are not yet used; they are part of a planned upgrade. Everything that the program currently does seems to work right. Programmed by Raphael Finkel. } const KhelekPerMinute = 18; MinutePerHour = 60; HourPerDay = 24; DayPerWeek = 7; DayPerCircle = 90216; { until circle 42 } DayPerCycle = 6937; { to nearest week } LastCircle = 41; YearPerCycle = 19; YearPerCircle = 247; CyclePerCircle = 13; MonthPerYear = 12; MonthPerLeapYear = 13; DayPerSecularYear = 365; type TimePtr = ^Time; Time = record Day : 0 .. 6; Hour : 0 .. 23; Minute : 0 .. 59; Khelek : 0 .. 17; Next : TimePtr; end; { Time } Mode = (Julian, Gregorian); LeapType = (Leap, NonLeap); Disposition = (Save, Destroy); { for reclaiming time records } YearInfo = record RoshDay : 0..6; DaysLong : integer; Length : (Short, Normal, Long); Status : LeapType; (* could include combined portions *) end; { YearInfo } KevioType = 1..14; LunarMonthInfo = record NonLeapFirstDay, LeapFirstDay : integer; { days preceding in a Normal year } Name : array [0..10] of char; end; { LunarMonthInfo } SecularMonthInfo = record FirstDay : integer; { days preceding in a nonleap solar year } Name : array [0..10] of char; end; { SecularMonthInfo } var { By convention, variable names ending in 'K' measure some quantity in khelokim, to the nearest week. } StartK, MonthK, YearK, LYearK, CycleK, CircleK : integer; YearsK : array [ 0 .. YearPerCycle] of integer; { By convention, variable names ending in 'T' measure some quantity in time records, to the nearest week. } StartT, MonthT, YearT, LYearT, CycleT, CircleT : TimePtr; { Four types of year in Metonic Cycle: } Leaps, TypeA, TypeB, TypeC, TypeD : set of 1 .. YearPerCycle; { Fourteen critical times of week for calculation of Rosh HaShono: } CriticalTime : array [0..13] of integer; TimeAvail : TimePtr; { free list of Time records } Kevios : array[1..14] of YearInfo; LunarMonths : array[1..12] of LunarMonthInfo; SecularMonths : array[1..12] of SecularMonthInfo; procedure NewTimePtr(var Answer : TimePtr); { makes a new Time record if necessary, or takes one off TimeAvail } begin if TimeAvail = nil then new(Answer) else begin Answer := TimeAvail; TimeAvail := TimeAvail^.Next; end; end; { NewTimePtr } procedure DisposeTimePtr(Discard : TimePtr); { Place Discard on TimeAvail list } begin Discard^.Next := TimeAvail; TimeAvail := Discard; end; { DisposeTimePtr } function MultiplyTime(T : TimePtr; S : integer) : TimePtr; { Multiplies T by S and returns the Time record of the result } var Answer : TimePtr; Tmp : integer; begin NewTimePtr(Answer); with T^ do begin Tmp := Khelek * S; Answer^.Khelek := Tmp mod KhelekPerMinute; Tmp := Minute * S + Tmp div KhelekPerMinute; Answer^.Minute := Tmp mod MinutePerHour; Tmp := Hour * S + Tmp div MinutePerHour; Answer^.Hour := Tmp mod HourPerDay; Tmp := Day * S + Tmp div HourPerDay; Answer^.Day := Tmp mod DayPerWeek; end; { with } MultiplyTime := Answer; end; { MultiplyTime } function MakeTime(D, H, M, K : integer) : TimePtr; { create a TimePtr with fields initialized to D, H, M, K. } var Answer : TimePtr; begin NewTimePtr(Answer); with Answer^ do begin Day := D; Hour := H; Minute := M; Khelek := K; end; MakeTime := Answer; end; { MakeTime } function KhelekToTime(K : integer) : TimePtr; { Converts K khelokim into a Time record. } var Answer : TimePtr; begin NewTimePtr(Answer); with Answer^ do begin Khelek := K mod KhelekPerMinute; K := K div KhelekPerMinute; Minute := K mod MinutePerHour; K := K div MinutePerHour; Hour := K mod HourPerDay; K := K div HourPerDay; Day := K mod DayPerWeek; end; KhelekToTime := Answer; end; { KhelekToTime } function TimeToKhelek(T : TimePtr; Disp : Disposition) : integer; { Converts a Time record to khelokim. Discards the Time record if desired. } begin with T^ do TimeToKhelek := Khelek + KhelekPerMinute * (Minute + MinutePerHour * (Hour + HourPerDay * Day ) ); if Disp = Destroy then DisposeTimePtr(T); end; { TimeToKhelek } procedure PrintTime(T : TimePtr; Disp : Disposition); { display T in a readable fashion. } begin with T^ do writeln('day ',Day:1,' hour ',Hour:2,' minute ',Minute:2, ' khelek ',Khelek:2); if Disp = Destroy then DisposeTimePtr(T); end; { PrintTime } function MoladTime(Year : integer) : TimePtr; { returns the Molad time of the given lunar year } var Cycles, Years : integer; SumK : integer; begin Cycles := Year div YearPerCycle; Years := Year mod YearPerCycle - 1; { completed years } if Years < 0 then begin Years := YearPerCycle - 1; Cycles := Cycles - 1; end; SumK := StartK + CycleK*Cycles + YearsK[Years]; MoladTime := KhelekToTime(SumK); end; { MoladTime } function TellYear(Year : integer) : KevioType; { compute the day of Rosh HaShono and the length of the year } var MoladK : integer; Low : 0..13; { set to the relevant molad limit } YearInCycle : integer; Kevio : KevioType; begin MoladK := TimeToKhelek(MoladTime(Year),Destroy); YearInCycle := Year mod YearPerCycle; if YearInCycle = 0 then YearInCycle := YearPerCycle; Low := 13; while MoladK < CriticalTime[Low] do Low := Low - 1; if (Low = 1) and (YearInCycle in TypeA + TypeB + TypeC) then Kevio := 1 else if (Low in [1,2]) and (YearInCycle in TypeD) then Kevio := 2 else if (Low in [2,3]) and (YearInCycle in TypeA + TypeB) then Kevio := 3 else if (Low in [2,3,4]) and (YearInCycle in TypeC) then Kevio := 3 else if (Low in [3,4]) and (YearInCycle in TypeD) then Kevio := 4 else if (Low in [4,5]) and (YearInCycle in TypeA + TypeB) then Kevio := 5 else if (Low = 5) and (YearInCycle in TypeC) then Kevio := 5 else if (Low in [5,6]) and (YearInCycle in TypeD) then Kevio := 6 else if (Low in [6,7,8]) and (YearInCycle in TypeA + TypeB + TypeC) then Kevio := 7 else if (Low = 7) and (YearInCycle in TypeD) then Kevio := 8 else if (Low in [8,9]) and (YearInCycle in TypeD) then Kevio := 9 else if (Low = 9) and (YearInCycle in TypeA + TypeB + TypeC) then Kevio := 10 else if (Low = 10) and (YearInCycle in TypeA) then Kevio := 11 else if (Low in [10,11]) and (YearInCycle in TypeB + TypeC) then Kevio := 11 else if (Low in [10,11,12]) and (YearInCycle in TypeD) then Kevio := 12 else if (Low in [11,12,13,0]) and (YearInCycle in TypeA) then Kevio := 13 else if (Low in [12,13,0]) and (YearInCycle in TypeB + TypeC) then Kevio := 13 else if (Low in [13,0]) and (YearInCycle in TypeD) then Kevio := 14 else writeln('TellYear: case not covered'); TellYear := Kevio; end; { TellYear } procedure PrintDay(Day : integer); begin case Day of 0: write('Sat.'); 1: write('Sun.'); 2: write('Mon.'); 3: write('Tue.'); 4: write('Wed.'); 5: write('Thu.'); 6: write('Fri.'); end; end; { PrintDay } function LunarDaysSoFar(Year : integer) : integer; { Return the number of days from year 1 to Rosh HaShono of the given year. } var Circles, Cycles, Years : integer; { full ones completed } Seq : integer; NewRoshDay, OldRoshDay, NewYearLength, OldYearLength : integer; CumDays, CumYears, DayDiff : integer; begin Circles := (Year-1) div YearPerCircle; if Circles > LastCircle then writeln('LunarDaysSoFar: Year too high'); Cycles := (Year-1-Circles*YearPerCircle) div YearPerCycle; Years := (Year-1) mod YearPerCycle; with Kevios[TellYear(Circles*YearPerCircle+1)] do begin OldRoshDay := RoshDay; OldYearLength := DaysLong; end; {compute CumDays and CumYears } CumDays := Circles * DayPerCircle; CumYears := Circles * YearPerCircle; for Seq := 1 to Cycles do begin {add in the days of each cycle } with Kevios[TellYear(CumYears + Seq*YearPerCycle + 1)] do begin NewRoshDay := RoshDay; OldYearLength := DaysLong; end; DayDiff := (NewRoshDay - OldRoshDay + DayPerWeek) mod DayPerWeek; CumDays := CumDays + DayPerCycle + DayDiff; OldRoshDay := NewRoshDay; end; CumYears := CumYears + Cycles*YearPerCycle; for Seq := 1 to Years do begin { add in the days of each year } with Kevios[TellYear(CumYears + Seq + 1)] do NewYearLength := DaysLong; CumDays := CumDays + OldYearLength; OldYearLength := NewYearLength; end; LunarDaysSoFar := CumDays; end; { LunarDaysSoFar } function SecularDaysSoFar(Year : integer; CalendarMode : Mode) : integer; { Given a lunar year, calculates how many days from the beginning of the lunar calendar to September 7 (Gregorian) or October 7 (Julian) of the given lunar year. } var StartYear, EndYear, FirstCentury, LastCentury : integer; Centuries, LeapYears, LeapCenturies : integer; begin { Lunar 1 was year -3761. However, for purposes of arithmetic, we assume that year 0 did exist (by convention, it didn't), so that puts lunar 1 at solar -3760. to make all arithmetic with positive numbers, we offset all dates by 4000 years. } StartYear := 4000 - 3760; EndYear := StartYear + Year - 1; { lunar 1 was first year } LeapYears := (EndYear - StartYear) div 4; { StartYear was a leap year } case CalendarMode of Gregorian: begin FirstCentury := 3; { first centry point after the start year } LastCentury := EndYear div 100; { last centry point before end year } Centuries := LastCentury - FirstCentury + 1; { intermediate century points } LeapCenturies := (EndYear div 400) - (StartYear div 400); LeapYears := LeapYears - Centuries + LeapCenturies; SecularDaysSoFar := (EndYear - StartYear)*DayPerSecularYear + LeapYears end; { case Gregorian } Julian: SecularDaysSoFar := (EndYear - StartYear)*DayPerSecularYear + LeapYears - 30; { Julian equivalent of first Rosh HaShono was October 7, not September 7 } end; { case } end; { SecularDaysSoFar } function Offset(Year : integer; CalendarMode : Mode) : integer; { Returns the number of days that Rosh HaShono falls after September 7. } begin Offset := LunarDaysSoFar(Year) - SecularDaysSoFar(Year, CalendarMode); end; { Offset } procedure PrintSecularMonth(Days : integer; LeapStatus : LeapType); { Prints the month and day in the secular calendar for the date 'Days' after January 1. } var Month : integer; begin Month := 2; while Days - SecularMonths[Month].FirstDay >= 0 do Month := Month + 1; Month := Month - 1; Days := Days - SecularMonths[Month].FirstDay + 1; if LeapStatus = Leap then if (Month = 3) and (Days = 1) then begin { Leap Day } Month := 2; Days := 29; end else if Month >= 3 then Days := Days - 1; write(SecularMonths[Month].Name,Days:2); end; { PrintSecularMonth } procedure PrintLunarYear(Year : integer; CalendarMode : Mode); { Prints the type of year } const Sept7 = 249; { 249 days in a NonLeap secular year from January first to September 7 } begin with Kevios[TellYear(Year)] do begin write('year ',Year:4); write(', days: ',DaysLong:3); write(', solar ',Year-3761:4); write(', Rosh HaShono on '); PrintDay(RoshDay); write(' '); end; PrintSecularMonth(Offset(Year,CalendarMode)+Sept7,NonLeap); end; { PrintLunarYear } procedure Init; var SumK, Year : integer; Kevio : KevioType; begin TimeAvail := nil; Leaps := [3,6,8,11,14,17,19]; StartT := MakeTime(2,5,11,6); StartK := TimeToKhelek(StartT,Save); MonthT := MakeTime(1,12,44,1); MonthK := TimeToKhelek(MonthT,Save); YearT := MultiplyTime(MonthT,MonthPerYear); YearK := TimeToKhelek(YearT,Save); LYearT := MultiplyTime(MonthT,MonthPerLeapYear); LYearK := TimeToKhelek(LYearT,Save); YearsK[0] := 0; SumK := 0; for Year := 1 to YearPerCycle do begin if Year in Leaps then SumK := SumK + LYearK else SumK := SumK + YearK; YearsK[Year] := SumK; end; CycleT := KhelekToTime(YearsK[YearPerCycle]); CycleK := TimeToKhelek(CycleT,Save); CircleT := MultiplyTime(CycleT,CyclePerCircle); CircleK := TimeToKhelek(CircleT,Save); TypeA := [1,4,9,12,15]; { years after a leap year, 2 until next leap } TypeB := [7,18]; { years between two leaps } TypeC := [2,5,10,13,16]; { year before leap; 2 from previous leap } TypeD := Leaps; CriticalTime[0] := 0; CriticalTime[1] := TimeToKhelek(MakeTime(0,18,0,0),Destroy); CriticalTime[2] := TimeToKhelek(MakeTime(1,9,11,6),Destroy); CriticalTime[3] := TimeToKhelek(MakeTime(1,20,27,5),Destroy); CriticalTime[4] := TimeToKhelek(MakeTime(2,15,32,13),Destroy); CriticalTime[5] := TimeToKhelek(MakeTime(2,18,0,0),Destroy); CriticalTime[6] := TimeToKhelek(MakeTime(3,9,11,6),Destroy); CriticalTime[7] := TimeToKhelek(MakeTime(3,18,0,0),Destroy); CriticalTime[8] := TimeToKhelek(MakeTime(4,11,38,11),Destroy); CriticalTime[9] := TimeToKhelek(MakeTime(5,9,11,6),Destroy); CriticalTime[10] := TimeToKhelek(MakeTime(5,18,0,0),Destroy); CriticalTime[11] := TimeToKhelek(MakeTime(6,0,22,12),Destroy); CriticalTime[12] := TimeToKhelek(MakeTime(6,9,11,6),Destroy); CriticalTime[13] := TimeToKhelek(MakeTime(6,20,27,5),Destroy); with Kevios[1] do begin RoshDay := 2; DaysLong := 353 end; with Kevios[2] do begin RoshDay := 2; DaysLong := 383 end; with Kevios[3] do begin RoshDay := 2; DaysLong := 355 end; with Kevios[4] do begin RoshDay := 2; DaysLong := 385 end; with Kevios[5] do begin RoshDay := 3; DaysLong := 354 end; with Kevios[6] do begin RoshDay := 3; DaysLong := 384 end; with Kevios[7] do begin RoshDay := 5; DaysLong := 354 end; with Kevios[8] do begin RoshDay := 5; DaysLong := 383 end; with Kevios[9] do begin RoshDay := 5; DaysLong := 385 end; with Kevios[10] do begin RoshDay := 5; DaysLong := 355 end; with Kevios[11] do begin RoshDay := 0; DaysLong := 353 end; with Kevios[12] do begin RoshDay := 0; DaysLong := 383 end; with Kevios[13] do begin RoshDay := 0; DaysLong := 355 end; with Kevios[14] do begin RoshDay := 0; DaysLong := 385 end; for Kevio := 1 to 14 do with Kevios[Kevio] do case DaysLong of 353: begin Length := Short; Status := NonLeap end; 354: begin Length := Normal; Status := NonLeap end; 355: begin Length := Long; Status := NonLeap end; 383: begin Length := Short; Status := Leap end; 384: begin Length := Normal; Status := Leap end; 385: begin Length := Long; Status := Leap end; end; with LunarMonths[1] do begin Name := 'Tishri'; NonLeapFirstDay := 0; LeapFirstDay := 0; end; with LunarMonths[2] do begin Name := 'Kheshvan'; NonLeapFirstDay := 30; LeapFirstDay := 30; end; with LunarMonths[3] do begin Name := 'Kislev'; NonLeapFirstDay := 59; LeapFirstDay := 59; end; with LunarMonths[4] do begin Name := 'Teveth'; NonLeapFirstDay := 89; LeapFirstDay := 89; end; with LunarMonths[5] do begin Name := 'Shevat'; NonLeapFirstDay := 118; LeapFirstDay := 118; end; with LunarMonths[6] do begin Name := 'Adar'; NonLeapFirstDay := 148; LeapFirstDay := 148; end; with LunarMonths[7] do begin Name := 'Nisan'; NonLeapFirstDay := 177; LeapFirstDay := 207; end; with LunarMonths[8] do begin Name := 'Iyar'; NonLeapFirstDay := 207; LeapFirstDay := 237; end; with LunarMonths[9] do begin Name := 'Sivan'; NonLeapFirstDay := 236; LeapFirstDay := 266; end; with LunarMonths[10] do begin Name := 'Tammuz'; NonLeapFirstDay := 266; LeapFirstDay := 296; end; with LunarMonths[11] do begin Name := 'Av'; NonLeapFirstDay := 295; LeapFirstDay := 325; end; with LunarMonths[12] do begin Name := 'Elul'; NonLeapFirstDay := 325; LeapFirstDay := 355; end; with SecularMonths[1] do begin Name := 'January'; FirstDay := 0; end; with SecularMonths[2] do begin Name := 'February'; FirstDay := 31; end; with SecularMonths[3] do begin Name := 'March'; FirstDay := 59; end; with SecularMonths[4] do begin Name := 'April'; FirstDay := 90; end; with SecularMonths[5] do begin Name := 'May'; FirstDay := 120; end; with SecularMonths[6] do begin Name := 'June'; FirstDay := 151; end; with SecularMonths[7] do begin Name := 'July'; FirstDay := 181; end; with SecularMonths[8] do begin Name := 'August'; FirstDay := 212; end; with SecularMonths[9] do begin Name := 'September'; FirstDay := 243; end; with SecularMonths[10] do begin Name := 'October'; FirstDay := 273; end; with SecularMonths[11] do begin Name := 'November'; FirstDay := 304; end; with SecularMonths[12] do begin Name := 'December'; FirstDay := 334; end; end; { Init } procedure DoIt; { Interactively request a year, then print out info for it. } var Command : char; Year : integer; CalendarMode : Mode; begin CalendarMode := Gregorian; while true do begin write('command = '); readln(Command); case Command of 'h': begin writeln('Commands:'); writeln(' h: Print this list'); writeln(' y: Statistics for given Hebrew year'); writeln(' j: Change to Julian'); writeln(' g: Change to Gregorian'); writeln(' q: Quit'); end; 'y': begin write('Hebrew year = '); readln(Year); PrintLunarYear(Year,CalendarMode); writeln; end; 'j': CalendarMode := Julian; 'g': CalendarMode := Gregorian; 'q': halt; end; end; end; { DoIt } begin { main } Init; DoIt; end. ---------------------------------------------------------------------- Date: Sat, 22 Dec 84 05:26:51 nst From: garfield!utcsrgv!decvax!genrad!bolton!billd (Bill Duffy) Subject: Re: Jewish Calendar to the Gregorian one? Newsgroups: net.religion.jewish,net.astro,net.math Organization: GenRad, Bolton MA [] Although I am no expert in the matter, I can get some information and post it later. As my memory serves me, the Jewish calendar is based on lunar and solar timetables. The festival of pentacost(sp) (Now misused as Easter or the fertility rites of Ashtoreth) is 14 days after the spring equinox or Nisan 14. I will get more info and pass it along. Also, the Jewish days ran from sunset to sunset. This being the case, the Jewish "holy day" ran from friday evening to saturday evening. Again, the use of sunday as the "holy day" was borrowed from the sun worshipers. * * * * * * Bill Duffy (billd) * **** **** Test Engineer, MS. 52 * * * GenRad * * * Bolton, Ma. 01720 * * * (617) 779-2811 x6525 * * {decvax,mit-eddie,wjh12}!genrad!bolton!billd ---------------------------------------------------------------------- Date: Mon, 24 Dec 84 12:02:21 PST From: Steven Berson <steven@UCLA-LOCUS.ARPA> Subject: Re: Jewish Calendar to the Gregorian one? Newsgroups: net.religion.jewish,net.astro,net.math Organization: UCLA Computer Science Dept. Message-ID: <472766541-3713-steven@UCLA-LOCUS.ARPA> Return-Path: <steven@UCLA-LOCUS.ARPA> I have a friend back home who implemented the conversion on a TI 59 calculater. I could try and get him to send you a copy. Unfortunately, it probably would not make any sense unless you had the same calculator. Steven Berson steven@ucla-cs.arpa {ihnp4,ucbvax}!ucla-cs!steven ---------------------------------------------------------------------- From: lando@aecom.UUCP (Brian Lando) Subject: Re: Jewish Calendar to the Gregorian one? Date: 28 Dec 84 18:56:26 GMT Distribution: net Organization: Albert Einstein Coll. of Med., NY Lines: 11 > Enjoy. > > I have just seen the formulae for the calculation of Easter. Does anyone > know how to calculate the Gregorian date for the major Jewish Holidays for a > given year. I would like to implement the calculations in one of my > computer programs. > Please post a copy on the net too, it sounds interesting Did anybody find an equation for sunrise & sunset?? Micha Berger ---------------------------------------------------------------------- Date: Sun, 30 Dec 84 17:23:31 nst From: garfield!utcsrgv!allegra!ulysses!smb (Steven Bellovin) Cc: seismo!uwvax!crystal!raphael Subject: Re: Jewish Calendar to the Gregorian one? References: <171@dreacad.UUCP> Contact Raphael Finkel, uwvax!crystal!raphael. I have a copy of a Pascal program he sent me; the references I have are rather obscure. But I prefer not to forward other people's programs without their consent. ---------------------------------------------------------------------- -- - Peter J. Gergely, Defence Research Establishment Atlantic P.O. Box 1012, Dartmouth, N.S. B2Y 3Z7 Canada (POSTAL) ...!{dalcs,garfield,utcsrgv}!dreacad!gergely (USENET) G.GERGELY@SU-SCORE (ARPANET)