%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                               %
%          TeX algorithm to compute an Easter date              %
%         =========================================             %
%                                                               %
% File: Easter.tex v 1.5 95-04-18 12:20:00                      %
% Author: (c) 1995 Stanislav Brabec utx@k332.feld.cvut.cz       %
%                                                               %
% Copyright: Easter.tex is freely distributable as a sample of  %
%            compact astronomic computations in plain TeX       %
%                                                               %
% Usage:                                                        %
% virtex [&fmt] [\year[=]year] [\language[=]\xxx] \input Easter %
%  (writes result to Easter.dvi, not console, sorry)            %
%                                                               %
% Years available: 1900-2099                                    %
% Languages: czech, slovak, german, none specified = english    %
%       You can simply add any other.                           %
% Requires language token defined in format (from hyphen.lan)   %
%                                                               %
% Based on Easter algorithm of Carl Freidrich Gauss.            %
% Warning: Trying to understand the algorithm can take a very   %
%       long time and can cause a headache! Don't try it.       %
% ... (And if you find a shorter algorithm, let me know!)       %
% Note: Single-language algorithm can be even much shorter.     %
%                                                               %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def~#1{\catcode`#113}~:\let:\let~+:+\advance~`:`\year~$
:$\newcount~^:^\def~[:[\ifnum~?:?\the~]:]\fi~*:*\multiply
~/~'~(~)~;$($'$)$;^/#1#2{(#1\divide(#2*(-#2+#1(}'`/'{19}*'19
+'24/'{30})5;`/;4*;2+);;`/;7*;4+);;'*;6+);/)7+)'+)21
[)>55+)-7](31^:{; }^'{+)1 [)>(+)-(^:{/ }]}'^*{}[)=(^*{:}]^~{?)}
^$#1#2#3#4{\ifx#1\undefined\else[\language=#1^;{#2}^/{#3}#4]]}
$0{March}{April}{Easter falls on :~.\ and '*~., ?`.}
$\czech{března}{dubna}{Velikonoce připadají na ~.\ *'a ~.\ :?`.}
$\slovak{marca}{apríla}{Veľkonočné sviatky pripadajú na ~.\ *'a ~.\ :?`.}
$\german{März}{April}{Die Ostern fiel sein am ~.\ *'und ~.\ :?`.}
\end