All pastes #709058 Raw Edit

Anonymous

public text v1 · immutable
#709058 ·published 2007-09-24 10:20 UTC
rendered paste body
	function print_datetime ()
	{
		var elemento = gebi("dataora");
 		
 		var now = new Date();
 		var dd = checkTime(now.getDate());
 		var MM = checkTime(now.getMonth() + 1);
 		var yy = checkTime(now.getFullYear());
 		var hh = checkTime(now.getHours());
 		var mm = checkTime(now.getMinutes());
 		var ss = checkTime(now.getSeconds());

 		var stringDate = dd + '/' + MM + '/' + yy + ' ' + hh + ':' + mm + ':' + ss;
 
		elemento.innerHTML = stringDate;
	}
	
	function checkTime(i)
	{
		if (i<10) 
	  {
	  	i="0" + i;
	  	}
	  return i;
	}