var $time = $element.data('time');
var $offset = $element.data('offset');
+ // skip for future dates
+ if ($element.data('isFutureDate')) return;
+
// timestamp is less than 60 minutes ago (display 1 hour ago rather than 60 minutes ago)
if ($timestamp >= this._timestamp || this._timestamp < ($timestamp + 3540)) {
var $minutes = Math.max(Math.round((this._timestamp - $timestamp) / 60), 1);
$time = DateUtil::format($dateTimeObject, DateUtil::TIME_FORMAT);
$dateTime = str_replace('%time%', $time, str_replace('%date%', $date, WCF::getLanguage()->get('wcf.date.dateTimeFormat')));
- return '<time datetime="'.DateUtil::format($dateTimeObject, 'c').'" class="datetime" data-timestamp="'.$timestamp.'" data-date="'.$date.'" data-time="'.$time.'" data-offset="'.$dateTimeObject->getOffset().'">'.$dateTime.'</time>';
+ return '<time datetime="'.DateUtil::format($dateTimeObject, 'c').'" class="datetime" data-timestamp="'.$timestamp.'" data-date="'.$date.'" data-time="'.$time.'" data-offset="'.$dateTimeObject->getOffset().'"'.($timestamp > TIME_NOW ? ' data-is-future-date="true"' : '').'>'.$dateTime.'</time>';
}
}