<script>
function Pasqua(datum) {
var a,b,c,d,e,f,g,h,i,k,l,m,n,p;
a=datum.j%19;
b=Math.floor(datum.j/100);
c=datum.j%100;
d=Math.floor(b/4);
e=b%4;
f=Math.floor((b+8)/25);
g=Math.floor((b-f+1)/3);
h=(19*a+b-d-g+15)%30;
i=Math.floor(c/4);
k=c%4;
l=(32+2*e+2*i-h-k)%7;
m=Math.floor((a+11*h+22*l)/451);
n=Math.floor((h+l-7*m+114)/31);
p=(h+l-7*m+114)%31;
datum.m=n;
datum.t=p+1;
}
function datum(t,m,j) {
this.t=t;
this.m=m;
this.j=j;
}
function Festivo(anno) {
var Datum = new datum;
Datum.j = anno;
Pasqua(Datum);
return Datum.t + "/" + Datum.m + "/" + Datum.j;
}
window.onload = function() {
var oggi = new Date();
var anno = oggi.getFullYear();
var mese = oggi.getMonth();
var giorno = oggi.getDate();
var data_pasqua = Festivo(anno);
var data_oggi = giorno + "/" + (mese+1) + "/" + anno;
if(data_oggi == data_pasqua) {
alert("Oggi e' pasqua");
}else{
alert("Oggi e' il " + data_oggi);
}
}
</script>