 calendar = new Date();
 day = calendar.getDay();
 month = calendar.getMonth();
 date = calendar.getDate();
 year = calendar.getYear();
 if (year < 1000)
 year+=1900
 cent = parseInt(year/100);
 g = year % 19;
 k = parseInt((cent - 17)/25);
 i = (cent - parseInt(cent/4) - parseInt((cent - k)/3) + 19*g + 15) % 30;
 i = i - parseInt(i/28)*(1 - parseInt(i/28)*parseInt(29/(i+1))*parseInt((21-g)/11));
 j = (year + parseInt(year/4) + i + 2 - cent + parseInt(cent/4)) % 7;
 l = i - j;
 emonth = 3 + parseInt((l + 40)/44);
 edate = l + 28 - 31*parseInt((emonth/4));
 emonth--;
 var dayname = new Array ("niedziela", "poniedziałek", "wtorek", "środa", "czwartek", "piątek", "sobota");
 var monthname = new Array ("styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień" );
 var monthname_tr = new Array ("stycznia","luty","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia");
  document.write(dayname[day] + " - ");
  if (date< 10) 
	document.write("0" + date + ". ");
  else 
	document.write(date + ". ");
  if (day>10)		
  	document.write(monthname[month] + ". ");
  else
	document.write(monthname_tr[month] + ". ");
  document.write(year);
 // Easter
 if ((month == emonth) && (date == edate)) document.write("::Wielkanoc");
 // January
 if ((month == 0) && (date == 1)) document.write("::Nowy rok");
 if ((month == 0) && (date == 27)) document.write("::urodziny Wolfganga Amadeusza Mozarta (1756)");
 if ((month == 0) && (day == 1) && (date > 14) && (date< 22)) document.write("::urodziny Martina Luthera Kinga");
 // February
 if ((month == 1) && (date == 2)) document.write("::Dzień Świstaka :-)");
 if ((month == 1) && (date == 8)) document.write("::urudziny Juliusza Verne'a (1828)");
 if ((month == 1) && (date== 12)) document.write("::urodziny Lincolna");
 if((month == 1) && (date == 14)) document.write("::walentynki");
 if ((month == 1) && (date == 15)) document.write("::urodziny Galileusza (1564)");
 if ((month == 1) && (date == 22)) document.write("::urodziny G.Washingtona");
 // March
 if ((month == 2) && (date == 17)) document.write("::Dzień Św. Patryka");
 if ((month == 2) && (date == 21)) document.write("::urodziny J.S. Bach (1685)");
 // April
 if ((month == 3) && (date == 1)) document.write("::Prima Aprylis");
 if ((month == 3) && (date == 8)) document.write("::urodziny Buddy");
 if ((month == 3) && (date == 15)) document.write("::urodziny Leonarda da Vinci(1452)");
 if ((month == 3) && (date == 22)) document.write("::Dzień ziemi");
 // May
 if ((month == 4) && (date == 1)) document.write("::Święto pracy");
 if ((month == 4) && (date == 3)) document.write("::Dzień uchwalenia konstytucji");
 if ((month == 4) && (day == 0) && (date > 7) && (date< 16)) document.write("::Dzień matki");
 // June
 if ((month == 5) && (date == 11)) document.write("::Kamehameha (Hawaje)");
 if((month == 5) && (date == 24)) document.write("::St. Jean Baptiste Day (Canada)");
 if ((month == 5) && (date == 30)) document.write("::Dzień nipodległości (Zair)");
 if ((month == 5) && (day == 0) && (date > 15) && (date< 24)) document.write("::Dzień ojca");
 // July
 if ((month == 6) && (date == 1)) document.write("::Dzień niepodległości (Kanada)");
 if ((month == 6) && (date == 4)) document.write("::Dzień niepodległości (USA)");
 if ((month == 6) && (date == 14)) document.write("::Dzień zdobycia Bastylii (Francja)");
 // August
 if ((month == 7) && (date == 1)) document.write("::Confederation Day (Switzerland)");
 if ((month == 7) && (date == 10)) document.write("::Dzień niepodległości (Ekwador)");
 if ((month == 7) && (date == 15)) document.write("::Dzień niepodległości (Indie)");
 // September
 if ((month == 8) && (date == 7)) document.write("::Dzień niepodległości (Brazylia)");
 if ((month == 8) && (date == 16)) document.write("::Dzień niepodległości (Meksyk)");
 // October
 if ((month == 9) && (date == 1)) document.write("::Dzień zburzenia muru berlińskiego (1990)");
 if ((month == 9) && (date == 31)) document.write("::Halloween");
 // November
 if ((month == 10) && (date == 1)) document.write("::Wszystkich Świętych");
 if ((month == 10) && (date == 11)) document.write("::Dzień odzyskania niepodległości (Polska)");
 if ((month == 10) && (date == 2)) document.write("::Dzień zaduszny");
 // December
 if ((month == 11) && (date == 24)) document.write("::Wigilia");
 if ((month == 11) && (date == 25)) document.write("::I dzień świąt Bożego Narodzenia");
 if ((month == 11) && (date == 25)) document.write("::II dzień świąt Bożego Narodzenia");
 if ((month == 11) && (date == 31)) document.write("::Sylwester");
 document.write("<br></font>");

