$startparts = explode('/', vbdate('m/d/Y', $thread['dateline'], true));
$endparts = explode('/', vbdate('m/d/Y', TIMENOW, true));
$startdate = gregoriantojd($startparts[0], $startparts[1], $startparts[2]);
$enddate = gregoriantojd($endparts[0], $endparts[1], $endparts[2]);
$days = ($enddate - $startdate == 0) ? '< 1' : $enddate - $startdate;
if ($thread['dateline'])
{
$thread['threaddate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline'], 1);
$thread['threaddate'] = $thread['threaddate'] . " $days day(s) old";
}