<!-- 
function getTime2030() {
var now = new Date();
// / array of monthnames
months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
// get the current monthname
var monthnumber = now.getMonth();
months[monthnumber];

// array of daynames
days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
dateobj = new Date();
// returns current day(0-6)
daynum = dateobj.getDay();
// gets the current day(sunday-saturday)
daysreal = days[daynum];
// returns current date(1-31)
datereal = dateobj.getDate();

// initializing:
yearinput = parseInt('2030')
monthinput = parseInt('1')
dayinput = parseInt('1')
hourinput = parseInt('0')
mininput = parseInt('0')
secinput = parseInt('0')
// Prevent strange date/time:
if (monthinput<1,monthinput>12) {
	monthinput = 1;
}
if (dayinput<1,dayinput>31) {
	dayinput = 1;
}
if (hourinput<0,hourinput>23) {
	hourinput = 0;
}
if (mininput<0,mininput>59) {
	mininput = 0;
}
if (secinput<0,secinput>59) {
	secinput = 0;
}

monthsrealinput = months[monthinput-1];
sec = dateobj.getSeconds();
realmin = dateobj.getMinutes();
// total seconds a minute:
min = realmin*60;
realhour = dateobj.getHours();
// total seconds of current hour:
hour = (realhour*(60*60));
realday = dateobj.getDate();
// total seconds a day:
daysec = ((60*60)*24);
// total seconds current day:
day = (realday*daysec);
realmonth = dateobj.getMonth();
// total seconds current month:
month = ((realmonth+1)*(daysec*((31+28+31+30+31+30+31+31+30+31+30+31)/12)));
// total seconds a year:
yearsec = ((60*60)*24)*365;
realyear = dateobj.getFullYear();
yeardiff = realyear-1970;
year = (yeardiff*yearsec);
// Current date in seconds:
curmin = (min+sec);
curhour = (hour+min+sec);
curday = (day+hour+min+sec);
curmonth = (month+day+hour+min+sec);
curyear = (year+month+day+hour+min+sec);
// total seconds a minute (input):
minpt = mininput*60;
// total seconds of current hour (input):
hourpt = (hourinput*(60*60));
// total seconds a day (input):
daypt = (dayinput*daysec);
// total seconds in a month (input):
monthsec = (daysec*((31+28+31+30+31+30+31+31+30+31+30+31)/12));
// total seconds month/year:
monthpt = (monthinput*(daysec*((31+28+31+30+31+30+31+31+30+31+30+31)/12)));
yeardiffinput = yearinput-1970;
yearpt = (yeardiffinput*yearsec);
// total seconds input date:
totmininput = (minpt+secinput);
tothourinput = (hourpt+minpt+secinput);
totdayinput = (daypt+hourpt+minpt+secinput);
totmonthinput = (monthpt+daypt+hourpt+minpt+secinput);
totyearinput = (yearpt+monthpt+daypt+hourpt+minpt+secinput);
 
// calculating...

diff = totyearinput-curyear;
yearoutput = Math.floor((totyearinput/yearsec)-(curyear/yearsec));
monthoutput = Math.floor((totmonthinput-curmonth)/monthsec);
if (monthoutput<0) {
	monthoutput = monthoutput+12;
}
dayoutput = Math.floor((totdayinput-curday)/daysec);
if (dayoutput<0) {
	dayoutput = dayoutput+31;
}
houroutput = Math.floor((tothourinput-curhour)/(60*60));
if (houroutput<0) {
	houroutput = houroutput+24;
}
minuteoutput = Math.floor((totmininput-curmin)/60);
if (minuteoutput<0) {
	minuteoutput = minuteoutput+60;
}
secondoutput = (secinput-sec);
if (secondoutput<0) {
	secondoutput = secondoutput+60;
}

secTxt = (secondoutput == 1) ? " segundo" : " segundos";
minTxt = (minuteoutput == 1) ? " minuto " : " minutos ";
hrTxt = (houroutput == 1) ? " hora " : " horas ";
dyTxt = (dayoutput == 1)  ? " dia " : " dias ";
msTxt = (monthoutput == 1)  ? " mes " : " meses ";
yyTxt = (yearoutput == 1)  ? " aņo " : " aņos ";

document.timeForm.input1.value = "Faltan: " + yearoutput + yyTxt + monthoutput + msTxt + dayoutput + dyTxt + houroutput + hrTxt + minuteoutput + minTxt + secondoutput + secTxt + " para el 2030";
//document.timeForm.input1.value = "Faltan: " + yearoutput  + " aņos " + monthoutput + " meses " + dayoutput + " dias "+ houroutput + " horas "+ minuteoutput + " minutos " + secondoutput + " segundos para el 2030";
newtime = window.setTimeout("getTime2030();", 1000);
}
// -->


