var todaycalc
					
function datecalc(posted,today){
	todaycalc = '';
	pdays = posted.charAt(6) + posted.charAt(7);
	pmonths = posted.charAt(4) + posted.charAt(5);
	pyears = posted.charAt(0) + posted.charAt(1) + posted.charAt(2) + posted.charAt(3);
	pmonths -= 1
	
	tdays = today.charAt(6) + today.charAt(7);
	tmonths = today.charAt(4) + today.charAt(5);
	tyears = today.charAt(0) + today.charAt(1) + today.charAt(2) + today.charAt(3);
	tmonths -= 1
	
	//Set the two dates
	vtoday=new Date(tyears,tmonths,tdays)
	var vposted=new Date(pyears,pmonths,pdays) //Month is 0-11 in JavaScript
	//Set 1 day in milliseconds
	var one_day=1000*60*60*24
	
	if (posted == today){
		todaycalc = 'yes';
	}
	else{
		//Calculate difference btw the two dates, and convert to days
		todaycalc = Math.ceil((vtoday.getTime()-vposted.getTime())/(one_day)) + " day(s) old"
	}
}