For calculating easter dates of the time between 400 and 1582 (the
Gregorian reform) I have written a small JavaScript routine which can be
run with any JavaScript capable Webbrowser (I myself use Netscape
Communicator 4.04). If you want to use it on your PC, just copy and paste
the listing below (beginning with the line <html> and ending with the line
</html>) into your text editor and save it as a simple unformatted text
file under a name like EASTER.HTML to your disk, into the directory of your
choice. You can then open it with your Webbrowser and get the easter date
(in the format year-month-day) of a given year by typing in the number of
the year and clicking on "go". I have translated the screen display into
English but have left my fancy German variable names in the program code.
It does not write anything to your disk and does not contain any virus or
trojan horse.
I hope somebody will find it useful.
Program listing:
<html>
<head>
<title>Easter Date</title>
<script language="JavaScript">
<!--
function OsterDatum(Eingabe)
{
if(Eingabe >= 400 && Eingabe <= 1582)
var wert = Eingabe;
else
{
alert("Type in a year between 400 and 1582!")
return "Error!"
}
var maerz= 3;
var april = 4;
var monat = 0;
var a = wert % 19;
var b = wert % 4;
var c = wert % 7;
var d = (15 + 19 * a) % 30;
var e = (6 + 2 * b + 4 * c + 6 * d) % 7;
var mar = 22 + d + e;
var apr = d + e + 9;
var monat = maerz;
var tag = mar;
if(tag > 31)
{
var tag = tag - 31;
var monat = april;
}
if(tag <= 21 && monat == maerz)
{
var tag = apr;
var monat = april;
}
if(tag < 10)
{
var tag = "0" + tag;
}
var Ergebnis = Eingabe + "-" + "0" + monat + "-" + tag;
return Ergebnis;
}
function SchreibeDatum(Datum)
{
var Wert;
Wert = OsterDatum(Datum);
document.OsterForm.Ergebnisfeld.value = Wert;
}
//-->
</script>
</head>
<body>
<form name="OsterForm" >
<table bgcolor="#DDEEDD" border=0 cellpadding=3 cellspacing=0>
<tr>
<td bgcolor="#006600" align=middle colspan=2>
<font color="#DDEEDD"><b>Easter Date</b> (400-1582)</font>
</td>
</tr>
<td align=right>
<font color="#006600">Input year: </font>
<input type=text size=4 malength=4 name="JahrEingabe">
</td>
<td align=right>
<input type=button value="go"
onClick="SchreibeDatum(document.OsterForm.JahrEingabe.value,document.OsterFo
rm)">
</td>
</tr>
<tr>
<td align=right>
<font color="#006600">
yyyy-mm-dd:
</font>
<input type=text size=10 name="Ergebnisfeld">
</td>
<td align=right>
<INPUT TYPE="reset" VALUE="clear" >
</td>
</tr>
</table>
</form>
</body>
</html>
----------------------------------------------------------------------------
Otfried Lieberknecht, Schoeneberger Str. 11, D-12163 Berlin
tel: ++49 +30 8516675, fax: ++49 +89 6661792543, [log in to unmask]
Homepage for Dante Studies:
http://members.aol.com/lieberk/welcome.html
Listowner of Italian-Studies:
http://www.mailbase.ac.uk/lists/italian-studies/
Listowner of Medieval-Religion:
http://www.mailbase.ac.uk/lists/medieval-religion/
-----------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|