add: var now = new Date(); var nowStr = now.getFullYear() + "-" + (now.getMonth() + 1) + "-" + now.getDate(); var endStr = endYear + "-" + endMonth + "-" + endDay; if (dateCompare(endStr, nowStr) > 0) { endMonth = now.getMonth() + 1; endMonth = endMonth.toString(); if (endMonth.length == 1) { endMonth = "0" + endMonth; } endDay = now.getDate(); endDay = endDay.toString(); if (endDay.length == 1) { endDay = "0" + endDay; } }  
context: function updateDateRange() {	var month = $F("monthSelect");	var year = $F("yearSelect");		if (!Number(year)) {		return;	}		var format ="dd.mm.yyyy";		var startDateObj = document.getElementsByName("startDate")[0];	if (month == "fullYear") {		startDay = "01";		startMonth = "01";		startYear = year;	} else {		startDay = "01";		startMonth = (month < 10 ? "0" : "") + month;		startYear = year;	}	//alert(startDay);		var startFormat = format;		startDateObj.value = startFormat.replace("dd", startDay).replace("mm", startMonth).replace("yyyy", startYear);	var endDateObj = document.getElementsByName("endDate")[0];	if (month == "fullYear") {		endDay = "31";		endMonth = "12";		endYear = year;	} else {		endDay = getLastDay(month, year);		endMonth = (month < 10 ? "0" : "") + month;		endYear = year;	}		var endFormat = format;	endDateObj.value = endFormat.replace("dd", endDay).replace("mm", endMonth).replace("yyyy", endYear);}
meta: 8910	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8910/df3af73d9f99da2c51cff22089cb861c8035e3c6/statistics.js/buggy/trunk/js/statistics.js